Hardware Reference
In-Depth Information
0123456789
In contrast, binary numbers do not use these ten digits. They are all constructed
exclusively from the two binary digits
01
Octal numbers are built up from the eight octal digits
01234567
For hexadecimal numbers, 16 digits are needed. Thus six new symbols are re-
quired. It is conventional to use the uppercase letters A through F for the six digits
following 9. Hexadecimal numbers are then built up from the digits
0123456789ABCDEF
The expression ''binary digit'' meaninga1ora0isusually referred to as a bit .
Figure A-2 shows the decimal number 2001 expressed in binary, octal, decimal,
and hexadecimal form. The number 7B9 is obviously hexadecimal, because the
symbol B can only occur in hexadecimal numbers. However, the number 111
might be in any of the four number systems discussed. To avoid ambiguity, people
use a subscript of 2, 8, 10, or 16 to indicate the radix when it is not obvious from
the context.
Binary
1
1
1
1
1
0
1
0
0
0
1
1
2 10 +1
2 9 +1
2 8 +1
2 7 +1
2 6 +0
2 5 +1
2 4 +0
2 3 +0
2 2 +0
2 1 +1
2 0
×
×
×
×
×
×
×
×
×
×
×
1024
+
512
+
256
+
128
+
64
+
0
+
16
+
0
+
0
+
0
+
1
Octal
3
7
2
1
8 3 +7
8 2 +2
8 1 +1
8 0
3
×
×
×
×
1536
+
448
+
16
+
1
Decimal
2
0
0
1
2
×
10 3 +0
×
10 2 +0
×
10 1 +1
×
10 0
2000
+
0
+
0
+
1
.
Hexadecimal
7
D
1
7
×
16 2 +13
×
16 1 +1
×
16 0
1792
+
208
+
1
Figure A-2. The number 2001 in binary, octal, and hexadecimal.
As an example of binary, octal, decimal, and hexadecimal notation, consider
Fig. A-3, which shows a collection of nonnegative integers expressed in each of
these four different systems. Perhaps some archaeologist thousands of years from
now will discover this table and regard it as the Rosetta Stone to late twentieth cen-
tury and early twenty-first century number systems.
 
Search WWH ::




Custom Search