Skip to main content
Logo image

Dive Into Systems: Exercises

Section 4.8 Real Numbers in Binary

Checkpoint 4.8.1. Representing Real Numbers.

    Which of the following types of numbers can we represent precisely in binary given a fixed number of bits?
  • Rational Numbers
  • Incorrect.
  • Irrational Numbers
  • Incorrect
  • Both A and B
  • Incorrect
  • Neither A nor B
  • Correct!
Hint.
Think about the type of numbers we can represent entirely \(\textit{in binary} \text{.}\)

Checkpoint 4.8.2. Identifying Operand Types.

Convert the following fixed-point binary numbers to their equivalent decimal representations:
  • 1101.101
  • 0000.010
  • 0111.011
Hint.
Recall that the bit immediately to the left of the point has a weight of \(2^0\) while the one immediately to the right has a weight of \(2^{-1}\)

Checkpoint 4.8.3. Floating-Point Numbers.

    True or False: Floating-point representation can represent both positive and negative numbers.
  • True.

  • Floating-point representation can represent both positive and negative numbers.
  • False.

  • Floating-point representation can represent both positive and negative numbers.

Checkpoint 4.8.4. SG7 IEEE 754 Floating Point Formula.

Checkpoint 4.8.5.

Checkpoint 4.8.6. Floating-Point Conversion.

    Given the following real number expressed in the IEEE 754 floating-point format:
    1101 0110 1011 0110 1011 0000 0000 0000
    Select which option depicts how the bits should be grouped to determine its value.
  • 1 1010110 101101101011000000000000
  • Correct!
  • 1 10101101 01101101011000000000000
  • Incorrect
  • 110101101011011010110000 0000000 0
  • Incorrect.
  • None of the Above
  • Incorrect.

Checkpoint 4.8.7. Floating Point Format.

Given the real number expressed in IEEE 754 floating-point format:
1101 0110 1011 0110 1011 0000 0000 0000
Answer the following questions:

(a)

    The sign bit is the ________ bit.
  • Most Significant
  • Correct!
  • Least Significant
  • Incorrect.

(b)

    This number is _____.
  • Positive
  • Incorrect
  • Negative
  • Correct!

(c)

    The sign bit represents the sign of _________.
  • The value
  • Correct!
  • The exponent of the value
  • Incorrect.

(d)

    The bits in the exponent portion should be interpreted in ________.
  • Two’s complement format
  • Incorrect
  • Unsigned Binary Format
  • Correct!

(e)

    The low-order bits represent the ___________
  • Exponent
  • Incorrect
  • Significand
  • Correct!

(f)

    The significand has _________ bits.
  • 22
  • Incorrect
  • 23
  • Correct!

Checkpoint 4.8.8. IEEE 754 Floating-Point Format (Part II).

    Select the expression for converting the following IEEE 754 floating-point value to decimal.
    1101 0110 1011 0100 0000 0000 0000 0000
  • \((2^{86 - 127}) * (2^{-1} + 2^{-3} + 2^{-4} + 2^{-6}) \)
  • Incorrect.
  • \(-(2^{86 - 127}) * (2^{-1} + 2^{-3} + 2^{-4} + 2^{-6})\)
  • Incorrect
  • \((2^{173 - 127}) * (2^{-2} + 2^{-3} + 2^{-5}) \)
  • Incorrect
  • \(-(2^{173 - 127}) * (2^{-2} + 2^{-3} + 2^{-5})\)
  • Correct!
  • None of the above
  • Incorrect

Checkpoint 4.8.9. Floating-Point Conversion.

Convert the following IEEE 754 floating-point number to its equivalent decimal representation.
0b0100 0010 0011 0000 0000 0000 0000 0000
Hint.
Use the formula to compute the final value: \((-1)^0 \cdot 2^{(132-127)} \cdot 1.375 \)