Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Assembly Language Step by Step Programming with DOS and Linux 2nd Ed 2000.pdf
Скачиваний:
156
Добавлен:
17.08.2013
Размер:
4.44 Mб
Скачать

Counting in Martian

There is intelligent life on Mars.

That is, the Martians are intelligent enough to know from watching our TV programs these past 50 years that a thriving tourist industry would not be to their advantage. So they've remained in hiding, emerging only briefly to carve big rocks into the shape of Elvis's face to help the National Enquirer ensure that no one will ever take Mars seriously again. The Martians do occasionally communicate with science fiction writers like me, knowing full well that nobody has ever taken us seriously. Hence the information in this section, which involves the way Martians count.

Martians have three fingers on one hand, and only one finger on the other. Male Martians have their three fingers on the left hand, while females have their three fingers on the right hand. This makes waltzing and certain other things easier.

Like human beings and any other intelligent race, Martians started counting by using their fingers. Just as we used our 10 fingers to set things off in groups and powers of 10, the Martians used their four fingers to set things off in groups and powers of four. Over time, our civilization standardized on a set of 10 digits to serve our number system. The Martians, similarly, standardized on a set of four digits for their number system. The four digits follow, along with the names of the digits as the Martians

pronounce them: T (xip), (foo), n (bar), = (bas).

Like our zero, xip is a placeholder representing no items, and while Martians sometimes count from xip, they usually start with foo, representing a single item. So they start counting: Foo, bar, bas

Now what? What comes after bas? Table 2.1 demonstrates how the Martians count to what we would call 25.

Table 2.1: Counting in Martian, Base Fooby

MARTIANNUMERALS

 

MARTIANPRONUNCIATION

 

EARTHEQUIVALENT

 

 

 

 

T

 

Xip

 

0

 

 

 

 

 

 

Foo

 

1

 

 

 

 

 

 

 

 

 

n

 

Bar

 

2

 

 

 

 

=

 

Bas

 

3

 

 

 

 

T

 

Fooby

 

4

 

 

 

 

 

 

 

 

 

 

Fooby-foo

 

5

 

 

 

 

 

 

 

 

 

n

 

Fooby-bar

 

6

 

 

 

 

=

 

Fooby-bas

 

7

 

 

 

 

nT

 

Barby

 

8

 

 

 

 

n

 

Barby-foo

 

9

 

 

 

 

nn

 

Barby-bar

 

10

 

 

 

 

n=

 

Barby-bas

 

11

 

 

 

 

=T

 

Basby

 

12

 

 

 

 

=

 

Basby-foo

 

13

 

 

 

 

=n

 

Basby-bar

 

14

 

 

 

 

==

 

Basby-bas

 

15

 

 

 

 

TT

 

Foobity

 

16

 

 

 

 

 

 

 

 

T

 

Foobity-foo

 

17

 

 

 

 

 

 

 

 

 

 

 

 

Tn

 

Foobity-bar

 

18

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T=

 

Foobity-bas

 

19

 

 

 

 

 

 

 

 

 

 

 

 

 

 

T

 

Foobity-fooby

 

20

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Foobity-fooby-foo

 

21

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

n

 

Foobity-fooby-bar

 

22

 

 

 

 

 

 

 

 

=

 

Foobity-fooby-bas

 

23

 

 

 

 

 

 

 

 

nT

 

Foobity-barby

 

24

 

 

 

 

 

 

 

 

n

 

Foobity-barby-foo

 

25

 

 

 

 

 

 

 

 

With only four digits (including the one representing zero) the Martians can only count to bas without running out of digits. The number after bas has a new name, fooby. Fooby is the base of the Martian number system, and probably the most important number on Mars. Fooby is the number of fingers a Martian has. We would call it four.

The most significant thing about fooby is the way the Martians write it out in numerals: T. Instead of a single column, fooby is expressed in two columns. Just as with our decimal system, each column has a value that is a power of fooby. This means only that as you move from the rightmost column toward the left, each column represents a value fooby times the column to its right.

The rightmost column represents units, in counts of foo. The next column over represents fooby times foo, or (given that arithmetic works the same way on Mars as here, New Math notwithstanding) simply fooby. The next column to the left of fooby represents fooby times fooby, or foobity, and so on. This relationship should become clearer through Table 2.2.

Table 2.2: Powers of Fooby

 

 

 

 

 

 

 

 

 

 

 

 

 

Foo

 

x Fooby=

T

 

(Fooby)

 

 

 

 

 

 

 

 

 

 

 

 

T

 

Fooby

 

x Fooby=

TT

 

(Foobity)

 

 

 

 

 

 

 

 

 

 

 

 

TT

 

Foobity

 

x Fooby=

TTT

 

(Foobidity)

 

 

 

 

 

 

 

 

 

 

 

 

TTT

 

Foobidity

 

x Fooby=

TTTT

 

(Foobididity)

 

 

 

 

 

 

 

 

 

 

 

 

TTTT

 

Foobididity

 

x Fooby=

TTTTT

 

(Foobidididity)

 

 

 

 

 

 

 

 

 

 

 

 

TTTTT

 

Foobidididity

 

x Fooby=

TTTTTT

 

and so on…

 

 

 

 

 

 

 

 

 

 

 

Dissecting a Martian Number

Any given column may contain a digit from xip to bas, indicating how many instances of that column's value are contained in the number as a whole. Let's work through an example. Look at Figure 2.1,

which is a dissection of the Martian number n= T=, pronounced "Barbididity-basbidity-foobity-bas." (A visiting and heavily disguised Martian precipitated the doo-wop craze while standing at a Philadelphia bus stop in 1954, counting his change.)

Figure 2.1: The anatomy of n= T=.

The rightmost column tells how many units are contained in the number. The digit there is bas, indicating that the number contains bas units. The second column from the right carries a value of fooby times foo (fooby times one) or fooby. A xip in the fooby column indicates that there are no foobies

in the number. The xip digit in T is a placeholder, just as zero is in our numbering system. Notice also that in the columnar sum shown to the right of the digit matrix, the foobies line is represented by a double xip. Not only is there a xip to tell us that there are no foobies, but also a xip holding the foos place as well. This pattern continues in the columnar sum as we move toward the more significant columns to the left.

Fooby times fooby is foobity, and the digit tells us that there is foo foobity (a single foobity) in the number. The next column, in keeping with the pattern, is foobity times fooby, or foobidity. In the

columnar notation, foobidity is written as TTT. The = digit tells us that there are bas foobidities in the number. Bas foobidities is a number with its own name, basbidity, which may be written as =TTT. Note the presence of basbidity in the columnar sum.

The next column to the left has a value of fooby times foobidity, or foobididity. The n digit tells us that there are bar foobididities in the number. Bar foobididities (written nTTTT) is also a number with its own name, barbididity. Note also the presence of barbididity in the columnar sum, and the four xip digits that hold places for the empty columns.

The columnar sum expresses the sense of the way a number is assembled: The number contains

barbididity, basbidity, foobity, and bas. Roll all that together by simple addition and you get n= T=. The name is pronounced simply by hyphenating the component values: barbididity-basbidity-foobity- bas. Note that there is no part in the name representing the empty fooby column. In our own familiar base 10 we don't, for example, pronounce the number 401 as "four hundred, zero tens, one." We simply say, "four hundred one." In the same manner, rather than say "xip foobies," the Martians just leave it out.

As an exercise, given what I've told you so far about Martian numbers, figure out the Earthly value equivalent to n = T =.

The Essence of a Number Base

Since tourist trips to Mars are unlikely to begin any time soon, of what Earthly use is knowing the Martian numbering system? Just this: It's an excellent way to see the sense in a number base without getting distracted by familiar digits and our universal base 10.

In a columnar system of numeric notation like both ours and the Martians', the base of the number system is the magnitude by which each column of a number exceeds the magnitude of the column to its right. In our base 10 system, each column represents a value 10 times the column to its right. In a base fooby system like the one used on Mars, each column represents a value fooby times that of the

column to its right. (In case you haven't already caught on, the Martians are actually using base 4-but I wanted you to see it from the Martians' own perspective.) Each has a set of digit symbols, the number of which is equal to the base. In our base 10, we have 10 symbols, from 0 to 9. In base 4, there are four digits from 0 to 3. In any given number base, the base itself can never be expressed in a single digit!