Skip to main content
Mathematical computing
Lesson 68 of 75
Standard practice

Numerical representation

Objective. Explain finite-precision representation and loss.

  1. 1. Learn
  2. 2. Worked example
  3. 3. Practice
  4. 4. Feedback
  5. 5. Continue

Learn: the key idea

Numerical representation studies how computers store numbers in finite binary form, typically as floating-point values with a sign, exponent and mantissa, following standards like IEEE 754. Because only finitely many bits are available, most decimal fractions such as 0.1 cannot be stored exactly, leading to small representation errors that accumulate through repeated calculations. Integers have an exact range too; exceeding it causes overflow, wrapping or an error depending on the system. For example, storing 0.1 + 0.2 in standard double precision gives 0.30000000000000004, not exactly 0.3, due to binary rounding.

Worked example

A computer uses a 4-bit unsigned integer numerical representation; find the largest integer it can store.

4
Illustrated card showing 4
  1. 14 bits can represent 2⁴ distinct values
  2. 2Values range from 0 to 2⁴ − 1
  3. 3Compute 2⁴ = 16
  4. 4Largest value is 16 − 1 = 15

Answer: 15

Concept mastery

Based on your past attempts at this lesson — the question types to practise again come first.

Complete a practice set to see your concept breakdown here.

Practice

Practice happens on its own screen, one question at a time. Answers stay hidden until you submit yours, and you can stop and pick up at the same question later.

Start practising

Common mistake. Testing floating-point equality directly, such as checking if 0.1 + 0.2 == 0.3; due to rounding in binary representation this is often false, so comparisons should use a small tolerance instead.

Your progress

Tick each step as you finish it. Your exact reading position is saved automatically, so Continue drops you back on the same line.

0 of 5 steps complete

Your place saves automatically as you read.

My dashboard