Quick Tutoral on Converting to Hexadecimal!

balcobulls

Beta member
Messages
1
Location
Arizona USA
I am new here so I believe I need to contribute something even if it is something small. So Hex it is!
First off, why in the heck do you need to know how to convert into hexadecimal? The answer is....it depends.
Do you think you might be sniffing networks one day? Or maybe you sniff networks already but do not really care about the hexadecimal displayed at the bottom of Wireshark? My goal is to take five minutes or less of your time and teach you a very simple conversion that most people avoid.
Let's start!

  • I am going to pick a random number.......lets say 1154

  • Now the number 16 is very very very very important for hex, you will see why. (16, in case you forgot the number already)

  • 1154 will be divided by 16
(don't worry I have a calculator so I'll do the math)

  • Answer = 72.125

  • The magic comes with the "remainder not the actual result." So lets take the 72 and put it aside for a second, we are going to focus on the .125
(remember that 16 number? Told ya its important)

  • .125 will be multiplied by 16

  • Answer = 2
(if you haven't already, open up the attachment named "Hex Table.doc")

  • 2= 2 in hex

  • Now we will bring back the 72, we will now continue to divide this number by 16
  • Answer = 4.5
(Remember we will stash 4 away for a few moments and only worry about the .5)

  • .5 x 16 = 8
  • 8 in hex = 8
(We will now bring that 4 back into the picture)

  • 4 / 16 = .25
(Now we do not have to worry about any whole numbers only the decimal)

  • .25 x 16 = 4
  • 4 in hex = 4
(Now from all of these equations, to make sure all of your work is correct, you will read from your MOST RECENT answer to the VERY FIRST answer you received)

  • Most recent answer we got in hex was 4,
  • Previous to that 8
  • And our first hex answer was 2
Drum roll please................................
1154 in hexadecimal is 482
Its that easy! If you have not opened the attachment, FYI any hex equivalent after you get above the number 9 turns into a letter. Example Below:
1=1
2=2
3=3
4=4
5=5
6=6
7=7
8=8
9=9
10=A
11=B
12=C
13=D
14=E
15=F
(15 is the highest you can go when it comes to hex)

I hope this didn't take more than five minutes like I advertised at the beginning, if so...I'm kinda sorry.

Now go about your day and go brag to your friends that you know hex:angel:
 

Attachments

  • Hex Table.doc
    30 KB · Views: 0
To be honest, I think I can translate bin-hex-dec much more quickly by hand than by going through that process.
 
Had to convert to hex all the time for tests in school by hand. And binary. And binary -> hex. And vice versa lol.

Oh and had to convert to floating point representation of binary. That was a PITA.
 
Had to convert to hex all the time for tests in school by hand. And binary. And binary -> hex. And vice versa lol.

Oh and had to convert to floating point representation of binary. That was a PITA.

But thats your interest, all the programming blah blah stuff :cool:
 
Converting values by hand isn't in my interest ;). Not like I have to deal in Hex/binary really anyway since I'm primarily a .NET dev. Maybe if I were doing things closer to the hardware, like with C/C++ I may have to deal with hex occasionally.
 
But thats your interest, all the programming blah blah stuff :cool:

It's very useful to know for digital forensics, too. It's fundamental to a lot of technical fields which is why pretty much any STEM degree that involves computers will include it in the first year.
 
It's very useful to know for digital forensics, too. It's fundamental to a lot of technical fields which is why pretty much any STEM degree that involves computers will include it in the first year.

I know its needed - I have to use for reg tweaks or incorrect hex, but just saying you can just use a converter.. but of course its good to know how to calc, like i said in my first post :cool:
 
Back
Top Bottom