Track progress, take quizzes and save notes on this lesson.

Free forever · no card needed

Start free
Intermediate

Representation Errors and Precision

4.5.4.5 Rounding errors·4.5.4.6 Absolute and relative errors·4.5.4.7 Range and precision·4.5.4.9 Underflow and overflow

Aligned to the AQA 7517 specification

Level
Intermediate
Reading time
6 min
Published
13 June 2026
Updated
1 July 2026
On this page
  1. 1.Rounding Errors
  2. 2.Absolute and Relative Errors
  3. 3.Range and Precision
  4. 4.Overflow and Underflow
  5. 5.Fixed Point vs Floating Point: Comparison
  6. 6.Common Exam Mistakes

Key takeaways

  • Not every real number can be represented exactly in a finite number of bits; 0.1 in decimal = 0.0001(1001 repeating) in binary, so it must be rounded, and rounding errors accumulate over repeated calculations.
  • Absolute error is |true value - stored value|, while relative error is the absolute error divided by the true value, so the same absolute error has a much larger relative impact for small numbers.
  • For a fixed bit count, precision and range trade off: more mantissa bits give finer precision and more exponent bits give larger range; floating point keeps roughly constant relative error and fixed point keeps constant absolute error.
  • Overflow occurs when a result's magnitude is too large to represent, and in unsigned binary the carry out of the MSB is lost so the result wraps around silently, e.g. 8-bit 200 + 100 gives 44.
  • Underflow occurs when a floating-point result is too small in magnitude to represent and rounds to zero, commonly when two very small numbers are multiplied; a small but representable non-zero number is not underflow.

Rounding Errors

Not every real number can be represented exactly in binary with a finite number of bits. When a value cannot be stored exactly, it is rounded to the nearest representable value — introducing a rounding error.

Classic example: in binary.

Converting 0.1 by repeated multiplication by 2:

StepValueBit
0
0
0
1
1
0 (repeats)

— a repeating binary fraction, similar to in decimal.

No finite number of bits can represent 0.1 exactly. Any floating-point or fixed-point system that stores a finite number of bits must approximate it.

Consequence: rounding errors accumulate in repeated calculations. Adding ten times in floating point may not give exactly .

Absolute and Relative Errors

Absolute error is the magnitude of the difference between the true value and the stored approximation:

Relative error expresses the error as a proportion of the true value:

Worked examples:

Example 1 — true value = 1000, stored value = 999:

  • Absolute error =
  • Relative error = (0.1%)

Example 2 — true value = 0.01, stored value = 0.009:

  • Absolute error =
  • Relative error = (10%)

Key insight: the same absolute error has a much larger relative impact for small numbers. A error in a value of is trivial; a error in a value of 5 is a 20% error.

Floating-point arithmetic maintains roughly constant relative error (errors scale with magnitude), while fixed-point arithmetic maintains constant absolute error.

Range and Precision

Precision is the smallest difference between two representable values — how finely spaced the representable numbers are.

Range is the span from the most negative to the most positive representable value.

For any fixed total bit count, precision and range trade off against each other:

  • More bits allocated to the mantissa → finer precision, same range
  • More bits allocated to the exponent → larger range, coarser precision

Fixed point:

  • Constant absolute precision (spacing between adjacent values is always )
  • Limited range: determined by the number of integer bits
  • Best for: financial calculations, sensor readings — any context where the value range is known and bounded

Floating point:

  • Variable absolute precision: precision decreases for very large numbers (the representable values become further apart)
  • Large range: controlled by the exponent
  • Best for: scientific computing, graphics, physics simulations — anywhere values span many orders of magnitude

Example — with 4 fractional bits, fixed point: Adjacent values differ by . The precision near 1000 and near 0.001 is the same absolute amount: 0.0625. Relative precision near 0.001 is poor: .

Overflow and Underflow

Overflow occurs when a calculation produces a result whose magnitude is too large to represent in the available bits.

  • In unsigned binary: result exceeds . The carry out of the MSB is lost; the result wraps around.
  • In floating-point: the exponent exceeds its maximum representable value.

Example — 8-bit unsigned overflow: . But , so the result wraps: .

  1100 1000   (200)
+ 0110 0100   (100)
-----------
1 0010 1100   → carry out discarded → 0010 1100 = 44 (incorrect)

Underflow occurs when the result of a floating-point calculation is too small in magnitude to represent — its absolute value is smaller than the smallest non-zero representable value. The result rounds to zero.

  • This commonly occurs when two very small numbers are multiplied together.
  • Underflow in floating point: the exponent drops below its minimum representable value.
ConditionWhat happensEffect
Integer overflowMSB carry lost; wraps aroundSilent incorrect result
Float overflowExponent too largeResult is incorrect (behaviour is implementation-defined)
Float underflowExponent too smallResult rounds to zero

Want more lessons like this one?

Generate lessons on anything you study. Free account, no card needed.

Start generating

Fixed Point vs Floating Point: Comparison

Fixed pointFloating point
PrecisionConstant absoluteConstant relative (proportional to magnitude)
RangeLimited by integer bitsLarge (controlled by exponent)
Rounding errorsPresent near limits of precisionPresent throughout; worse near zero
OverflowAt range boundaryWhen exponent overflows
UnderflowNot applicableWhen exponent underflows (rounds to zero)
SpeedFaster — simpler hardwareSlower — complex arithmetic unit
Use casesFinance, embedded systemsScience, graphics, general purpose

In practice: modern hardware implements IEEE 754 floating-point arithmetic in dedicated FPUs (floating-point units). Fixed-point arithmetic is used in embedded systems (microcontrollers without FPUs) and financial systems (where exact decimal representations are legally required).

Common Exam Mistakes

1. Claiming floating point has more precision than fixed point

Floating point has greater range but not necessarily greater precision. For numbers close to zero, floating point can represent very small values; for large numbers, the representable values become more widely spaced, reducing absolute precision.

2. Confusing absolute and relative error

Absolute error has the same units as the value. Relative error is dimensionless (a ratio). A question asking for "relative error" expects a ratio or percentage, not the raw difference.

3. Thinking overflow always produces an error message

In many hardware and language contexts, integer overflow silently wraps around (produces an incorrect result without any warning). Floating-point overflow may produce a special value like infinity rather than raising an exception.

4. Confusing underflow with a small number being stored correctly

Underflow is a specific condition where the result rounds to zero because it is smaller than the smallest representable non-zero value. A small but representable non-zero number is not underflow.

Key terms

Rounding error
The error introduced when a value that cannot be stored exactly is rounded to the nearest representable value.
Repeating binary fraction
A binary fraction whose digits recur without terminating, such as 0.1 in decimal = 0.0001(1001 repeating) in binary, so it cannot be stored exactly in finite bits.
Absolute error
The magnitude of the difference between the true value and the stored approximation, |true value - stored value|.
Relative error
The error expressed as a proportion of the true value: absolute error divided by the magnitude of the true value.
Precision
The smallest difference between two representable values, i.e. how finely spaced the representable numbers are.
Range
The span from the most negative to the most positive representable value.
Fixed point
A representation with constant absolute precision and a range limited by integer bits, best for values within a known, bounded range such as finance.
Floating point
A representation with variable absolute precision but large range controlled by the exponent, best for values spanning many orders of magnitude.
Overflow
A condition where a calculation produces a result whose magnitude is too large to represent in the available bits, causing the result to wrap around or the exponent to exceed its maximum.
Underflow
A condition where a floating-point result is too small in magnitude to represent and rounds to zero, with the exponent dropping below its minimum.

Frequently asked questions

Converting 0.1 to binary gives 0.0001(1001 repeating), a repeating binary fraction similar to 1/3 = 0.333... in decimal. No finite number of bits can represent it exactly, so any floating-point or fixed-point system must approximate it, and the resulting rounding errors accumulate over repeated calculations.

Absolute error is the magnitude of the difference between the true and stored values, |true value - stored value|, and has the same units as the value. Relative error is the absolute error divided by the true value, making it a dimensionless ratio or percentage. The same absolute error has a much larger relative impact for small numbers.

Overflow happens when a result's magnitude is too large to represent in the available bits; in unsigned binary the MSB carry is lost and the result wraps around silently. Underflow happens when a floating-point result is too small in magnitude to represent, so it rounds to zero, commonly when two very small numbers are multiplied.

Generate revision on any topic you study

Type any topic you're studying and Aicademy generates a complete lesson, quiz, and flashcard set, personalised to your level.

Lessons on anything

Structured, level-matched lessons on any topic you study

Practice quizzes

Find out what you actually know before the exam does

Flashcard sets

Lock in key concepts with instant revision cards

Ask Aica

Stuck on something? Get a clear explanation, any time

Prev

Floating Point Numbers

Next

Character Encoding and Error Detection

Related lessons

6 min

Top students don’t revise more. They revise what counts.

Start revising free

Free to start. No card needed.