Re: [ISO8601] ZERO has NO SIGNS
- 1. You asked for the opinion of a "mathematician".
I suppose I qualify (see below).
2. What you say below is essentially correct.
3. The number zero is neither negative nor positive-definite.
A plus or minus sign in front of it is THEORETICALLY irrelevant.
However, IN PRACTICE, experimenters and others sometimes use a
plus or minus zero to indicate results that are uncertain but
close to zero and are known to lie on one side of zero (if not
actually zero). However, this convention does not imply that
the number zero itself has two signed states!
(By the way, it has long been noted that: IN THEORY, there is no
difference between theory and practice, but IN PRACTICE there is. ;^>
4. When years (or months) are numbered, the same whole number applies
to the entire year, regardless of when the year begins and regardless
of how far forward from the beginning (or backward from the end) the
date in question is. We are not in the habit of referring to the year
for today's date as 2002.456789 +/- .06 (or whatever -- I just made
that up, without resort to a calculator!). Nor do we refer to this
month as month number 5.04 (or "May plus 1/31"). This year is 2002
(not 2002. not 2002-point-something) all year. This month is May or
month number 5, today, yesterday, and until Memorial Day (US) an a
few days afterward; then, the month number becomes 6 (a whole number)
for every one of the next 30 days!
5. It is true that some measurements (such as temperature) are made
on a scale that runs to both sides (positive and negative) from the
origin value of zero (unsigned). However, the natural numbers that
we use as ordinals, to designate discrete items -- such as years --
are whole numbers, which may have a sign but which may not have a
fractional value between the integer values that are allowed.
6. In most programming languages, the natural or whole numbers are
generally represented by a data type such as "int" or "INTEGER" and
another type such as "float" or "REAL" is used to indicate fractional
values approximately (!) (by using one of the infinitesmally-small set
of rational values that are representable on the hhardware available).
(However, there is not much point in discussing the fractional or "float"
numbers herein, since they are NOT conventionally used to indicate
either year numbers or month numbers -- as discussed above, in point 4.)
7. The implementation of mathematics on a digital computer is a
somewhat different matter, however, and this may be where some of
the confusion comes from.
In the past, computer circuitry for implementing integer (and float)
arithmetic came in (at least) three flavors. Some hardware used
"twos-complement" arithmetic, some used "one-complement", some
used "sign-magnitude" representation for the values and corresponding
circuitry for the arithmetic.
In a twos-complement machine (such as the IBM 7040, my second computer),
negative numbers are indicated by complementing (0 becomes 1; 1 becomes 0)
every bit of the corresponding positive value. Thus, in a six-bit word
(or field), the bits representing ten and twelve would be 001010 and 001100
respectively, and bits representing -10 an -12 would be: 110101 and 110011
respectively. Unfortuantely, this leaves two bit configurations "between"
those for the signed numbers +1 and -1, i.e. 000000 and 111111. These
degenerate representations for the same value were were sometimes written
as +0 and -0 (and systems sometimes used -0 as a flag for uninitialized
data). Nevertheless, the mathematical/arithmetic value represented by
000000 and 111111 is exactly the same with two-acomplement arithmetic.
(As an aside, I might note that even without twos-complement, there are
many, many degenerate representations possible in unnormalized floating-
point notation. However, I shall try to resist the temptation to digress.)
I'll skip sign-magnitude, except to say that one bit was used to indicate
the sign (1 for minus; 0 for plus) and the remaining bits were treated as
an unsigned value for the magnitude of the number being represented.
Ones-complement arithmetic (which I first saw on my third machine,
the CDC-6600) eliminates the degenerate representation between that for
zero and that for -1. In ones-complement hardware, the six-bit field
containing 111111 would represent -1 (not 0) and the numbers -10 and -12
would be 110110 and 110100 respectively.
To change the sign of a ones-complement number, the operation would be:
"complement and increment" (or CIA on a PDP-8 machine), i.e. first
complent all of the bits, then add one. (Note that, for 000000,
complementing gives 111111 and adding one gives 000000.)
Twos-complement and sign-magnitude representation schemes have the
advantages that the hardware to change sign is simpler and the range
of possible values is symmetrical (e.g. 15-bits can express values
from -32767 to +32768).
(Incidentally, my first computer was a IBM-650, which represented
numbers in a "bi-quinary" scheme, using a 5-state device and a
two-state device, with a drum for memory and vacuum-tube based
hardware -- but you don't really want to hear about that!)
(But if you do, I still have the manuals!!)
8. Anyhow, most computers today use ones-complement hardware,
and the -0 is not an issue. (There is a sort-of minus zero
for floating-point numbers, when the sign is negative but the
magnitude is too small to normalize. But I said I'd avoid
the subject of floating-point approximations.)
So, I think some of the confusion is that the relic of -0
lingers on in the standards for some programming languages.
(On X3J3, we eliminated it for Fortran 90.)
Also, some confusion comes from the use of linear measurement
scales, such as temperature or distance. However, a measurement
scale is NOT appropriate for assigning ordinal numbers or COUNTING.
When you count things, a distinct whole number is given to each
discrete item being counted, e.g. months, states of dice,
population census, chips in a pot, pennies in a piggy bank,
number of college courses passed, etc.
Further confusion arises when the identifying numbers assigned to
the distinct items happen to be negative. However, the use of -1
or -999 to identify a specific year (or a specific person or a
specific student in a classroom) does not require either fractions
or the use of degenerate -0 values.
9. Finally, consider this: People are queued up in a straight line,
to wait for a movie, etc. While it would be possible to count them
by assigning 1 to the first one, 2 to the next, etc., I ould just as
easily assign 1 to the person ahead of me, to the one ahead of him,
and so forth. Now, if I also wish to see how many people follow me,
I could assign the number -1 to the one directly behind me, -2 to the
next, etc. I chose zero for myself (but one could just as easily
pick someone else on the line as the arbitrary zero item).
Note that I may begin this assignment prcess even without being
able to see the beginning of the line and/or the end of the line
(which might be growing as I count!) (And the line might already
be entering the theatre, too!) Still, it is easy to calculate how
many seats will be taken by the portion of the line from the lady
in the red hat to the man with the popcorn, provided I know their
assigned (positive or negative) numbers.
If I really wanted to calculate the length of the line in millimeters -- from halfway
thru him to 3/4 of the way thru her, this could be easily done
using real numbers. However, that measurement calculation does
not in any way invalidate the assignment of discrete numbers to
the individual peopl in the line.
Numbering the people ahead or behind an arbitraryly chosen discrete
item as a "starting point" does not require the establishment of
a degenerate minus zero -- because we are not slicing the people
up into fractional parts, nor are we ignoring the boundary between
each whole person. The same is true for the numbering of years in
a sequence (with no certain end or precise beginning).
Bruce A. Martin
B.S. Mathematics, Polytechnic University, 1964
Ph.D. candidate in Physics, Polytechnic University, 1965-1970
Staff member in the Applied Mathematics, Brookhaven National Laboratory, 1966-1980
Adjunct Professor of Computer Science (at four different colleges)
Archie Medrano wrote:
> Are there any other mathematicians on this list?
> The number 0 does not use any signs. It is neither positive nor negative.
> The year "2002" is not an interval. It is one number.
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
- bam wrote:
> ....I think there's some confusion here.
> In a twos-complement machine (such as the IBM 7040, my second computer),
> negative numbers are indicated by complementing (0 becomes 1; 1 becomes 0)
> every bit of the corresponding positive value. Thus, in a six-bit word
> (or field), the bits representing ten and twelve would be 001010 and 001100
> respectively, and bits representing -10 an -12 would be: 110101 and 110011
> respectively. Unfortuantely, this leaves two bit configurations "between"
> those for the signed numbers +1 and -1, i.e. 000000 and 111111.
> Ones-complement arithmetic (which I first saw on my third machine,
> the CDC-6600) eliminates the degenerate representation between that for
> zero and that for -1. In ones-complement hardware, the six-bit field
> containing 111111 would represent -1 (not 0) and the numbers -10 and -12
> would be 110110 and 110100 respectively.
Ones complement (as used on the CDC machines, IIRC) is to simply invert
the bits (giving two representations of zero (000000 and 111111)) whereas
twos complement is to invert the bits then add one (000000 => 111111 =>
000000, discarding the carry) so there is only one representation of
zero. Most machines these days (e.g., those based on the Intel '86 family
or the Motorola 68000 (I think - at least the 6800 did)) use twos complement
for integer arithmetic though not necessarily for floating point.
I've never used a 7040 but the first computer I used was its little brother,
the 1130 which used twos complement arithmetic on 16 bit words. The FORTRAN
IV manual for this machine had a good explanation of twos complement using
a way of looking at the matter I have not seen described since. Instead of
considering rather magic bit manipulations as above it pointed out that the
the effect is that the weight of the top bit is -32768.
To follow the examples above the weights on a six bit twos complement
value would be:
-32, 16, 8, 4, 2, 1
so +5 = 000101. We get -5 by inverting to get 111010 then add one to
get 111011 which is -32 + 16 + 8 + 2 + 1 = -32 + 27 = -5.
Another way of looking at twos complement is that the top half of the number
range is picked up and moved down below zero. So 111111 (-1) is followed by
00000 (0) which seems reasonable.
I don't want to get drawn into this debate about +/- year zero but couldn't
let this misinformation on one and twos complement stand, however irrelevant.
P.S., just to make sure it wasn't me spreading misinformation I double
checked this by having a look in "The Art Of Electronics" by Paul
Horowitz and Winfield Hill. On pages 476 and 477 (of my second
edition) they describe two other representations we needn't go into
here then under "2's complement representation" they say:
> ....a negative number is simply represented as the binary number you
> add to a positive number of the same magnitude to get zero. To form a
> negative number, first complement each of the bits of the positive
> number (i.e., write 1 for 0, and vice versa; this is called the "1's
> complement"), then add 1 (that's the "2's complement").
> There's only one zero, conveniently represented by all bits 0....