Cisco Networking: Converting Binary to Base 16 (Hexadecimal)
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 Value||Hexadecimal Value|
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:
Choose Start→All Programs→Accessories→Calculator.
The Calculator opens.
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.
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.
Type a number and select the Hex, Dec, Oct, or Bin radio button to see the equivalent value.