The Student Room Group

Normalised Floating Point Binary...

How would you convert the denary value 0.0625 into normalised floating point binay using an 8-bit mantissa and a 4 bit exponent?

My problem is that in order to normalise a positive value, you must move the decimal back or forth until a 0.1 is achieved. In this case, 0.0625, in binary, is:
00000000.0001

All help appreciated.
So you currently have 0000.0001 (The number of 0s at the start doesn't matter for now)
To have a normalised value, you must move the 1 three spaces to the left to get 0000.1000
So the exponent will be negative three, 1101.
You would then write this value with an 8-bit mantissa and 4-bit exponent as:
[0.1000000] and [1101]

You can check this by multiplying 1/2 (mantissa) by 2^(exponent):
0.5 * 2^-3 = 1/16 = 0.625
(edited 6 years ago)
Reply 2
Original post by FryOfTheMann
So you currently have 0000.0001 (The number of 0s at the start doesn't matter for now)
To have a normalised value, you must move the 1 three spaces to the left to get 0000.1000
So the exponent will be three, 0011.
You would then write this value with an 8-bit mantissa and 4-bit exponent as:
[0.1000000] and [0011]


Oh right, I didn't think that it was as simple as that. That makes sense, thnk you. :smile:
Original post by badmathkid
Oh right, I didn't think that it was as simple as that. That makes sense, thnk you. :smile:


Please note that I made a mistake and had the exponent as positive 3 when it should have been negative! I have now changed this. No problem :smile:
Reply 4
Original post by FryOfTheMann
Please note that I made a mistake and had the exponent as positive 3 when it should have been negative! I have now changed this. No problem :smile:


Oh I see, the exponent should have been 1011. Thanks again! :smile:
I hate all this mantissa and exponent stuff, it's so easy to make a mistake to get the entire question wrong

Quick Reply

Latest