The Base 16, or hexadecimal, number
system is used frequently when working with computers, since it can be
used to represent binary numbers in a more readable form. The computer
performs computations in binary, but there are several instances when
the computer binary output is expressed in hexadecimal to make it easier
to read. The most common way for computers and software to
express hexadecimal output is using "0x" in front of the
hexadecimal number. Whenever "0x" is seen, the number that
follows is a hexadecimal number. For example, 0x1234 means 1234 in
Base 16.
Base 16 uses 16 characters to express numerical quantities. These
characters are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. An
"A" represents the decimal number 10, "B"
represents 11, "C" represents 12, "D" represents
13, "E" represents 14, and "F" represents 15.
Examples of hexadecimal numbers are 2A5F, 99901, FFFFFFFF, and EBACD3.
A number such as B23CF (hexadecimal) = 730063 (decimal).
The traditional conversion between decimal and hexadecimal is
outside the scope of this course. However, later in this chapter some
shortcuts for conversion to any base, including decimal and
hexadecimal, will be discussed.
|