OCR A-Level Computer Science H446
Processors: Structure, Performance and Types
Input, Output and Storage
Systems Software
Applications Generation
Software Development
Types of Programming Language
Exchanging Data
Networks
Web Technologies
Data Types and Number Representation
Data Structures
Boolean Algebra
Legal, Moral, Cultural and Ethical Issues
Elements of Computational Thinking
Problem Solving and Programming
Algorithms
Boolean Algebra
Logic Gates and Truth Tables
- 3 things to know
- Component 01
Overview
Recall questions on truth tables, the AND, OR, NOT, XOR, NAND and NOR gates with their symbols and tables, reading and drawing gate diagrams, writing expressions from circuits, and proving equivalence with a truth table.
What you need to know
Answer each one before you reveal it.
Complete the truth table for Q = A.B + C'.
How do you use a truth table to prove that two Boolean expressions are equivalent?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a truth table, and how many rows does one need?
Model answer
A table listing every possible combination of the input values to a logic circuit or expression, with the resulting output for each. Because each input is either 0 or 1, a circuit with n inputs needs 2 to the power n rows: 4 rows for two inputs, 8 for three, 16 for four. The input columns are normally written in ascending binary order so that no combination is missed.
- 2
Describe the AND gate: its symbol, its behaviour and how the operation is written.
Model answer
The symbol is a shape with a flat left edge and a semicircular right edge, like a capital D, with the inputs entering on the left and the single output leaving from the curved right side. The output is 1 only when every input is 1, and 0 otherwise. Common ways of writing it are A.B, AB, A AND B and A and B joined by a wedge; several notations are accepted, so use whichever you are comfortable with as long as it is unambiguous.
- 3
Give the truth table for a two-input AND gate.
Model answer
With inputs A and B: 0 and 0 give 0; 0 and 1 give 0; 1 and 0 give 0; 1 and 1 give 1. Only the last row produces a 1.
- 4
Describe the OR gate and give its truth table.
Model answer
The symbol is a shield or arrowhead shape: a curved left edge that the inputs pass through, with the two upper and lower edges sweeping to a point on the right where the output leaves. The output is 1 when at least one input is 1. Truth table: 0,0 gives 0; 0,1 gives 1; 1,0 gives 1; 1,1 gives 1. It is usually written A+B, A OR B, or with a vee between the terms.
- 5
Describe the NOT gate and give its truth table.
Model answer
The symbol is a small triangle pointing right with a circle (a bubble) on its tip, with one input on the left and one output on the right. It inverts its single input: an input of 0 gives an output of 1, and an input of 1 gives an output of 0. It may be written as A with a bar over it, as A', or as a not-sign in front of A - all are accepted.
- 6
Describe the XOR gate and give its truth table.
Model answer
The symbol is the OR shape with an additional curved line drawn just outside and parallel to its curved left edge. Exclusive OR gives an output of 1 when the inputs are different and 0 when they are the same. Truth table: 0,0 gives 0; 0,1 gives 1; 1,0 gives 1; 1,1 gives 0. It is written with a plus sign inside a circle, or as A XOR B.
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 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.