Cisco Networking: Converting Binary to Base 16 (Hexadecimal)

By Edward Tetz

The conversion of binary to Base 16 (hexadecimal) is easier than the binary to decimal conversion. The strangest thing about hexadecimal is that there are more than just ten numbers (zero to nine), so you need to use the following extra characters: A (10), B (11), C (12), D (13), E (14), and F (15) with each sequentially representing the extra values.

The easiest way to do the conversion is to again break the binary number in groups. Use the same binary number from earlier sections, 11010011; however, this time, break it into groups of four digits: 1001 and 0011. Each group easily converts into a hexadecimal number between 0 and 15, or 0 and F.

Your results should be 13 (from 1001) and 3 (from 0011), so the hexadecimal number is D3. Table 3-6 helps you with these hexadecimal conversions.

Binary to Hexadecimal Conversions
Binary Value Hexadecimal Value
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F

Hexadecimal to binary migration is fairly simple. Convert each digit to binary and then concatenate (or join then sequentially end-to-end) the numbers (remember to include all leading zeros). For example, break 9C into 9 and C, and then convert each to binary, yielding 1001 and 1100. The binary number is then 10011100.

The Windows Calculator is capable of making this conversion for you. To launch the Windows Calculator in Scientific view:

  1. Choose Start→All Programs→Accessories→Calculator.

    The Calculator opens.

  2. Choose View→Scientific (or View→Programmer if you are using Windows 7).

    You can also enable Digit Grouping from the View menu to make reading values easier.

  3. To convert from one number system to another, select the Hex, Dec, Oct, or Bin radio button.

    For example, to enter a hexadecimal number and convert it to binary, select the Hex radio button. The hexadecimal keys at the bottom of the keyboard are enabled.

  4. Type a number and select the Hex, Dec, Oct, or Bin radio button to see the equivalent value.