Need help with Microprocessor math

metroplex

Golden Member
Jul 24, 2001
1,064
0
71
I have to convert +2.75 (decimal) into 82-bit floating-point register notation as a single precision value in hexadecimal form.

Then I have to take that hex value and translate the value to Itanium single precision FP notation for storage in memory.

Where can I find a calculator or program that would do this? all the zeroes and 1's are making my eyes hurt.
 

metroplex

Golden Member
Jul 24, 2001
1,064
0
71
Yep. Its for a graduate class in Itanium (I'm taking it for undergrad credit) but for some reason I can never get this stuff right and figured there must be some way to do this via a program or calculator applet instead of by hand.
 

SuperTool

Lifer
Jan 25, 2000
14,000
2
0
Graduate class in Itanium? Sounds like a waste of time to have you study specific ISA. Sounds like something a trade school would do, not a university. Do you also have a graduate class on windows XP ;)
Anyways. 2.75=10.11b = 1.011e1b so just fill in the appropriate fields in the fp notation, and fill the rest up with zeros.
 

metroplex

Golden Member
Jul 24, 2001
1,064
0
71
This is what I have so far for the 82-bit part (can't figure out how to convert for storage in memory):

1.5 + 1.25 = +2.75
1.011 x 10+1b
Exponent biased by FFFFH so Exponent is 10000H
Sign bit is 0, and integer bit is 1.
Significand is 0110 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000

0 1 0000 0000 0000 0000 1 0110 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 000

0 10000 0000 0000 0000 0101 1000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000

final answer 100005800000000000000H

 

metroplex

Golden Member
Jul 24, 2001
1,064
0
71
Here's a question: I'm rusty with binary logic, but what is 1 AND'd with 0000000 (binary)?

I thought 0 AND 1 = 0, but if Use this, my final result for the 2nde part would be a LOT of 0's and it doesn't seem right.