Binary shifts and bit manipulation
Watch the whole lecture free
Make a free account to watch every lecture to the end: 2 worked examples, 5 practice questions, 1 real past-paper question with the answer 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: 2 worked examples, 5 practice questions, 1 real past-paper question with the answer 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: 2 worked examples, 5 practice questions, 1 real past-paper question with the answer explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.
What this lecture covers
- Multiplying by sliding
- Logical shifts
Read the transcript of the teaching part
Last time
Before we start: last time, in Memory, buffers, embedded systems and control, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.
Multiplying by sliding
In denary, to multiply by ten you add a zero: slide every digit one place left. Binary works the same way, with two. Slide the bits left to multiply by two, and right to divide by two. And with AND, OR and XOR you can switch single bits on, off or over, which is how real programs control hardware.
Logical shifts
A logical left shift moves every bit left. The left bit drops off, and a zero enters on the right. A logical right shift moves every bit right. The right bit drops off, and a zero enters on the left. Each place shifted left multiplies by two, provided no ones fall off the left end.
Chapter 4: Processor fundamentals
- The processor, registers, buses and the fetch-execute cycle 6 min
- Binary shifts and bit manipulation 6 min
- Instruction groups, addressing modes, the two-pass assembler, tracing, CPU performance and ports 7 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.