Professional Documents
Culture Documents
All computers do the amazing things that they do by simply manipulating ones and
zeros. Computers can only do binary (base 2) arithmetic. You must be able to use the
binary number system in order to appreciate how the computer works. Since the
computer works with the binary number system and since it is relatively easy to convert
hexadecimal (base 16) and octal numbers (base 8) into binary, computer scientists need
to be familiar with the octal and hexadecimal number systems.
I. Numbering Systems
1.Decimal System
base 10
valid digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
2.Binary System
base 2
valid digits - 0, 1
3.Octal System
base 8
valid digits - 0, 1, 2, 3, 4, 5, 6, 7
4.Hexadecimal System
base 16
valid digits - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
A refers to decimal 10, B refers to decimal 11, etc.
II. To convert a number in a base other than 10 to base 10
1.Easy way: If you need to convert 345 (base 8) to decimal, you would label the
three columns as the 1's, 8's, and 64's columns from right to left. Then, you
would multiply the digits by these column labels and compute the sum of the 3
products. Since a 3 is in the 64's column, you multiply to obtain 192. Since 4 is in
the 8's column, you multiply 4 x 8 to get 32. Then add 32 to the 192 from the step
before to get a running total of 224. Finally, since a 5 is in the 1's column,
multiply 1 x 5 to get the product of 5 and add it to the running toal of 224 to get
229. That final value, 229, is the decimal equivalent to the original number 345
(base 8).
2. Formal way: Expand the number 345 (base 8) into expanded form. Expanded
form is written as