Theory of Binary to Decimal and Hexadecimal Conversion
This article will make you understand the differences between binary, decimal and hexadecimal values and will tell you how to convert one format values into the other’s values according to the CCNA 640-802 Cisco Certified Network Associate’ course detail 2011. I am starting from the binary numbering. The digits used are limited to either a 1 (one) or a 0 (zero) and each digit is called 1 bit (short for binary digit). Normally we count either 4 or 8 bits together, these referred to as a nibble and a byte correspondingly. The decimal value format represents the attention to the binary numbering. The decimal format based on 10 numbers. The binary numbers are put in a value speck: start from right and move to left with every speck have the double value of the previous speck.
Binary Values
Nibble Values Byte Values
8 4 2 1 128 64 32 16 8 4 2 1
It shows the decimal values of each bit location in a nibble and a byte.
Nibble
If “1” digit is put in a value speck then the nibble or byte acquires on that decimal value and adds it to any other value specks which have “1”. But if “0” is put in a value speck we will not count that value. Let me explain, if we put 1 in every speck of nibble (1111), we then add up 8 + 4 + 2 + 1, to obtain a maximum value of 15. Another example of nibble values 1010, its means 8 bit and 2 bit are turned on and we can get the decimal value of 10. One more example, nibble binary value of 0110, 4 and 2 bits are turned on, so we shall find the decimal value of 6.
Byte
Another sight, the byte values add up to higher than 15. Let me explain this also, if we count each bit as “1” in a byte (11111111), we shall get the decimal value of 128+64+32+16+8+4+2+1 = 255. This is a maximum value of a byte. I want to explain it more deeply, so binary value 01010110, it shows that the 64 16 4 2 bits are on in this value and if we shall add them, we shall find this 64 + 16 + 4 + 2 = 86, which is equal to the binary value of 01010110. Another way of practice, find the binary value of this: 128, 16, 4 and 2 bits are turned on, and we can find the binary value of 10010110 and decimal value of 150.
To memorize in more efficient way, you must practice it again and again with different values in both above mentioned methods. The following table will help you and you should memorize it.
Binary to Decimal Memorization Chart
| Binary Value | Decimal Value |
| 10000000 | 128 |
| 11000000 | 192 |
| 11100000 | 224 |
| 11110000 | 240 |
| 11111000 | 248 |
| 11111100 | 252 |
| 11111110 | 254 |
| 11111111 | 255 |
Hex / Hexadecimal
“Hex” is short for hexadecimal. This is a numbering system which uses the first six letters of the alphabet “A to F” to enlarge the accessible 10 digits of the decimal value. So, Hex / Hexadecimal value has total 16 digits.
Hexadecimal values are totally different from the binary or decimal. We can get Hex values by reading only nibbles. It is not complicated; we can easily convert the nibble value to hex. At the start, we have to understand that hexadecimal addressing scheme uses only the numbers 0 through 9. While the values of 10, 11, 12, 13, 14, 15 and 16 cannot be used because of two number digits, so we can use the alphabet letters A, B, C, D, E and F instead of two numbers digits, correspondingly.
You will find the binary and decimal value for each hex octet in the following table.
Hex to Binary to Decimal Chart
| Hexadecimal Value | Binary Value | Decimal Value |
| 123456789
A B C D E F |
000100100011010001010110011110001001
1010 1011 1100 1101 1110 1111 |
123456789
10 11 12 13 14 15 |
I am sure; you have noticed that the first 10 hex values “0 to 9” are same as the decimal values. For example, if we have this hex value: “0x9B”. “Ox” in front of each hex value represents that this is a hex value and moreover it does not have any other meaning. You must have to memorize that each hex character is a nibble and two hex characters together make a byte. To discover the binary value, we have to set the hex characters into two nibbles and then set them together into a byte. 9 = 1001 and B (11 in hex) = 1011, so we can find the full byte in these bits 10011011. And if we want to convert from binary to hex, we just have to break the byte into nibbles. Let me demonstrate, I have the binary number 10011011. First, I break it into nibbles 1001 and 1011. In first nibble I get the value of 9 since the 1 and 8 bits are on, and in the second nibble, I get the Value of 11 (B in hex) because the 1, 2 and 8 bits are on. And I get the 0x9B hex value. While the decimal value would be 155, because the binary number is 10011011, that converts to 128 + 16 + 8 + 2 + 1 = 155.
We have covered in this article that how to convert hexadecimal to binary and to decimal values according to the CCNA 640-802 Cisco Certified Network Associate’ course detail.
This is a good resource for people wishing to learn binary and hexadecimal.
Rob
September 12, 2011 at 05:45
Thank you Rob
Learn
September 14, 2011 at 09:26
My brother recommended I might visit this blog to seeking binary to hex conversion.
He was totally right. This post actually solved my problem, I was getting mad, I never could understand the method of decimal conversion to binary and to hexadecimal.
You can not imagine just how much time I had spent for this information!
Thanks!
the diet solution
February 18, 2013 at 17:39