Introduction To The Hexadecimal Numeric System - (Part 2) Hexadecimal Characterisitcs

By: Daniel Imbellino
Updated: Feb 21, 2013

Working with the Hexadecimal system you may come across a "0x" that is prefixed to a hex number such as this 0x4C2A The "0x" is put there to help users identify the value as being a Hex value. OK, so we converted a Hexadecimal value to Decimal, but what if we wanted to convert our Hex value to binary or vice versa. Lets convert a Hex value of 0x73AB to Binary to start (remember 0x means hex and is just an identifier, not part of the actual number. The easiest way to convert from Hex to Binary is to break up each Hex value into "nibbles." Nibble means 4 bits, and we are going to break up each of our Hex values to a 4bit Binary value. Our Hex value is 73AB, so we will start with the 7. What is 7 in binary? It is 0111. Now we are going to convert 3 to Binary and it is 0011. Now before we convert the others we need to truncate these two values together starting with the "high order" bits, which means place our value of 7 (0111) as the first value, and place the other values we resolve to binary nibbles to the right of it. So far we have resolved 7 and 3, or 0111 and 0011. Combining these two values we have 01110011. Now we convert the A (10) to Binary, which is 1010, and the B (11) to Binary, which is 1011. Now we just put all four sets of binary values in the same order from right to left, giving us 01110011101010112 which = 73AB16

Now if we had the Binary value we just obtained (0111001110101011) and we needed to know its Hex equivalent we could easily convert it back to Hex by reversing our operations and dividing up the Binary value into sets of 4bits and converting each set to its Hex equivalent. On the last page we took a Hex value and converted it to Decimal, but another way we can convert our Hex value to Decimal would be to convert to Binary and then convert the Binary value to Decimal. See, number systems are all interchangeable in some way.