PC Hardware A Beginner’s Guide

(ff) #1

(^30) PC Hardware: A Beginner’s Guide


The Hexadecimal Number System


Another number system you should be aware of is the hexadecimal number system. Hex-
adecimal means six and ten or a base-16 number system. Since, after reading the preced-
ing section on binary numbers, you are now a number system expert, hexadecimal
should be a piece of cake for you.
Why hexadecimal? Good question! Many of the addresses and configuration values
you work with on the PC are expressed as hexadecimal numbers because very large
numbers can be expressed in fewer characters. Hex, as its friends call it, uses a combination
of 16 values: the decimal numbers 0 through 9 for the first 10 values and the six letters A
through F to represent the decimal values of 11–15 (see Figure 2-3).
Hexadecimal numbers can represent much larger numbers in the same number of
digits as a decimal number, but where a decimal number is stored in binary in 8, 16, 32, or
64 bits, each hexadecimal digit uses 4 bits. The four bits have the binary values ranging
from 2^0 in the right-most position and 2^3 in the left-most position. When all four bits have
a one, the total decimal value is 15 or the equivalent of the hexadecimal F. This four-bit bit
cluster is called anibbleand it can express the hexadecimal numerals 0–F.
Hexadecimal helps to solve the problem of how to store numbers like 11 or 15 as a
single character, which ultimately saves characters when working with large numbers.
You really don’t need to master hexadecimal to the point that you can readily convert it
back and forth to decimal, but you should have some idea of what a hexadecimal number
represents in terms of decimal values.
Our friendly number 101, which was one hundred and one in decimal and five in
binary, represents the decimal value 257 in hexadecimal. This illustrates how larger num-
bers can be stored in hexadecimal. Another example is that the hexadecimal value

Power of Two Calculation Decimal Equivalent
20 2 * 0 1
21 2 * 1 2
22 2 * 2 4
23 2 * 2 * 2 8
24 2 * 2 * 2 * 2 16
25 2 * 2 * 2 * 2 * 2 32
26 2 * 2 * 2 * 2 * 2 * 2 64
27 2 * 2 * 2 * 2 * 2 * 2 * 2 128

Table 2-1. Power of Two Values
Free download pdf