Good TRICK question... decimal numbers are not stored in memory as hexidecimal, they are stored in 32-bit or 63-bit binary registers. Respctively, these registers store "single" or "double" precision numbers where the first bit is the sign bit, the next 7 bits store the precision, and the final 24 or 56 bits store the number as an integer.
Answering your question would take a bit of explanation (see sources listed below)... but the answer is 429C8312 and 405390624DD2F1AA respectively.
2007-07-31 08:01:54
·
answer #1
·
answered by Sam 4
·
0⤊
0⤋
78.256 decimal = 4e.419 hexadecimal
First you find the largest power of 16 that "fits" into your number. That is 16, and it fits in 4 times. So, the sixteens place gets a 4 in it.
Now subtract 4*16 from your number, leaving you with 14.256. The largest power of 16 that fits into this is 16^0, which equals 1. It fits in 14 times. 14 = e in hexadecimal, so the ones place gets an e.
Now subtract 1*14 from your number, leaving you with 0.256. The largest power of 16 that fits into this is 16^(-1), which equals 0.0625. It fits in 4 times. So, our 1/16 place gets a 4.
Now subtract 4*(1/16) from your number, leaving you with 0.006. The largest power of 16 that fits into this is 16^(-2), which equals 0.00390625. It fits in 1 time. So our 1/256 place gets a 1.
Continue this for the last digit and you should get a 9, leaving you with 4e.419.
2007-07-31 14:37:46
·
answer #2
·
answered by lithiumdeuteride 7
·
0⤊
0⤋