Turn on thread page Beta
    • Thread Starter
    Offline

    0
    ReputationRep:
    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...
    Offline

    1
    ReputationRep:
    Lol. I'm glad I dont have to do that sh*t ever again.
    • Thread Starter
    Offline

    0
    ReputationRep:
    ... hm, that's very encouraging,
    • Thread Starter
    Offline

    0
    ReputationRep:
    does anyone at all doing A2 computing here?
    • Thread Starter
    Offline

    0
    ReputationRep:
    this forum sux! Nobody knows the answer to the simple floating point question...
    Offline

    1
    ReputationRep:
    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.
    • Thread Starter
    Offline

    0
    ReputationRep:
    ops sorry forgot to tell ya... i believe it is in twos complement. any ideas how they got the answer?
    Offline

    1
    ReputationRep:
    (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.
    • Thread Starter
    Offline

    0
    ReputationRep:
    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.
    Offline

    1
    ReputationRep:
    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.
    • Thread Starter
    Offline

    0
    ReputationRep:
    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...
    • Thread Starter
    Offline

    0
    ReputationRep:
    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...
 
 
 
Poll
Brexit: Given the chance now, would you vote leave or remain?
Useful resources

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.