Binary, denary, hexadecimal, BCD and prefixes
Watch the whole lecture free
Make a free account to watch every lecture to the end: 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
That was the teaching part. The rest of this lecture is free with an account: 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
The teaching part (1 min) is free to watch. A free account opens the whole lecture: 5 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
What this lecture covers
- Why computers count in twos
- Place values in binary
- Denary to binary
Read the transcript of the teaching part
Last time
Before we start: last time, in File sizes, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.
Why computers count in twos
A light switch is on or off. Billions of tiny switches inside a processor do the same, so every number a computer stores is a pattern of ones and zeros. Hexadecimal is the shorthand people use to read those long patterns, and BCD is a special way to store each decimal digit separately.
Place values in binary
In binary, the columns are worth one, two, four, eight, sixteen, thirty-two, sixty-four and one hundred and twenty-eight. To convert binary to denary, add up the columns that hold a one. The number one zero one one one zero one zero has ones in the columns for 128, 32, 16, 8 and 2. That is one hundred and twenty-eight plus thirty-two plus sixteen plus eight plus two: one hundred and eighty-six.
Denary to binary
To go the other way, start with the biggest column that fits. For 186, take 128 and write a one. The remainder is fifty-eight. The next column, 64, is too big, so write a zero. Thirty-two fits: write one, leaving twenty-six. Sixteen fits, leaving ten. Eight fits, leaving two. Four does not fit, two does, and one does not. The binary number is one zero one one one zero one zero.
How often it comes up
How often Cambridge has asked each part, counted by ExamYard from every past paper in its question bank: Binary and denary conversions.
The whole chapter: Information Representation.
Chapter 1: Information representation
- Binary, denary, hexadecimal, BCD and prefixes 6 min
- Binary addition, subtraction, overflow and two’s complement 7 min
- Character sets, run-length encoding and compression 6 min
- Bitmap images, vector graphics and sound 6 min
Also for A Level Computer Science 9618
Which topics come up most in A Level Computer Science 9618 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.