The Hexadecimal Number System
The Hexadecimal number system has a base of 16 derived from it's name, hex meaning 6 and decimal meaning 10. Seeing where we cannot count to 15 using single digits, we use a combination of digits and letters, 0 through 9 plus letters A through F. The letters A through F , take on assigned decimal values of 10 through 15, respectively. Therefore, we have 0 through F or 0 through 15 respectively. Normally, the characters are written as follows: A hex or Ah, which indicate that they are characters in the hexadecimal code.
The Hexadecimal number system is derived from four(4) bit binary numbers. Generally, the hexadecimal numbers are used to define an address in the memory of a computer. They will be grouped in four bit clusters such as: A2BFh. Each position having a multiple wieght of 16. Therefore, the first column is times 1, the second column is times 16, the third column is times 256 and the fourth column is times 4096.
In the tables below, you will find the hexadecimal numbering system and the numbers the characters the represent. The first table shows the base structure and how to convert a Binary number to Hexadecimal. The second table shows examples of the address format with solutions.
Hexadecimal Conversion from Binary to hex or Base 16
Decimal # | Binary Number | Totals |
---|
-------- | 8's | 4's | 2's | 1's | -------- |
0 | 0 | 0 | 0 | 0 | 0+0+0+0=0 |
1 | 0 | 0 | 0 | 1 | 0+0+0+1=1 |
2 | 0 | 0 | 1 | 0 | 0+0+2+0=2 |
3 | 0 | 0 | 1 | 1 | 0+0+2+1=3 |
4 | 0 | 1 | 0 | 0 | 0+4+0+0=4 |
5 | 0 | 1 | 0 | 1 | 0+4+0+1=5 |
6 | 0 | 1 | 1 | 0 | 0+4+2+0=6 |
7 | 0 | 1 | 1 | 1 | 0+4+2+1=7 |
8 | 1 | 0 | 0 | 0 | 8+0+0+0=8 |
9 | 1 | 0 | 0 | 1 | 8+0+0+1=9 |
10 | 1 | 0 | 1 | 0 | 8+0+2+0=10=A hex |
11 | 1 | 0 | 1 | 1 | 8+0+2+1=11=B hex |
12 | 1 | 1 | 0 | 0 | 8+4+0+0=12=C hex |
13 | 1 | 1 | 0 | 1 | 8+4+0+1=13=D hex |
14 | 1 | 1 | 1 | 0 | 8+4+2+0=14=E hex |
15 | 1 | 1 | 1 | 1 | 8+4+2+1=15=F hex |
Hexadecimal Address Examples (hex or Base 16)
Decimal # | 4096's | 256's | 16's | 1's | Totals |
0 | 0 | 0 | 0 | 0 | 0+0+0+0=0 |
15 | 0 | 0 | 0 | F | 0+0+0+15=15 |
16 | 0 | 0 | 1 | 0 | 0+0+16+0=16 |
512 | 0 | 2 | 0 | 0 | 0+0+512+0=512 |
3899 | 0 | F | 3 | B | 0+3840+48+11=3899 |
250 | 0 | 0 | F | A | 0+0+240+10=250 |
4096 | 1 | 0 | 0 | 0 | 4096+0+0+0=4096 |
65535 | F | F | F | F | 61440+3840+240+15=65535 |
4369 | 1 | 1 | 1 | 1 | 4096+256+16+1=4369 |
427 | 0 | 1 | A | B | 0+256+160+11=427 |