Number Systems

Decimal Numbers

     You may remember that in grade school your were taught that the 10 different symbols for numbers are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. You may not have been told that there are 10 symbols because we use the decimal number system. Consider the decimal number 239 (two hundred thirty nine). You may have learned about the units position (9), tens position (3), and hundreds position (2), etc., to the left of the decimal point. And, similarly, about the tenths, hundredths, thousandths, etc., positions to the right of the decimal point. You may not have been taught that the value in these positions are powers of ten.

     Thus, 239 is valued by multiplying the digit in each position by the power of ten for that position. Thus,

239

2 x 102 + 3 x 101 + 9 x 10

2 x 100 + 3 x 10 + 9 x 1

     (Do you remember that any number to the zero power is 1?)

Binary numbers (Back to SWAC in detail )

     SWAC uses the binary number system, to the base 2, The two binary digits are 1 and 0. A binary number is valuedin decimal by multiplying the digit in each position by the power of 2 in that position. For example, value the binary number

1010

1 x 23 + 0 x 22 + 1 x 21 + 0 x 20

8 +0 +2 +0 (equals 10 in decimal)

     Four digit binary numbers range in value from 0000 to 1111. Their 16 decimal values range from 0 to 15. They need 16 different symbols to represent each possible combination of 4 binary digits. This leads to a hexadecimal numbering system with base 16.

Hexadecimal numbers (Back to SWAC in detail)

     For SWAC, the 16 digit hexadecimal symbols used were

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, u, v, w, x, y, z

(The current symbol set is usually 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,and F.)

     So, zz is a valid hexadecimal number. It is the maximum valued 2-digit hexadecimal number. Its value in decimal is:

z x 161 + z x 160

15 x 16 + 15 x 1

equals 255 in decimal

     Each storage cell in the Williamson Tube high speed memory could be addressed as a 2-digit hexadecimal number as well as a three digit decimal number. To make it easier for users who live in a decimal world to program SWAC, the three digit decimal number is used in practice. This might be considered an early example of "user friendly."

Coded Decimal (Back to SWAC in detail )

     There is one more notation used by SWAC. Each single hexadecimal digit, 0 to Z, has a decimal representation of 00 to 15. This is called the coded decimal representation.

     So, eight binary digits that are broken into two groups of 4 binary digits are used to represent coded decimal. For example, hexadecimal z is coded decimal 15. This value (15) is coded into 8 bits broken into two groups of 4 bits, thus:

0001 0101

     A table in the manual (Section 1.6-3) summarizes these codings for decimal, hexadecimal and coded decimal.

     Groups of 4-digit binary numbers are a useful way to break up a long 36- digit binary number. SWAC makes use of grouping of binary numbers in structuring a command.

(Back to SWAC in detail )