Introduction to the Hexadecimal Numbers: A How to Guide

Last Modified:

Hexadecimal System

The hexadecimal system, or base-16, is another way to represent numbers using 16 unique symbols:

\[\mathsf{0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F}\]

After the digits \(\mathsf{0}\) through \(\mathsf{9}\), the letters \(\mathsf{A}\) to \(\mathsf{F}\) represent values from \(\mathsf{10}\) to \(\mathsf{15}\). So:

  • \(\mathsf{A=10}\)
  • \(\mathsf{B=11}\)
  • \(\mathsf{C=12}\)
  • \(\mathsf{D=13}\)
  • \(\mathsf{E=14}\)
  • \(\mathsf{F=15}\)

The base of a hexadecimal number system is \(\mathsf{16}\). A hexadecimal number is typically represented by adding \(\mathsf{16}\) or \(\mathsf{H}\) in the subscript, that is, \(\mathsf{2A_{16}=2A_{H}=2A}\) in hexadecimal.

Building Multi-Digit Hexadecimal Numbers

As in other number systems, we form larger numbers by combining these digits, and each position has a place value based on powers of \(\mathsf{16}\):

\[\mathsf{16^0,16^1,16^2,16^3,\dots}\]

Just like in the decimal, binary and octal systems, we combine hexadecimal digits to build larger numbers.

  • After \(\mathsf{F}\), we move to the next number: \(\mathsf{10_{16}}\) (which means sixteen in decimal).
  • Similarly, after \(\mathsf{FF_{16}}\) comes \(\mathsf{100_{16}}\).

In general, the hexadecimal system follows the same positional pattern—each place increases in weight by a power of \(\mathsf{16}\), allowing efficient representation of large values.

Fractional Values in Hex

To represent fractions, we use a hexadecimal point (similar to a decimal or binary point). Digits to the right of the point have negative powers of \(\mathsf{16}\):

\[\mathsf{16^{-1},16^{-2},16^{-3},\dots}\]

Why is Hexadecimal Important?

Hexadecimal is widely used in computer science and programming — especially for:

  • Representing binary data more compactly (since \(\mathsf{2^4=16}\), one hex digit = four binary bits).
  • Writing memory addresses, color codes, and machine instructions.
    • Example: HTML color #FF5733 — each pair of hex digits represents a color channel.

Can we Convert Hexadecimal Numbers to Other Systems?

Of course, we can. In order to learn to convert numbers between different systems, go directly to the conversion between numbers.