Binary Addition
Add binary numbers column by column from the right, just like normal addition. There are four rules:
Tip: check your answer by converting to denary — 6 + 7 = 13 ✓
Overflow Errors
Sometimes adding two binary numbers gives an answer with an extra digit that won’t fit in the number of bits available. This is an overflow error.
An overflow might make a program crash, or the extra digit is simply lost — giving a wrong answer (here 3 + 1 would come out as 00 = 0!).
Binary Subtraction
Work from the right. When you take 1 from 0 you must borrow from the next column to the left (that column goes down by 1).
A borrowed 1 is worth 2 in the column it moves into (10 in binary). Check: 12 − 3 = 9 ✓
Binary Shift
A binary shift moves every bit left or right by a number of places. The gaps are filled with 0s and bits pushed off the end are lost.
Try it: click bits to change them, then shift.
Hexadecimal
Hex is base 16. It uses 0–9 then A–F for 10–15, so one hex digit = one nibble (4 bits).
Binary ↔ Hex: the nibble method
Break the binary into nibbles (groups of 4 bits). Work out each nibble using 8 4 2 1, then turn each into one hex digit. It works in reverse too: each hex digit becomes 4 bits.
Try it: click the bits.
Ready?
30 questions, 1 point each. The clock starts when you press Start. Drag the number tiles from the tray into the boxes (or tap a tile, then tap a box). Tap a filled box to empty it.