Question:
Hex to decimal conversion?....Decimal to hex conversion?
1970-01-01 00:00:00 UTC
Hex to decimal conversion?....Decimal to hex conversion?
Ten answers:
Art Student
2007-02-06 17:19:56 UTC
Well, it's actually not the most terrible thing to learn, fortunately. Basically, decimal is the system which you have grown to know since you were a child. It's base 10, which means you count 1, 2, 3, 4, 5, 6, 7, 7, 9, 10, then start from 1 again with 11, 12, 13 and so on.



Hex is different. It's base 16. No worries, you just count like this instead: 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F then you start doing 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F then 20, 21 and so on.



You can use your built-in Windows Calculator to enable scientific mode (View -> Scientific). This will allow you to type in a decimal number like 14, which will convert into Hex as E.



My age is 1A in Hex. What's yours?
2016-05-24 05:18:12 UTC
Rob is correct if you want to convert from hex (base 16) to dec (base 10). The zeros at the end of the hex number are placeholders. Just like how you learned to count. 1 is equal to 01 because the zero represents the ten's column and the 1 represents the one's column. But 01 is not equal to 10 because in the former the 1 is in the one's column and in the latter it in the ten's column. So 0x0C000000 is equivalent to 0x00C000000 or 0x000C000000 etc but 0x0C would be much less in value. The trailing zeros are what increasess the value of the number. If you want to convert hex to single precision floating point the conversion is similar. I assume single precision because you have 32 bits (the leading zero of 0C000000 is padding to indicate eight hex bits; 8*4 = 32) For 0x0C000000 to single precision floating point: 0 hex is 0 dec is 0000 binary C hex is 12 dec is 1100 binary so 0x0C000000 is 0000 1100 0000 0000 0000 0000 0000 0000 b which can be broken up into: 0 (the sign bit) 000 1100 0 (the exponent) 000 0000 0000 0000 0000 0000 (the mantissa) sign = 0 exponent = 24 mantissa = 0 The floating point number can be calculated by (-1 ^ sign) * 2 ^ (exponent - bias) * (1 + mantissa) where the bias for single precision is 127. So (-1 ^ 0) * 2 ^ (24 - 127) * (1 + 0) = (1) * 2 ^ (-103) * (1) = 9.8607613 E -32 Your other number 0xC4630000 (converting each hex bit to binary): 1100 0100 0110 0011 0000 0000 0000 0000 sign = 1 exponent = 100 0100 0 mantissa = 110 0011 0000 0000 0000 0000 sign = 1 exponent = 136 mantissa is a little more difficult. Each bit uses inverse incrementing powers of 2. Bit 23 has value 1/2 (i.e. 2^ -1), bit 22 has value 1/4 (i.e. 2^ -2) etc. So the mantissa is 2^-1 + 2^-2 + 2^-6 + 2^-7 = 0.7734375 So the floating point number is (-1 ^ 1) * 2 ^ (136 - 127) * (1 + 0.7734375) = (-1) * 2 ^ (9) * (1.7734375) = -908.0
Curiousity killed the caT
2007-02-08 09:52:57 UTC
from decimal to hex:

first you have to convert the decimal digits to binary (continuously dividing it by 2)



decimal 1 = binary 0001

decimal 2 = binary 0010

decimal 3 = binary 0011

and so on.. so that decimal 9999 = binary 10011100001111



after that you then turn the binary digits to hex.

just group the digits by 4 starting from the right (add 00's to leftmost digit if necessary to form 4 digit group) and convert the binary digits to hex:

hex 1 = 0001

hex 2 = 0010

hex 3 = 0011

hex 4 = 0100

hex 5 = 0101

hex 6 = 0110

hex 7 = 0111

hex 8 = 1000

hex 9 = 1001

hex A = 1010

hex B = 1011

hex C = 1100

hex D = 1101

hex E = 1110

hex F = 1111



so decimal 9999 = binary 10011100001111 becomes

0010--0111--0000--1111

--2-------7-------0-------F--

decimal 9999 = hex 270F



in order to change hex back to decimal, you just have to reverse the conversion.. it is a long process, and i strongly suggest you buy a scientific calculator. ehehehe.. also check these sites for additional information:



Good luck!
Kush
2007-02-07 01:20:03 UTC
21398 : 5393

8920 : 22D8

9999 : 270F

----above are some questions... of decimal to hex vales



2A63 : 10851

9FB1 : 40881

EF11 : 61201

----above are some hex to decimal values
Pete
2007-02-06 17:51:02 UTC
First you need to understand the decimal numbering system. In our every day system numbers have a "place value". In other words, the number 3 in the first column has a place value of three. If it's in the second column (also known as the tens column), it has a value of thirty; in the third column it has a value of three hundred and so on. So if you look at numbers in columns you have values, from right to left of 1,10,100,1000, 10000 and so on. These are the powers of ten: 10 to the zero power = 1, 10 to the first power = 10, 10 squared = 100, etc.

In hex the values are 1, 16, 256, 4096 and so on. These are the powers of 16. 16 to the zero power =1, 16 to the first power = 16, 16 squared=256, etc.

Where we have ten numbers in our every day system (0,1,2,3,4,5,6,7,8,9), there are sixteen numbers

in the hex system (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F). For some reason Yahoo will not show the F following the E unless you mouse over it.

Now imagine a column of numbers in the right most position. I hex,a 1 in that position would have a value on one (decimal), a 2 a value of two. So counting up,

0=0

1=1

2=2

3=3

4=4

5=5

6=6

7=7

8=8

9=9

A=10

B=11

C=12

D=13

E=14

F=15

10=16

11=17 And so on.

A one in the second column has a value of 16.



I hope this helps a little - it's too big a subject to cover in this forum. Try googleing "hexadecimal numbering system" and check www. wikepedia.com

http://www.the-eggman.com/seminars/about_hex.html

You can cheat here, but be sure you learn it later:

http://www.ronshardwebapps.com/Numbers.asp
Old guy 124
2007-02-06 17:36:14 UTC
the figures in a decimal number refer to the following columns

1000s 100s 10s 1s so 3874 works out to be

3 x 1000 + 8 x 100 + 7 x 10 + 4 x 1



to convert to hex with out a calculator you have to create a table for the values you would have

65536, 4096, 256, 16, 1

find the highest number that you can divide into your number you want to convert

in the example 3874

4096 is too big so divide by 256 gives you 15 with a remainder of 34

15 is F in hex from list of hex numbers 123456789ABCDEF

34 divided by 16 = 2 remainder 2

3874 decimal = F22 in hex



Good luck the calculator is easier but understanding how it works may help.
dragonfly2dreams
2007-02-06 17:22:07 UTC
www.webelfin.com



im not sure either how to convert -----but when my neice had this problem she went to this web site shown above and it helped her, in hopes this can help you also GOOD LUCK
bytekhan
2007-02-06 17:20:11 UTC
As much as I liked converted numbers between hex and decimal when I was wet behind the ears, the person who mentioned using a calculator is right. Use the one on the PC you are using now or find a website that will do it instantly.
juan_hillo_69
2007-02-06 17:15:40 UTC
just uses a scientific calculator
Gene M
2007-02-06 17:23:47 UTC
Use the built in windows calculator, change the view to scientific, and enter your decimal numbers, then click the hex button, the value in the entry field is your answer. Then do the opposite for the hex


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...