WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Logic Gates and Boolean Algebra
Masking and clearing registers
- 3 things to know
- AS Unit 1
Overview
Recall questions on what a mask is, which operation isolates, sets or inverts chosen bits and what each mask must contain, worked AND, OR and XOR calculations in binary, clearing a register two ways, and testing one bit.
What you need to know
Answer each one before you reveal it.
Which operation isolates chosen bits, and what should the mask contain?
What mask extracts the lower four bits of a byte, and what happens to the rest?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a mask?
Model answer
A mask is a bit pattern combined with a value using a logical operation so that chosen bit positions are kept, set, cleared or inverted while the others are left as they are.
- 2
Which operation isolates chosen bits, and what should the mask contain?
Model answer
AND isolates them, using a mask holding 1 in every position to be kept and 0 in every position to be discarded.
- 3
What mask extracts the lower four bits of a byte, and what happens to the rest?
Model answer
The mask 00001111 in binary is used with AND, which leaves the lower four bits untouched and forces the upper four to 0.
- 4
Calculate 11010110 AND 00001111, both in binary, and give the denary result.
Model answer
The result is 00000110 in binary, which is 6 in denary, because only the lower four bits of the first value survive the mask.
- 5
Which operation sets chosen bits to 1, and what should the mask contain?
Model answer
OR sets them, using a mask holding 1 in every position to be turned on and 0 everywhere else so those positions keep their existing values.
- 6
Calculate 10010000 OR 00001111, both in binary.
Model answer
The result is 10011111 in binary, because the lower four bits are forced to 1 and the upper four are unchanged.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Logic Gates and Boolean Algebra, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.