← All subjects

Maths & technology · CAMBRIDGE 0478

Computer Science

Practise algorithms, data representation and logic.

Revision notes

Try each question before revealing the answer. Check your exam-year syllabus for the full topic list.

TOPIC 01

Binary

Each binary place represents a power of two. From the right, the first four place values are 1, 2, 4 and 8.

Quick practice

Convert binary 1011 to decimal.

Reveal answer

8 + 0 + 2 + 1 = 11.

TOPIC 02

Trace tables

A trace table records how variables change as an algorithm runs. Track one loop iteration at a time.

Quick practice

Start total at 0. Add 2, then 4, then 6 in a loop. List total after each iteration.

Reveal answer

The running totals are 2, 6 and 12.

TOPIC 03

Boolean logic

An AND operation is true only when both inputs are true. OR is true when at least one input is true. NOT reverses its input.

Quick practice

Evaluate NOT(A AND B) when A is true and B is false.

Reveal answer

A AND B is false. NOT false is true.