![]() | |
| | #1 (permalink) |
| New Member HSC: 2009 Gender: Male
Join Date: Mar 2009
Posts: 12
Last Activity:
16 Dec 2009, 8:56 PM ![]() | IEEE 754 single precision FPS You can hide this advertisement by registering. hey guys,I really need some help, apparently this can be in our trial exam, and our teacher hasn't taught it to us, aka, he can't teach it to us. Here is the question: The following sequence of hexadecimal digits is found at a specific address in memory: C1 D1 00 00 This memory address contains the value of a floating point variable represented using standard IEEE single precision FPS Format. Determine the decimal value of this variable. Show all working. If someone could help us out with how to do this, + working, that would be great. Cheers. |
| | |
| | #2 (permalink) | |
| Member HSC: 2009 Gender: Male
Join Date: Feb 2008
Posts: 134
Last Activity:
27 Feb 2010, 9:33 PM ![]() | Re: IEEE 754 single precision FPS Quote:
First convert the hexadecimal digits into binary nibbles (groups of four) C = 1100 (12) 1 = 0001 D = 1101 (13) 1 = 0001 0 = 0000 0 = 0000 0 = 0000 0 = 0000 write out the binary string in floating point format (single precision 32 bit) 1 bit sign bit, 8 bit exponent, 23 bit mantissa 1 10000011 10100010000000000000000 from now, you convert into decimal as you normally would with floating point numbers, using this formula: (2^exponent - 127) * mantissa 2^10000011 - 01111111 2^131 - 127 2^4 16 16 * mantissa 16 * 1.1010001... 16 * (1 + 1/2 + 1/8 + 1/128) I can't do this without a calculator -_- 16 * 1.6328125 26.125 (base 10) is the number BUT REMEMBER - the sign bit was 1 -26.125 is the final answer (I hope this helps and I hope it's right, sorry for late reply you've already done trials) | |
| | |
| | #3 (permalink) |
| New Member HSC: 2009 Gender: Male
Join Date: Mar 2009
Posts: 12
Last Activity:
16 Dec 2009, 8:56 PM ![]() | Re: IEEE 754 single precision FPS That's alright, cheers mate, that helps tonnes, I'm in the process of working out how to do the after decimal conversion without a callculator... Thanks for the Help |
| | |
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
| |