Tuesday, January 26, 2010

The reversed odometer

For simplicity, consider a vehicle with an old-style mechanical odometer, and a separate trip odometer with four digits, the lowest digit representing tenths of miles.  Reset the trip odometer so that it reads all zeroes, and drive a tenth of a mile backwards.  The odometer should now read 999.9.  Let's ignore the decimal point, and work in distance units of a tenth of a mile.  Then the trip meter reads 9999 units.  What it should read is -1 unit, or some equivalent to that.

It should be clear that the trip meter, if unreset, cycles after every 10000 units of travel.  It could measure the actual distance since it was last reset, or it could be any multiple of 10000 units out.  Anyway, if the thousands digit reads 9, but the meter is too high by 10000 units, then to correct the problem, we can simply remove 10 thousand from 9 thousand.  This gives -1 thousand, or 1¯ thousand---i.e. the thousand digit might say 9 but it will be better for us to read it as 1¯.

We can put this in wiggle, and calculate

            1¯999 = 1¯109109109,
                 = 1¯1000999,
                 = -1000+999,
                 = -1.

Put another way, provided we read the high order digit in suitable way, as string of nines, or else a -1 followed by a string of nines, can be reasonable way to express -1.

This particular notation for negatives is called tens complement.  In tens complement, as for the odometer driven in reverse :

            ...999 = -1,

            ...998 = -2,

            ...997 = -3,

                        

No comments:

Post a Comment