Binary and Logic

Discussion in 'Homework Help' started by Thinker, Mar 26, 2007.

  1. Thinker

    Thread Starter Active Member

    Jan 9, 2007
    61
    0
    I've just finished answering these three questions on my Binary and Logic assignment, and i was wondering is someone can check my answers. I'm not good at this subject...i just made an attempt on these question, which i'm not sure if it's right or not.

    Here they are:

    1. Use 9 bits for mantissa and 3 bits for exponent to represent the following numbers:

    (a) 843434343488
    (b) 43553.99786763
    (c) 0.00000000487
    (d) 0.2345899


    My answer:
    (a) 843434343488 = 0.843434343
    |8|4|3|4|3|4|3|4|3|

    (b) 43553.99786763 = 0.4355399786763 x 10^5
    |4|3|5|5|4|0|0|7|8|

    (c) 0.00000000487 = 0.487 x 10^-8
    |0|0|0|0|4|9|0|0|0|

    (d) 0.2345899 = 0.2345899 x 10^1
    |2|3|4|6|0|0|0|0|1|


    2. Use fixed-point notation and 9 bits to multiply and store the following numbers 564.3 and 45.666.

    My answer:
    564.3 = 5.643 x 10²
    45.666 = 4.5666 x 10¹

    3. Use 7 bits for mantissa and 2 bits for exponent and Floating-point notation to simplify and store the following:

    (a) 355.898 + 4564.56
    (b) 456 – 44.3555


    My answer:
    (a) 355.898 + 4564.56 = 4920.458
    = 4920458 x 10^4
    |4|9|2|0|4|6|0|

    (b) 456 – 44.3555 = 411.6445
    = 4116445 x 10^3
    |4|1|1|6|4|5|0|
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    I don't know about the rest of the questions but question number 1 is certainly wrong since you have no exponents, and you are representing the mantissas as 9 DECIMAL digits, and not nine binary digits.
     
  3. Thinker

    Thread Starter Active Member

    Jan 9, 2007
    61
    0
    Thanks Papabravo, do you know right answers to question number 1?
     
  4. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    1(a) cannot be represented with a three bit exponent
    1(b) cannot be represented with a three bit exponent
    1(c) cannot be represented with a three bit exponent
    1(d) 0.2345899 has en exponent of zero and a mantissa of b'001111000'

    it would be the equivalent of
    ( 1/8 + 1/16 + 1/32 + 1/64) * 2^0 = 0.234375 which is as close as you can get with a nine bit mantissa and a three bit exponent. Normalizing the number would allow two more bits in the representation. In that case the exponent would be minus 2 which is still representable in three bits.
     
  5. Thinker

    Thread Starter Active Member

    Jan 9, 2007
    61
    0
    Thanks Papabravo, i'll check it and get back to you.
     
  6. Thinker

    Thread Starter Active Member

    Jan 9, 2007
    61
    0
    What do you mean by 1 (a), (b) and (c) can't be represented by a three bit exponent, since the question did say it should be?
     
  7. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    There may be a piece of missing information. What base would you like to apply the exponent to. If we choose base 2 then my answer stands. That range of exponents applied to the base 2 is insufficient to represent the indicated numbers.

    Does the problem explicitly state which number base to use? If a base other than two is chosen then the nine bits of mantissa for problem 1(d) will need to change.

    BTW I've had problems from books and given by instructors that had no solutions. What did you think I meant by my answer. I thought is was clear and unambiguous.
     
  8. Thinker

    Thread Starter Active Member

    Jan 9, 2007
    61
    0
    Well i thought your answer for 1 (a), (b) and (c) was very ambiguous! :)

    I don't think there is any information, i wrote exactly what the question asked.

    I think i have to look into more books to try and get the answer...
     
  9. Papabravo

    Expert

    Feb 24, 2006
    10,135
    1,786
    There is no ambiguity in saying that it is impossible to represent the exponents required to express the numbers given in 1(a), 1(b), and 1(c). Furthermore, I challenge you, or your instructor, or any member of the forum to provide an answer using a nine bit mantissa, and a three bit exponent, with 2 as the number base. I got $100.00 that says you can't do it. So there Mr. "I thought you answer was very ambiguous".
     
Loading...