BINARY NUMBERS
The binary number system is a scheme for expressing numbers using only the
digits 0 and 1. It is sometimes called base 2. The digit immediately to the left
of the radix point is the ‘‘ones’’ digit. The next digit to the left is the ‘‘twos’’
digit; after that comes the ‘‘fours’’ digit. Moving further to the left, the digits
represent 8, 16, 32, 64, and so on, doubling every time. To the right of the
radix point, the value of each digit is cut in half again and again, that is,
1/2, 1/4, 1/8, 1/16, 1/32, 1/64, and so on.
When you work with a computer or calculator, you give it a decimal
number that is converted into binary form. The computer or calculator does
its operations with zeros and ones, also called digital low and high states.
When the process is complete, the machine converts the result back into
decimal form for display.
OCTAL AND HEXADECIMAL NUMBERS
The octal number system uses eight symbols. Every digit is an element of the
set {0, 1, 2, 3, 4, 5, 6, 7}. Starting with 1, counting in the octal system goes like
this: 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, ...16, 17, 20, 21, ...76, 77, 100, 101, ...776,
777, 1000, 1001, and so on.
Yet another scheme, commonly used in computer practice, is the hexa-
decimal number system, so named because it has 16 symbols. These digits are
the decimal 0 through 9 plus six more, represented by A through F, the first
six letters of the alphabet. Starting with 1, counting in the hexadecimal
system goes like this: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, ...1E,
1F, 20, 21, ...FE, FF, 100, 101, ...FFE, FFF, 1000, 1001, and so on.
PROBLEM 1-1
What is the value of the binary number 1001011 in the decimal system?
SOLUTION 1-1
Note the decimal values of the digits in each position, proceeding from right
to left, and add them all up as a running sum. The right-most digit, 1, is mul-
tiplied by 1. The next digit to the left, 1, is multiplied by 2, for a running sum
of 3. The digit to the left of that, 0, is multiplied by 4, so the running sum is
still 3. The next digit to the left, 1, is multiplied by 8, so the running sum is 11.
The next two digits to the left of that, both 0, are multiplied by 16 and 32,
respectively, so the running sum is still 11. The left-most digit, 1, is multiplied
by 64, for a final sum of 75. Therefore, the decimal equivalent of 1001011
is 75.
CHAPTER 1 Numbers and Arithmetic 9