This discussion is closed.
maljosh
Badges: 0
#1
Report Thread starter 16 years ago
#1
can someone help me with one question... module 4, Floating points numbers

Basically, you've got the number 1011 1010 0000 0011

10 bit mantissa, 6 bit exponent

1011 1010 00 | 000011

exponent +3, to get the number i move the dec point to the right 3 places

101.1101

i get 4+1. 1/2+1/4+1/16= 5 whatever....

But the marking skeems says the answer is 4 3/8 ( or 35/8)

How the hell did they get that!! Plz somebody help me... that was january 2003 paper if someone interested...
0
Bhaal85
Badges: 9
Rep:
?
#2
Report 16 years ago
#2
Lol. I'm glad I dont have to do that sh*t ever again.
0
maljosh
Badges: 0
#3
Report Thread starter 16 years ago
#3
... hm, that's very encouraging,
0
maljosh
Badges: 0
#4
Report Thread starter 16 years ago
#4
does anyone at all doing A2 computing here?
0
maljosh
Badges: 0
#5
Report Thread starter 16 years ago
#5
this forum sux! Nobody knows the answer to the simple floating point question...
0
Alaric
Badges: 1
Rep:
?
#6
Report 16 years ago
#6
I can do IEEE 754 floating point, but you haven't specified in what format the mantissa and exponent are stored - biased representation? unsigned with single sign bit? two's complement?

Never did A level computing so I don't know what craz scheme they made up for that!

Alaric.
0
maljosh
Badges: 0
#7
Report Thread starter 16 years ago
#7
ops sorry forgot to tell ya... i believe it is in twos complement. any ideas how they got the answer?
0
Alaric
Badges: 1
Rep:
?
#8
Report 16 years ago
#8
(Original post by maljosh)
i believe it is in twos complement. any ideas how they got the answer?
In a word, no.

The first number you listed was a 15bit one, with the third block only having three numbers, makesure there isn't a 1 in there some where.
I'm also not entirely sure what their doing about normalising/denormalising and hidden bits. The answer may of course be wrong if you're doing it the way you've been taught and not getting it correct.

sorry i can't be of much more help

Alaric.
0
maljosh
Badges: 0
#9
Report Thread starter 16 years ago
#9
thanks for helping anyways.. i appreciate it mate...

i've made a correction, i missed a 0 there... it didn't affect my calculations though... it's a very confusing question... the book sux, there is no proper explanation.
0
Alaric
Badges: 1
Rep:
?
#10
Report 16 years ago
#10
interestingly I think if you take the first ten bits as 2s complement you get -280.
35/8 is 280/2^6
or 280 * 2^(-6).

so it seems to be fairly close, I can't quite work it out though, it may have something to do with hidden bits, but I don't know how they're dealing with that! (Oh and the negative signs are little messed)

All in all I prefer IEEE754

Alaric.
0
maljosh
Badges: 0
#11
Report Thread starter 16 years ago
#11
well, that looks like the correct answer... but i don't think they ever mentioned anything about hidded bits anywhere in the book... no way, they can give us something like that...
0
maljosh
Badges: 0
#12
Report Thread starter 16 years ago
#12
Hey, at last i know the answer...

Firstly, calculate exponent which is +3, then you place decimal point in the right place ignoring the first 1, which is just to tell us that the number is negative.

10 bit mantissa, 6 bit exponent

1 .011 1010 00 | 000011

Secondly, you twos complement mantissa, because it was in twos complement you have to twos complement it back....(don't forget we ignore the very first 1)

011 1010 00= 100011000

Thirdly, you shift decimal place 3 places to the right:

100.011000 and we get 4 + 1/4 + 1/8= -4.375

It wasn't such a difficult question afterall...
0
X
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

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

Personalise

How are you finding researching unis for 2021 entry?

I have been able to get all the information I need from online research (70)
18.82%
I have tried virtual events and found them useful (76)
20.43%
I have tried virtual events and did not find them useful (68)
18.28%
I would be interested in trying socially distanced or scaled down in person events (78)
20.97%
I want to but don't know where to start with researching unis for 2021 entry (39)
10.48%
I haven't started researching yet (41)
11.02%

Watched Threads

View All