levo

Fundamentals of Data Representation

Fixed point and floating point representation

  • 3 things to know
  • Paper 2

Overview

Recall questions on place values after the binary point, representing a given decimal in a fixed point format, and how the mantissa and exponent divide the work.

What you need to know

Answer each one before you reveal it.

Your recallNot started
Key term

Represent 5.75 in binary using an unsigned fixed point format with 4 bits before the point and 4 after.

Numbers

For an unsigned fixed point format with 4 bits before the point and 4 after, what are the smallest step and the largest value?

Key term

Represent 6.5 in floating point with an 8-bit two's complement mantissa, point after the sign bit, and 4 bits for the power of two.

Questions from this subtopic

Each one with the model answer underneath.

  1. 1

    How does fixed point binary represent a number with a fractional part?

    Model answer

    The binary point is placed at an agreed, unchanging position within the bits. Columns to the left of the point carry the usual integer place values 1, 2, 4, 8 and so on, and columns to the right carry the fractional place values 1/2, 1/4, 1/8, 1/16 and so on. The point itself is not stored — its position is fixed by the format.

  2. 2

    State the place values of the first four bits after a binary point.

    Model answer

    1/2 (0.5), 1/4 (0.25), 1/8 (0.125) and 1/16 (0.0625). Each column is worth half the one to its left, that is 2⁻¹, 2⁻², 2⁻³ and 2⁻⁴.

  3. 3

    A fixed point format uses 8 bits with 4 bits before the binary point and 4 after. What decimal value is 0110.1010?

    Model answer

    6.625. The integer part 0110 is 4 + 2 = 6, and the fraction 1010 is 1/2 + 1/8 = 0.625.

  4. 4

    Using the same 4-and-4 fixed point format, represent 5.75 in binary.

    Model answer

    0101.1100. The integer 5 is 0101, and 0.75 is 1/2 + 1/4, so the fraction bits are 1100.

  5. 5

    Using the same 4-and-4 fixed point format, represent 0.6875 in binary.

    Model answer

    0000.1011. Working down the fraction columns: 0.6875 − 0.5 = 0.1875, which is less than 0.25 so that column is 0; 0.1875 − 0.125 = 0.0625; and 0.0625 − 0.0625 = 0. So the bits are 1/2, 1/8 and 1/16 set, giving .1011.

  6. 6

    In a signed fixed point format of 8 bits with 4 before the point, held in two's complement, what value is 1111.1000?

    Model answer

    −0.5. The most significant bit carries the weight −8, so the sum is −8 + 4 + 2 + 1 + 0.5 = −0.5. Alternatively, negate by inverting to 0000.0111 and adding the smallest step 0.0625, which gives 0000.1000 = 0.5, so the original is −0.5.

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.

Fundamentals of Programming
Fundamentals of Data Structures
Fundamentals of Algorithms
Theory of Computation

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.

A driver is .
softwarehardwarestorage

Blank Blitz makes facts automatic

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

AThe integer 5 is 0101.
B0.75 is 1/2 + 1/4.
CThe fraction bits are 1100.

Build It gets the exam shape right

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

Head means the first single element of a non-empty list.
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 Fundamentals of Data 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.