The Lego Addition Machine

Test yourself on Binary Arithmetic with exam style questions, marked instantly.

Flashcards that come back just before you would forget them.

A revision plan that remembers what you know and shows what to do next.

See which topics you have nailed and which need another look.

Quiz yourself on Binary ArithmeticGet your flashcardsBuild my revision planTrack my progress

The Lego Addition Machine

Imagine building a calculator with Lego bricks, but you only have two colors: white (0) and black (1). Adding works the same as normal, but when two blacks meet, you get a white brick and "carry" a black to the next column. Want to multiply by 2? Easy - shift all bricks one space left! Want to divide by 2? Shift right! Want negative numbers? Paint the first brick red to mean "negative." This is exactly how computers do math - simple rules, billions of times per second!
Four worked examples. Addition: 1011 plus 0110 gives 10001, with carries 1, 1, 1, 0, 0 written above the columns. Overflow: 11111111 plus 00000001 gives 100000000, but only 8 bits are stored, so the extra 1 on the left is lost. Left shift: 00010110 (22) becomes 00101100 (44), multiplied by 2. Right shift: 00101100 (44) becomes 00010110 (22), divided by 2.

Check each answer in denary. Addition: 11 + 6 = 17, and 10001 is 16 + 1 = 17. Overflow: 255 + 1 = 256, which needs 9 bits, so the 8 bit result shows 0 (overflow is named by OCR and Edexcel). Shifts: 22 × 2 = 44 for a left shift of one place, and 44 ÷ 2 = 22 for a right shift of one place.

Make this stick

Signing in gives access to all PrepWise features.

PrepWise is a trading name of A3M Quality Solutions Limited, registered in England and Wales, company number 14959172. Registered office: 202 Stroud Road, Gloucester, GL1 5LA. ICO registration ZC267069.