


Hexadecimal convertions
Started by Coolman, Aug 31 2006 08:48 PM
8 replies to this topic
#1
Posted 31 August 2006 - 08:48 PM
Hey can someone please tell me a easy way of converting decimal number to hexadecimal numbers and vice versa, thanks

#2
Posted 31 August 2006 - 10:29 PM
same method as going from decimal to binary but instead of dividing by 2 you divide by 16
If i am not here i am somewhere else
#5
Posted 01 September 2006 - 03:03 PM
but you will john in a few weeks time

If i am not here i am somewhere else
#7
Posted 02 September 2006 - 05:33 PM
maybe but the problem with doing that is you are doing extra conversions by hand which, with me anyway, tends to lead to more errors
If i am not here i am somewhere else
#9
Posted 05 September 2006 - 02:29 PM
Ok the definitive guide to converting Hexadecimal numbers!
What you need to remember is that hexadecimal uses the following :-
0 1 2 3 4 5 6 7 8 9 A(for 10) B(for 11) C(for 12) D(for 13) E(for 14) F(for 15).
Example 1
Convert HEX A90B into it's binary equivalent
Ok, break the number into the four parts A, 9, 0 and B.
Write down the 4 bit binary for these digits - A is 1010 (Since this represents 10), 9 is 1001, 0 is 0000, and B (Since this represents 11) is 1011.
The number A90B (hex) is then 1010 1001 0000 1011 (base 2/ binary).
Example 2
Convert Hex A13B into decimal
This is really quite simple, all you do is :-
(10)(16 x 16 x 16) + (1)(16 x 16) + (3)(16) + (11)(1)
= 41275 (Decimal)
Example 3
Convert 41275 into HEX.
41275 / 16 = 2579 r 11 (B in hex)
2579/16 = 161 r 3
161/16 = 10 r 1
10/16 = 0 r 10 (A in hex)
Then simply read the remainders up the way and you get A13B, which is the number in HEX.
Incase anyone else is wanting to know the wonders of converting Hex!
What you need to remember is that hexadecimal uses the following :-
0 1 2 3 4 5 6 7 8 9 A(for 10) B(for 11) C(for 12) D(for 13) E(for 14) F(for 15).
Example 1
Convert HEX A90B into it's binary equivalent
Ok, break the number into the four parts A, 9, 0 and B.
Write down the 4 bit binary for these digits - A is 1010 (Since this represents 10), 9 is 1001, 0 is 0000, and B (Since this represents 11) is 1011.
The number A90B (hex) is then 1010 1001 0000 1011 (base 2/ binary).
Example 2
Convert Hex A13B into decimal
This is really quite simple, all you do is :-
(10)(16 x 16 x 16) + (1)(16 x 16) + (3)(16) + (11)(1)
= 41275 (Decimal)
Example 3
Convert 41275 into HEX.
41275 / 16 = 2579 r 11 (B in hex)
2579/16 = 161 r 3
161/16 = 10 r 1
10/16 = 0 r 10 (A in hex)
Then simply read the remainders up the way and you get A13B, which is the number in HEX.
Incase anyone else is wanting to know the wonders of converting Hex!

Mark
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users