Converting from decimal to hex
Going from hex to denary is relatively easy after you've done a few of them. You have to think a little bit harder going the other way, from denary to hex. But there is a great trick you can use - if you can use binary.
Binary and hex are actually very closely related, much more so than first appears. Each hex digit is just a group of four bits!! As long as we can do binary to denary conversion off the top of our heads, there is a method for converting denary to hex (and also back again) very quickly. See if you can follow this example. We are going to convert 12510 into a hex number.
Step 1 - convert 12510 into binary.
|This is 7 in denary||This is 13 in denary|
|This is 7 in Hex||This is D in Hex|
You should always check the Hex answer you got. 7D16 = (7x16) + (13 x 1) = 12510 our answer is correct.
(Of course, you could always check your answer using a calculator! In Windows, Go to WINDOWS - ACCESSORIES - CALCULATOR - VIEW - SCIENTIFIC).
Step 1 - convert 7510 into binary.
|This is 4 in denary||This is 11 in denary|
Step 4 - Now convert each of the two decimal numbers into the Hex numbering system.
|This is 4 in denary||This is 11 in denary
|This is 4 in Hex||This is B in Hex|
7510 is 4B16
You should always check the hex answer you got. 4B16 = (4 x 16) + (11x 1) = 7510 so our answer is correct. This may seem a little long-winded to start with, but this method is very mechanical and always works. Once you've done a few, you'll be an expert. Besides, it's good practice for binary conversion!
Q1. Convert these numbers into their denary form: a) 3616 b) 316 c) FA16 d) 1516
Q2. Convert these decimal numbers into hex: a) 10310 b) 1410 c) 5810 d) 710
Q3. Why are nibbles important when using hex?