Uploaded by Esteban Lopez

Adobe Scan Sep 14, 2021 (1)

advertisement
2.2. HEXADECIMAL (BASH-16) NUMBERS
2.2
21
Hexadecimal (Base-16) Numbers
In addition to binary. base-16 numbhers are often used in digilal systems design. Base-16 is also rcferred to as hex-
adecimal, or hex for short. In the case of hex, we need additional digils beyond (0
6 different digits (0
9. For hasc-6 numbers we use
5), and for basc-10 numbers we use 10 digils (0-9). For base-16 we need 16 digits- whal
should be used for the other digits? The convention chosen 1s lo use the letlers A-F for thesc. Table 2.1 shows the
digits
used in hexadecimal notation and the decimal
cquivalent
lor cach
digit.
Table 2.1: Hexadecimal Digits
Digit Symbol DecimalEquivalent
2
9
10
A
B
11
12
13
14
C
D
E
F
Using Table 2.1
as a
15
guide, the following is true:
A2F161x 16" +10 x 16 + 2 x 16 +15 x 16° = 4096 + 2560 +32 + 15 = 6, 70310
Additional examples include:
FF16
15 x 16' +15 x 16" = 25510
BEEF1611 x 16 + 14 x 16+ 14 x 16 +15 x 16 = 48,87910
The key point is that there is no difference between base-16 and any other buse-the only complication is the need
to remember the additional digits possible in a base-16 number.
There is a reason that base-16 is commonly used in digital systems. A 32-bit valuc in binary requires a 32-digit
word like this:
010000000000000000000000000000002 = 1 x 20 =1,073, 741,82410
Thus, when using 32-bit binary, one is required to keep track of 32 digits' worth of information. Base-16 has the
of 4 binary digits and wite
interesting characteristic that, sincc 16 is a power of 2, it is possible to simply take groups
down the basc-16 representation by inspection. An example is shown in Figure 2.3 for a l6-bit binary value.
0000101001101000
\
OA6816
Figure 2.3: Conversion Bctween Hexadecimal and Binary
Download