levo

Data Types and Number Representation

Floating point representation and normalisation

  • 3 things to know
  • Component 01
Start revising · £5/month

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.

Everything in your subscription

Runs, plus a mode for every other kind of session.

1Flash
2Imposter
3Fade
4Brain dump

Learn every subtopic in runs of four questions

Facts flash and fade, a wrong word hides in some of them, and a brain dump decides which questions are locked in.

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

Cram the night before, weakest topic first

A quick scan finds your weakest topics. Recall each fact you missed three times in a row.

If it matches, the search .
succeedsfailsrestarts

Blank Blitz consolidates the facts

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

✓What it iscovered
~Why it happenspartly there
How long it lastsnot there yet

Explain It tests your understanding

Explain a concept in your own words and see which of its points you covered.

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

Test It catches misconceptions

Spot the fault in a statement. The faults are the mistakes students make most often.

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.

Learn it in runs of four questions, each ending on a brain dump against the clock. Every question you lock in comes back the next day, then at longer gaps, each time just before you would forget it.

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