AeroLab Reading room

CS / AS level

Advanced data representation

Signed binary formats and floating-point representations encode negative and fractional values within finite storage. Range and precision trade off against each other.

Learning objectives

The big idea

Signed binary formats and floating-point representations encode negative and fractional values within finite storage. Range and precision trade off against each other.

Bitmap/vector graphics, sampled sound and compression involve explicit models. An overflow means the mathematical result cannot fit the chosen range; rounding loses low-order information even without overflow.

Equations and relationships

8-bit two’s-complement range: −128 to 127

The most significant bit has weight −128.

Worked example

What does 11111111 represent in 8-bit two’s complement?

Follow the solution

Its value is −128+64+32+16+8+4+2+1=−1.

Investigate and explain

Predict the worked result before calculating. Change one input, record the new result, and explain which assumptions still hold.

Use the prediction activity below; a local model appears only where it supports this topic.

Open the interactive investigation

Check your understanding

1. Can a finite binary fraction represent every real number exactly?

  1. Yes
  2. No
  3. Only with a sign bit
Check the answer and reasoning

No

Finite bit patterns cannot encode infinitely many distinct real values.

2. What does 11111111 represent in 8-bit two’s complement?

  1. 255
  2. −127
  3. −1
Check the answer and reasoning

−1

Its value is −128+64+32+16+8+4+2+1=−1.

3. Does adding more mantissa bits mainly improve range or precision?

  1. Precision
  2. Range only
  3. Neither
Check the answer and reasoning

Precision

More significant bits allow finer spacing; exponent width primarily controls range.