# Normalised floating point binary

Watch
Announcements
#1
OCR AS Level Computer Science H046/01 Computing principles Sample Question Paper

4 (d) (i) Using normalised floating point binary representation using 4 bits for the mantissa and 4 for the exponent, represent the denary value 1.75. You must show your working.

4 (d) (ii) Using normalised floating point binary representation using 4 bits for the mantissa and 4 for the exponent, represent the denary value -1.75. You must show your working.

How would you answers these questions? What's the process?

Thanks!
0
5 years ago
#2
(Original post by majicdude)
OCR AS Level Computer Science H046/01 Computing principles Sample Question Paper

4 (d) (i) Using normalised floating point binary representation using 4 bits for the mantissa and 4 for the exponent, represent the denary value 1.75. You must show your working.

4 (d) (ii) Using normalised floating point binary representation using 4 bits for the mantissa and 4 for the exponent, represent the denary value -1.75. You must show your working.

How would you answers these questions? What's the process?

Thanks!
Floating point binary is really nasty... normalisation does not come into this question but it is just as tricky :-(

Q1) So we first of all want to represent 1.75 in what is called fixed point binary. This is just like normal binary (with the headings 128, 64, 32 ...) except we then use the headings 1/2, 1/4, 1/8 ... and a decimal point. We are using 4 bits for the mantissa (aka the value we are representing) so we do the following:

128 64 32 16 8 4 2 1 . 1/2 1/4 1/8 1/16

1 . 1 1

(1 goes into 1, so we write a binary 1 in the one column)
(put the decimal point in)
We now just have the 0.75 part to represent.
1/2 (0.5) goes into 0.75 once (so we write a one) leaving 0.25
1/4 (0.25) goes into 0.25 to leave 0.

Now we want to make sure our number does not become negative, so we make sure the first binary digit is a 0.

so we had 1.11 so we put a 0 in front to make it 01.11 (if this seemed confusing, then I suggest you look up sign and magnitude, also on the OCR spec :-) )

Now the exponent. Binary won't allow us to have a " . ", so we do the following...

(sign bit) (mantissa)
0 | 1.11 (split to make it easier to see)

We want to move the point to the LEFT in this case so that it is after the 0 (where the line is). We always do this to remove the point. Since it only has to move once, the exponent is therefore 1 == 0001 as a 4 bit binary number.

so therefore:
1.75 is 0111 0001 in floating point binary.

This is soooo tricky to explain here and there is much more two it. Q2 requires two's complement! Hope this helps...
2
1 year ago
#3
really helped me out , thanks a lot
0
X

new posts
Back
to top
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

#### Poll: What factors affect your mental health most right now? Post-lockdown edition

5.83%
Uncertainty around my education (84)
11.4%
Uncertainty around my future career prospects (79)
10.72%
Lack of purpose or motivation (94)
12.75%
Lack of support system (eg. teachers, counsellors, delays in care) (39)
5.29%
Impact lockdown had on physical health (41)
5.56%
Social worries (incl. loneliness/making friends) (79)
10.72%
Financial worries (50)
6.78%
Concern about myself or my loves ones getting/having been ill (32)
4.34%
Exposure to negative news/social media (45)
6.11%
Difficulty accessing real life entertainment (24)
3.26%
Lack of confidence in making big life decisions (70)
9.5%
Worry about missed opportunities during the pandemic (57)
7.73%