Binary to denary
Write the place values 128, 64, 32, 16, 8, 4, 2, 1 above the bits. Add up the place values wherever there is a 1.
128 + 32 + 16 + 4 + 1 = 181
Practise converting between binary, denary and hexadecimal, then move on to binary arithmetic, shifts, masks and negative numbers. Reach a score of 20 to earn a medal.
Every quiz above uses a few simple methods. Here they are with worked examples, using 8-bit numbers like the GCSE exam.
Write the place values 128, 64, 32, 16, 8, 4, 2, 1 above the bits. Add up the place values wherever there is a 1.
Work from the left. If the place value fits into what's left, write 1 and subtract it; otherwise write 0.
Hexadecimal is base 16, using 0 to 9 then A to F for 10 to 15. Each hex digit matches exactly 4 bits (a nibble), so split the byte in half and convert each part.
Divide by 16. The answer is the first hex digit and the remainder is the second.
Add column by column from the right: 0 + 0 = 0, 1 + 0 = 1, 1 + 1 = 0 carry 1, and 1 + 1 + 1 = 1 carry 1. If the answer needs more than 8 bits, it causes an overflow error.
A left shift moves every bit left and multiplies the number by 2 for each place. A right shift divides by 2 for each place, losing any bits that fall off the end.
Computers are built from switches that are either on or off, which maps directly onto the two digits 1 and 0.
Hex is much shorter than binary and easy to convert, because each hex digit is exactly 4 bits. It's used for colour codes, memory addresses and error codes.
255, which is 11111111 in binary and FF in hex. That gives 256 different values including 0.
Each right answer adds a point and each wrong one takes one away. Reach a score of 20 to earn a medal for that quiz and difficulty.
Using this with a class?
Run a whole lesson with them, free
Learn Computing has complete interactive courses for OCR A Level Computer Science, Creative iMedia and the Cambridge Advanced National in IT. You see every student's work live, send feedback into the lesson, and track progress across the course. Students log in with cards you print, with no email addresses needed.
An OCR GCSE Computer Science (J277) course is on the way. Sign up below for one email a month and hear when it opens.
Revising?
Free revision, topic by topic
Revision pages for the course you are taking, free and with no account needed.
Exam guides: how to revise for GCSE Computer Science and what's in the Creative iMedia R093 exam.