levo

Data Types and Number Representation

Floating point representation and normalisation

  • 3 things to know
  • Component 01

Overview

Recall questions on the mantissa and exponent, reading positive and negative mantissas, representing values in floating point, the normalisation rules and how to normalise, largest and smallest storable values, underflow, and range versus precision.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Using an eight-bit two's complement mantissa and a four-bit two's complement exponent, represent 5.75.

Key term

Now represent minus 5.75 in the same eight-bit mantissa, four-bit exponent format.

Key term

How do you read the value of a negative mantissa such as 10100100?

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    What are the two parts of a floating point number, and how do they combine?

    Model answer

    The mantissa, which holds the digits of the number, and the exponent, which says where the binary point goes. The value is the mantissa multiplied by 2 raised to the power of the exponent. It is binary standard form: the mantissa carries the precision and the exponent carries the scale.

  2. 2

    In the format used here, both the mantissa and the exponent are two's complement and the binary point sits immediately after the mantissa's sign bit. What is the value of the mantissa 01011100?

    Model answer

    It is 0.71875. The sign bit is 0 so the number is positive, and the bits after the point are 1011100 with place values one half, one quarter, one eighth and so on. The 1s sit at one half, one eighth, one sixteenth and one thirty-second, and 0.5 + 0.125 + 0.0625 + 0.03125 = 0.71875.

  3. 3

    Using an eight-bit two's complement mantissa and a four-bit two's complement exponent, represent 5.75.

    Model answer

    01011100 0011. First write 5.75 in binary as 101.11, since 4 + 1 + 0.5 + 0.25 = 5.75. Move the point three places left to put it after the leading zero, which means multiplying by 2 to the power 3, giving 0.10111 x 2 to the power 3. Pad the mantissa to eight bits as 01011100 and write the exponent 3 in four-bit two's complement as 0011.

  4. 4

    Now represent minus 5.75 in the same eight-bit mantissa, four-bit exponent format.

    Model answer

    10100100 0011. Take the positive mantissa 01011100 and form its two's complement: flip to get 10100011, then add 1 to get 10100100. The exponent is unchanged at 0011, because negating a number changes its sign, not its scale. Checking, the mantissa's sign bit is worth minus 1, and minus 1 + 0.25 + 0.03125 = minus 0.71875, and minus 0.71875 x 8 = minus 5.75.

  5. 5

    How do you read the value of a negative mantissa such as 10100100?

    Model answer

    Exactly as you read any two's complement number, except that the place values are fractions. The leading bit is worth minus 1 rather than minus 128, and the bits after the point are worth one half, one quarter, one eighth and so on as usual. So 10100100 is minus 1 + 0.25 + 0.03125 = minus 0.71875. The alternative is to flip and add one to get 01011100, read that as 0.71875, and then apply the minus sign.

  6. 6

    What does it mean for a floating point number to be normalised?

    Model answer

    The mantissa has been shifted, with the exponent adjusted to compensate, so that the first two bits differ. A positive normalised mantissa always begins 0.1 and a negative one always begins 1.0. This puts the most significant digit of the number as far left as the format allows, so no mantissa bits are wasted on leading padding.

Other ways to work this

The same content, four other ways.

What is inside Levo

Six ways to work the same material.

1Closed book
2Open book
3Closed book

The 3-step method, run for you

Answer cold, learn it, then prove it stuck. Levo tracks the jump between your first attempt and your last.

Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation

Cram a whole paper in one sitting

Sort every topic into what you know and what you do not, then drill only the weak ones.

If it matches, the search .
succeedsfailsrestarts

Blank Blitz makes facts automatic

Rapid timed gap-fills on the terms and numbers you need to recall without thinking.

A0 + 0 gives 0.
B0 + 1 gives 1.
C1 + 1 gives 0 carry 1.

Build It gets the exam shape right

Assemble a full-mark answer from its marking points, in the order an examiner wants them.

A global variable means a variable reachable from anywhere in the program.
TrueFalse

Test It catches misconceptions

Spot the fault in a statement. The traps are the mistakes students actually make.

721941163128510

Brain Breaks between sessions

Short focus games to reset attention, so the next set lands better than the last.

Every question in Data Types and Number Representation, on a schedule.

Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.

Or £46 a year, about £3.83 a month. Cancel anytime.