Vocademy

Hexadecimal Numbers

Binary numbers are great for noting what computers do, but they can still become unwieldy. We often use another numbers system that notes binary numbers in a bit more human-friendly manner. This is the hexadecimal number system. Why yet another number system. What would you rather write, 1010110111001001 or ADC9? The second number is hexadecimal for the first. You may think this just makes things harder, but converting binary to hexadecimal, and vice versa in your head is very easy. All you have to learn is 16 hexadecimal digits, and their binary equivalents. Rather than invent new symbols for hexadecimal numbers, we use 0 through 9 for the first ten, then the letters A through F for the last six. Here they are:

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

Hexadecimal to Binary Conversion

Now let's tackle that crazy binary number. First, break the binary number into groups of four:

1010 1101 1100 1001

Now, look at the conversion chart, and convert each group into its hexadecimal equivalent:

1010 1101 1100 1001
A D C 9

And there's your conversion, ADC9. With a little practice, it becomes easy. I remember way back in my digital electronics class, a few years after Grok invented the counting stick, students would program an NCR Model 605 computer. This computer was programmed by setting binary numbers into a set of 16 rocker switches on a diagnostic panel.

 
An NCR 605 diagnostic panel. Nothing but LEDs and rocker switches[1].

A student would write a program by looking up each operation in a code manual. He would end up with a list of hexadecimal numbers that represented the program as it was stored in memory. He would call the hexadecimal numbers out as another student converted them in his head to binary, and flipped the rocker switches accordingly. Once the program was in memory, he would flip some more switches to tell the computer where the program was in memory, then press the "Execute" switch. The results of a program would show up in a row of LEDs above the rocker switches. If the program added the numbers 2 and 2 (10 and 10 in binary), and the program ran successfully, the third LED from the right would light up. Wow.

—————————
1Image credit: http://www.geocities.ws/NCR605/Page2.html
Vocademy