Converting a binary number to HEX is remarkably easy, once you know the simple method. Sorry folks, no memorization of long tables here, or trying to memorize answers from supposed questions from braindumps.
First we need to start with an octet like in the example.
Using the following table we can see that this octet totals 166, by adding the following: 128+32+4+2=166.
Go ahead and get the calculator out, I'm in no big hurry.
| 128 |
64 |
32 |
16 |
8 |
4 |
2 |
1 |
| 1 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
Now lets see what the HEX number is. Notice the following table. I broke the octet into 2 parts. These are called nibbles, and a HEX number represents 4 bits, because that is all the computer can understand, 0's and 1's.
| 8 |
4 |
2 |
1 |
8 |
4 |
2 |
1 |
| 1 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
Using the above table we see the left nibble adding up to 10, and the right nibble totaling 6.
Octet
| Nibble |
Nibble |
| 8 |
4 |
2 |
1 |
8 |
4 |
2 |
1 |
| 1 |
0 |
1 |
0 |
0 |
1 |
1 |
0 |
With the 2 nibbles at hand, lets find the HEX number.
The left side nibble (4 bits) totaled 10 in decimal, and the right side nibble is equal to 6 in decimal.
Using our decimal to Hex conversion table we can see that:
- The left nibble is equal to an 'A'
- The right nibble is equal to a '6'
- So our hex number is 'A6h'.
Decimal to Hex conversion table.
| HEX |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
A |
B |
C |
D |
E |
F |
Dec. |
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
On page 2 we can see the one that always seems to stump students.
Next Page
Copyright ©2002-2006 Testbusters.net. All Rights Reserved.
Testbusters.net is not sponsored, endorsed or affiliated by any associated vendor.
Associated venders include, but are not limited to, Microsoft®, Cisco®, CompTIA®, Novell® etc.