- Posts: 38
- Thank you received: 0
Decimal to Hexadecimal
20 years 2 months ago #5597
by sLz
Decimal to Hexadecimal was created by sLz
Hi,
I've been reading up on some guides to find the easier possible way to convert Dec to Hex and back again, I just wondered if any of the experianced people here (or anyone else of course) have any adverse ways of converting from base10 to base16 and vice versa.
Thanks. Adam.
I've been reading up on some guides to find the easier possible way to convert Dec to Hex and back again, I just wondered if any of the experianced people here (or anyone else of course) have any adverse ways of converting from base10 to base16 and vice versa.
Thanks. Adam.
20 years 2 months ago #5600
by TheBishop
If you're working in Windows, use the calculator. If you switch it from normal into scientific mode then you'll find a set of radio buttons for decimal, hex, binary etc. Click the appropriate one then type in a value. Click one of the others and, courtesy of Mr Gates, instant conversion! Be warned however, those spoilsports from Cisco turn the calculator OFF on the machines they use to test CCNA...
20 years 2 months ago #5610
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Replied by sahirh on topic Re: Decimal to Hexadecimal
Actually Hex as a numbering system is very easy to convert to when you work with it often...
You'll find that lots of programmers, and packet heads can convert to hex just by looking at the numbers because you'll get used to seeing certain patterns...
The best way is to start counting in hex
Jokes aside, this really works..
You'll find that lots of programmers, and packet heads can convert to hex just by looking at the numbers because you'll get used to seeing certain patterns...
The best way is to start counting in hex
Jokes aside, this really works..
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
20 years 1 month ago #5886
by ELOI
Replied by ELOI on topic Re: Decimal to Hexadecimal
Hello....To manually convert hexa to decimal.. you have to change the hexa first to binary, den binary to decimal.
For hexa you must remember that you are using four bits. Below are the binary conversion for hexa:
0000=0 0101=5 1010=A 1111=F
0001=1 0110=6 1011=B
0010=2 0111=7 1100=C
0011=3 1000=8 1101=D
0100=4 1001=9 1110=E
please follow below steps.
ex: hexa B7 convert to decimal
1. we will treat each character separately
***for B the value of this in binary is (please refer above)
B (hexa) = 1011
***for 7 the value of this in binary is (please refer above)
7 (hexa) = 0111
2. Now you have to write this conversion down:
B7 = (1011)(0111)
= 10110111 (this is now the binary conversion of the B7)
3. Now convert this binary to decimal
10110111 = 183
4. B7 (hexa) = 183 (decimal)
this is quite long... hope this helps.
For hexa you must remember that you are using four bits. Below are the binary conversion for hexa:
0000=0 0101=5 1010=A 1111=F
0001=1 0110=6 1011=B
0010=2 0111=7 1100=C
0011=3 1000=8 1101=D
0100=4 1001=9 1110=E
please follow below steps.
ex: hexa B7 convert to decimal
1. we will treat each character separately
***for B the value of this in binary is (please refer above)
B (hexa) = 1011
***for 7 the value of this in binary is (please refer above)
7 (hexa) = 0111
2. Now you have to write this conversion down:
B7 = (1011)(0111)
= 10110111 (this is now the binary conversion of the B7)
3. Now convert this binary to decimal
10110111 = 183
4. B7 (hexa) = 183 (decimal)
this is quite long... hope this helps.
20 years 1 month ago #5905
by tfs
Thanks,
Tom
Replied by tfs on topic Re: Decimal to Hexadecimal
And in case you don't know how to convert Binary to Decimal
[code:1]
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 (just keep doubling)
1 0 1 1 0 1 1 1 (The binary)
[/code:1]
Now add up the columns that have 1's in them and forget the 0 columns and you have
128 + 32 + 16 + 4 + 2 + 1 = 183
Just to finish it up.
[code:1]
128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 (just keep doubling)
1 0 1 1 0 1 1 1 (The binary)
[/code:1]
Now add up the columns that have 1's in them and forget the 0 columns and you have
128 + 32 + 16 + 4 + 2 + 1 = 183
Just to finish it up.
Thanks,
Tom
Time to create page: 0.126 seconds