Bored of Studies  

Go Back   Bored of Studies > Secondary Education > New South Wales (HSC) > Technology > Software Design & Development > Option: Software Developer's View of Hardware

Reply
 
LinkBack Thread Tools Rate Thread
Old 19 Aug 2009, 7:41 PM   #1 (permalink)
New Member
 
HSC: 2009
Gender: Male
 
Join Date: Mar 2009
Posts: 12
 
Last Activity:
16 Dec 2009, 8:56 PM
 
JigglyJims is on a distinguished road
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.
JigglyJims 当前离线   Reply With Quote
Old 7 Oct 2009, 8:09 PM   #2 (permalink)
Member
 
lolrofllol's Avatar
 
HSC: 2009
Gender: Male
 
Join Date: Feb 2008
Posts: 134
 
Last Activity:
27 Feb 2010, 9:33 PM
 
lolrofllol is on a distinguished road
Re: IEEE 754 single precision FPS

Quote:
Originally Posted by JigglyJims View Post
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.

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)
lolrofllol 当前离线   Reply With Quote
Old 7 Oct 2009, 11:09 PM   #3 (permalink)
New Member
 
HSC: 2009
Gender: Male
 
Join Date: Mar 2009
Posts: 12
 
Last Activity:
16 Dec 2009, 8:56 PM
 
JigglyJims is on a distinguished road
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
JigglyJims 当前离线   Reply With Quote
Reply

Bookmarks

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +11. The time now is 4:19 PM.


Powered by vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0