2
votes

I am trying to convert these numbers to binary scientific notation, but I cannot figure out the process. Could someone please the process of going about solving this?

For IEEE 754 single precision floating point, what is the number, as written in binary scientific notation, whose hexadecimal representation is the following?

0061 0000

I can get this converted from hex to unsigned binary:

0000 0000 0110 0001 0000 0000 0000 0000

but I can't figure out how to properly represent this using binary scientific notation. Thanks in advance!

1
Can you give some information about where you are stuck? For example, do you understand the format of a 32-bit IEEE 754 binary float?Patricia Shanahan
I'm new to using IEEE conversion, so I don't really understand much about this question at all.ComputerScientist123
In that case, I suggest beginning by reading the relevant Wikepedia page.Patricia Shanahan
I'm reading some lecture notes from my professor, but the examples don't make much sense to me. Could you explain how to go from the unsigned binary to binary scientific notation--i.e., 0000 0000 0110 0001 0000 0000 0000 0000? Thanks!ComputerScientist123
If the lecture notes are not making sense to you, it is definitely time to read at least one other discussion of the subject. If you really aim to be a computer science student you need to learn to study computer science, and that involves reading about concepts and applying them, not just asking other people to solve specific problems for you.Patricia Shanahan

1 Answers

5
votes

binary32 is broken into 3 sections: sign, exponent (biased) and significand (or fraction).

0000 0000 0110 0001 0000 0000 0000 0000
||        ||                          |
||        |\-- significand -----------/
| \ expo  /
\ sign

So in this case,

sign (negative) = 0, so number is positive
exponent (biased) = 0000 0000
significand = .1100001 0000 0000 0000 0000

If the exponent (power of 2) is at the highest value (1111 1111), that indicates the number is special: Infinity or Not-a-Number.

If the exponent is 0, the bias is -126, else the bias is -127 and an implied 1 should be added to the fraction.

sign = 0 (positive) or +1
exponent = 0 - 126
significand = 0.1100001 =  (binary) 1100001/10000000 = 97/128

+1 * pow(2, -126) * 97/128 = 8.9080431273251475213255815711373...e-39

Notes:
On-line converters available. example
Endian: the order in which the bytes are to be interpreted can vary. 0061 0000 could be 00 00 61 00. An assumption was made here with this example.