1
|
StArCuE   United States. Feb 06 2012 14:02. Posts 123 | | |
Alright I'm having trouble on this hw problem and would appreciate anyone who could help me out.
Problem A. The values of two float variables, x and y, are saved in IEEE single precision floating point format as below. Calculate the value of z in IEEE single precision floating point format if z = x + y.
x = 0 11100010 00101100000000000000000
y = 1 11100000 11010000000000000000000
I'm assuming I should start by calculating the 32-bit reps of x and y but I'm unsure what to do next. Any advice or step by step help would be appreciated. Thanks Chris.
|
|
|
1
|
bane   United States. Feb 06 2012 14:26. Posts 2379 | | |
|
|
1
|
spets1   Australia. Feb 06 2012 15:05. Posts 2179 | | |
im pretty sure first number determines if its negative or positive.
i reckon convert into decimals and then add up and then convert bak to binary, but i havnt done this shit for years... |
|
|
|
1
|
StArCuE   United States. Feb 06 2012 15:20. Posts 123 | | |
Ahhh right on thx for the link. |
|
|
1
|
Silver_nz   New Zealand. Feb 06 2012 15:41. Posts 5647 | | |
good old IEEE754.
key is going to be understanding the formatting of these binary stream. pretty cool |
|
|
1
|
Almebeast   Sweden. Feb 06 2012 17:56. Posts 797 | | |
Yeah the link explains it perfectly. Pretty interesting stuff imo. |
|
After all is said and done, more is said than done. | |
|
|
|