Logic gates are the fundamental building blocks of digital circuits. All computer processors are built from combinations of these simple gates.
Definition
A logic gate is an electronic circuit that performs a logical operation on one or more binary inputs and produces a single binary output.
NOT Gate
Definition
The NOT gate (inverter) has one input and outputs the opposite value.
Example
Truth Table:
A
NOT A
0
1
1
0
Symbol: Triangle with circle at output Expression: Q = ¬A
AND Gate
Definition
The AND gate outputs 1 only when ALL inputs are 1.
Example
Truth Table:
A
B
A AND B
0
0
0
0
1
0
1
0
0
1
1
1
Expression: Q = A ∧ B
OR Gate
Definition
The OR gate outputs 1 when AT LEAST ONE input is 1.
Example
Truth Table:
A
B
A OR B
0
0
0
0
1
1
1
0
1
1
1
1
Expression: Q = A ∨ B
XOR Gate (Exclusive OR)
Definition
The XOR gate outputs 1 when inputs are DIFFERENT.
Example
Truth Table:
A
B
A XOR B
0
0
0
0
1
1
1
0
1
1
1
0
Expression: Q = A XOR B
NAND Gate
Definition
The NAND gate is AND followed by NOT - outputs 0 only when ALL inputs are 1.
Example
Truth Table:
A
B
A NAND B
0
0
1
0
1
1
1
0
1
1
1
0
NAND is a "universal gate" - can create any other gate using only NANDs.
NOR Gate
Definition
The NOR gate is OR followed by NOT - outputs 1 only when ALL inputs are 0.
Example
Truth Table:
A
B
A NOR B
0
0
1
0
1
0
1
0
0
1
1
0
NOR is also a "universal gate" - can create any other gate using only NORs.
Key Point
Gate
Output rule
Expression
NOT
Inverts single input
Q = ¬A
AND
1 only if all inputs are 1
Q = A ∧ B
OR
1 if at least one input is 1
Q = A ∨ B
XOR
1 if inputs are different
Q = A ⊕ B
NAND
NOT(AND), 0 only if all inputs are 1
Q = ¬(A ∧ B)
NOR
NOT(OR), 1 only if all inputs are 0
Q = ¬(A ∨ B)
1.4.3(b) Boolean Expressions and Algebra
Boolean expressions can be simplified using algebraic rules, making circuits cheaper and faster.
Boolean Algebra Laws
Key Point
Law family
OR form
AND form
Identity
A ∨ 0 = A
A ∧ 1 = A
Null
A ∨ 1 = 1
A ∧ 0 = 0
Idempotent
A ∨ A = A
A ∧ A = A
Complement
A ∨ ¬A = 1
A ∧ ¬A = 0
Involution
¬¬A = A
—
Commutative
A ∨ B = B ∨ A
A ∧ B = B ∧ A
Associative
(A ∨ B) ∨ C = A ∨ (B ∨ C)
(A ∧ B) ∧ C = A ∧ (B ∧ C)
Distributive
A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C)
A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C)
Absorption
A ∨ (A ∧ B) = A
A ∧ (A ∨ B) = A
De Morgan's Laws
Key Point
Original expression
Equivalent expression
In words
¬(A ∧ B)
¬A ∨ ¬B
NOT (A AND B) = (NOT A) OR (NOT B)
¬(A ∨ B)
¬A ∧ ¬B
NOT (A OR B) = (NOT A) AND (NOT B)
Memory trick: Break the bar, change the sign.
Worked Example
Worked Example: Simplifying a Boolean Expression
Simplify: Q = A ∧ B ∨ A ∧ ¬B ∨ ¬A ∧ B
Step 1: Factor out common terms Q = A ∧ (B ∨ ¬B) ∨ ¬A ∧ B
Step 2: Apply complement law (B + B̅ = 1) Q = A ∧ 1 ∨ ¬A ∧ B
Step 3: Apply identity law (A.1 = A) Q = A ∨ ¬A ∧ B
Step 4: Apply absorption (or expand and simplify) Q = A ∨ ¬A ∧ B = (A ∨ ¬A) ∧ (A ∨ B) [Distributive law] = 1 ∧ (A ∨ B) [Complement law] = A ∨ B [Identity law]
Answer: Q = A ∨ B (much simpler circuit!)
1.4.3(c) Karnaugh Maps
Definition
A Karnaugh map (K-map) is a graphical method for simplifying Boolean expressions by grouping adjacent cells containing 1s.
Key Point
K-Map Rules: • Group 1s in powers of 2 (1, 2, 4, 8) • Groups must be rectangular • Make groups as large as possible • Groups can wrap around edges • Each 1 must be in at least one group • Larger groups = simpler expression
Worked Example
Worked Example: 2-Variable K-Map (clear grouping)
Step 1: Start from the truth table.
A
B
Q
0
0
1
0
1
1
1
0
0
1
1
1
Step 2: Fill the K-map (rows = A, columns = B).
A\B
0
1
0
1
1
1
0
1
Step 3: Form largest valid groups (powers of 2).
Group
Cells used
Constant term
G1 (top row pair)
(A=0,B=0) and (A=0,B=1)
¬A
G2 (right column pair)
(A=0,B=1) and (A=1,B=1)
B
Notes: • Overlap is allowed (cell A=0,B=1 is used in both groups). • Grouping larger pairs reduces expression size.
Final simplified expression: Q = ¬A ∨ B
1.4.3(d) D-Type Flip-Flops
Flip-flops are the basic memory units in digital circuits - they can store one bit of data.
Definition
A D-type flip-flop is a memory device that captures the value of the D input at a specific moment (the clock edge) and holds it at the Q output.
Key Point
D Flip-Flop Signals: • D (Data) - The input value to be stored • CLK (Clock) - Controls WHEN to capture D • Q - The output (stored value) • ¬Q - The inverted output (complement of Q)
Worked Example
Worked Example: D Flip-Flop Behaviour
Rising-edge triggered flip-flop:
Clock edge
D at edge
Q after edge
T1 (↑)
1
1
T2 (↑)
0
0
T3 (↑)
1
1
T4 (↑)
1
1
T5 (↑)
0
0
At each rising edge (↑): • Q takes the value currently on D • Q then holds that value until the next clock edge • Changes to D between clock edges are ignored
Key point: The flip-flop only samples D when the clock edge occurs.
Key Point
Flip-Flop Applications: • Registers - Store multiple bits (8 flip-flops = 8-bit register) • Counters - Count clock pulses • Memory - Building block of RAM • State machines - Store current state • Frequency division - Divide clock speed by 2
Exam Tip
D flip-flop exam phrasing: • "Q takes the value of D on the active clock edge" • "Q holds that value between edges" • "Changes on D between edges do not affect Q"
Card 1 of 138%
Question
Boolean Logic
Click or drag to flip
Answer
A branch of algebra where logical operators (AND, OR, NOT) are used to process true or false values, underpinning digital circuits.
Click or drag to flip back
Browse all 13 flashcards for 1.4.3
Boolean Logic
A branch of algebra where logical operators (AND, OR, NOT) are used to process true or false values, underpinning digital circuits.
Boolean Expressions
An expression composed of Boolean variables and logical operators that evaluates to either TRUE or FALSE, e.g. A ∧ B ∨ ¬C.
Association Laws
Rules stating that the grouping of terms does not affect the result: A ∧ (B ∧ C) = (A ∧ B) ∧ C and A ∨ (B ∨ C) = (A ∨ B) ∨ C, simplifying expressions.
Commutation Laws
Rules stating that the order of operands does not affect the result: A ∧ B = B ∧ A and A ∨ B = B ∨ A, showing symmetry in logic.
Distribution Laws
Rules defining how AND and OR operations distribute: A ∧ (B ∨ C) = (A ∧ B) ∨ (A ∧ C) and A ∨ (B ∧ C) = (A ∨ B) ∧ (A ∨ C), key for simplification.
De Morgan's First Law
The negation of a disjunction is the conjunction of the negations: ¬(A ∨ B) = ¬A ∧ ¬B, used in circuit design and proofs.
De Morgan's Second Law
The negation of a conjunction is the disjunction of the negations: ¬(A ∧ B) = ¬A ∨ ¬B, essential for logical equivalence.
Double Negation Law
States that negating a value twice results in the original value: A = ¬¬A, simplifying negated expressions.
D-Type Flip Flops
A sequential circuit that stores a single bit of data, switching states on a clock edge based on input, e.g. used in registers.
Half Adders
A combinational circuit that adds two single-bit binary numbers, outputting a sum bit and a carry bit, e.g. 1 + 1 = 10 (sum 0, carry 1).
Full Adders
A combinational circuit that adds three bits (including a carry input), producing a sum and carry output, e.g. 1 + 1 + 1 = 11 (sum 1, carry 1).
Karnaugh Maps
A visual technique for simplifying Boolean expressions by grouping 1s in a grid to minimise logical operations, e.g. reducing A ∧ B ∨ A ∧ ¬B to A.
Logic Gate Diagrams
Graphical representations of Boolean expressions using standard symbols for logic gates (AND, OR, NOT), e.g. A ∧ B as an AND gate.
Exam questions for 1.4.3 Boolean algebra
21 OCR past paper questions (57 marks) with mark schemes
Answer each question, reveal the mark scheme, then award yourself marks. Scores and answers are saved in this browser so you can see which topics need more work.
Ben installs burglar alarms. The alarm is made up of a door sensor and a motion sensor. When the alarm is set, the siren will sound if either the door sensor or the motion sensor detect movement. The alarm also has a test mode setting. When the test mode setting is enabled, an engineer can check the sensors are working without the siren going off. Draw a logic circuit to show the logic that is used in the burglar alarm to determine if the siren goes off.
Show mark scheme
1 mark for each correct area including labelled inputs:
- NOT gate for test mode
- OR gate for door sensor and motion sensor
- AND gate combining alarm set with OR output
- AND gate combining with NOT test mode
Max 3 if any additional gates. NOT gate must have only one input, AND/OR gates must have two inputs.
Mark yourself: how many marks did you get?
/ 4
Question 2H446/01 · June 20241 mark
Simplify the Boolean expression ¬A v ¬B using De Morgan's First Law.
Show mark scheme
¬(A ∧ B) or NOT (A AND B) (1 mark)
Mark yourself: how many marks did you get?
/ 1
Question 3H446/01 · June 20241 mark
Simplify the Boolean expression ¬(¬B) using double negation.
Show mark scheme
B (1 mark)
Mark yourself: how many marks did you get?
/ 1
Question 4H446/01 · June 20242 marks
Simplify the Boolean expression (A v B) ∧ (A v C) using distribution.
Show mark scheme
A v (B ∧ C)
1 mark for A
1 mark for v (B ∧ C)
Doesn't need brackets. Allow other correct notation e.g. A+B.C
Mark yourself: how many marks did you get?
/ 2
Question 5H446/013 marks
Draw the logic gate diagram for this expression: Q = (A v ¬B) ∧ C
Show mark scheme
- A going into an OR gate
- B going into a NOT gate with the output going into the OR gate
- Output of the OR gate going into an AND gate with C
(3 marks - 1 per correct component)
Mark yourself: how many marks did you get?
/ 3
Question 6H446/012 marks
Give the Boolean expression that represents a logic circuit with inputs A, B, C and output P. Do not attempt to simplify the expression.
Show mark scheme
¬(A ∨ B) ∨ C or NOT (A OR B) XOR C
First part requires brackets, NOT A or B is incorrect. Can be written in different order as long as logically correct.
(2 marks)
Mark yourself: how many marks did you get?
/ 2
Question 7H446/01 · June 20234 marks
Use a Karnaugh map to find the simplified expression for a logic circuit.
Show mark scheme
Correct highlighting on K map
NOT A AND NOT C
D
OR joining the 2 correct expressions together
(4 marks - 1 per bullet)
Mark yourself: how many marks did you get?
/ 4
Question 8H446/014 marks
Elliott has designed a logic circuit. The expression he has created is: Q = (A ∧ ¬B) ∨ (¬A ∧ C ∧ D) ∨ (A ∧ B). Complete the Karnaugh Map to simplify this expression.
Show mark scheme
1 mark for filling in the table correctly
1 mark for correct first group
1 mark for correct second group
1 mark for the simplified expression: A ∨ (C ∧ D)
(4 marks)
Mark yourself: how many marks did you get?
/ 4
Question 9H446/013 marks
Draw a Logic diagram for the following expression: Q = ¬(A ∧ B) ∨ (C ∧ ¬D)
Show mark scheme
- An AND gate taking A and B as inputs with the output connecting to a NOT gate (or NAND gate)
- An AND gate taking C and the NOT of D as the inputs
- An OR gate taking the outputs of the NOT and AND gates
(3 marks - 1 per bullet)
Mark yourself: how many marks did you get?
/ 3
Question 10H446/011 mark
Draw an XOR gate.
Show mark scheme
Correct XOR gate symbol drawn (1 mark)
Accept diagram of gate only without input/output
Mark yourself: how many marks did you get?
/ 1
Question 11H446/012 marks
Explain the difference in the function of OR and XOR gates.
Show mark scheme
OR gate outputs true if at least one of its inputs is true
XOR gate outputs true if and only if one of its inputs is true (not both)
(2 marks - 1 per bullet)
Accept appropriate, correctly labelled, truth tables.
Mark yourself: how many marks did you get?
/ 2
Question 12H446/012 marks
A half adder has inputs A and B, and outputs S (Sum) and C (Carry). Give the Boolean expressions for the outputs S and C.
Show mark scheme
S = A ⊻ B (A XOR B)
C = A ∧ B (A AND B)
(2 marks - 1 per expression)
Mark yourself: how many marks did you get?
/ 2
Question 13H446/01 · June 20214 marks
Describe how a half adder logic circuit can be adapted to add together two 4-bit binary numbers.
Show mark scheme
Two half adders can be joined together
With an OR gate to form a full adder
4 full adders can be used to add two four bit numbers
Carry out on one joined to carry in on next
(4 marks - 1 per bullet)
Mark yourself: how many marks did you get?
/ 4
Question 14H446/013 marks
Users of a computer system have a unique username and password. The system has two-factor authentication so users must respond to either an email or text message containing a secret code. Let A be valid username, B be matching password, C be email response, D be text response, Q be entry allowed. Complete the Boolean expression for Q.
Show mark scheme
Q = A ∧ B ∧ (C ∨ D)
1 mark for (A ∧ B)
1 mark for (C ∨ D)
1 mark for the ∧ joining them
Brackets must be included. Accept alternative symbols for AND/OR.
Mark yourself: how many marks did you get?
/ 3
Question 15H446/01 · June 20212 marks
Simplify the Boolean expression Q = ¬(¬A ∧ ¬B) so that it does not include any negation. You must explain which Boolean algebra rule(s) you are using at each step.
Show mark scheme
Identification of De Morgan's and/or double negation rule
Correct final answer: A ∨ B
(2 marks)
Mark yourself: how many marks did you get?
/ 2
Question 16H446/015 marks
Complete the Karnaugh map for the Boolean expression (¬A ∧ ¬B) ∨ (A ∧ ¬B) and use it to find a simplified Boolean expression.
Show mark scheme
Left column filled with 1s for (¬A ∧ ¬B)
Right column filled with 1s for (A ∧ ¬B)
Middle 2 columns filled with zero or blank
Karnaugh map used to show 1s highlighted with overlap
Simplified expression: ¬B (NOT B)
(5 marks - 3 for map, 2 for expression)
Mark yourself: how many marks did you get?
/ 5
Question 17H446/01 · June 20202 marks
State the purpose of a D-type flip-flop circuit.
Show mark scheme
Delay/store a value
Of 1 bit
When a signal is given
(2 marks - 1 per bullet, max 2)
Mark yourself: how many marks did you get?
/ 2
Question 18H446/01 · June 20204 marks
Describe the inputs and outputs used by a D-type flip-flop circuit, explaining how the inputs are used to control the outputs.
Show mark scheme
Data input
Clock input
Q output
When clock input goes high, Q changes to D
NOT Q is reverse of Q
(4 marks - 1 per bullet, max 4)
Mark yourself: how many marks did you get?
/ 4
Question 19H446/013 marks
A cinema offers discounted tickets under these conditions: Customer is under 18 AND has a student card, OR Customer is over 60 AND has ID. Let A=under 18, B=student card, C=over 60, D=has ID, Q=discount issued. Complete the Boolean expression for Q.
Show mark scheme
Q = (A ∧ B) ∨ (C ∧ D)
1 mark for (A ∧ B)
1 mark for (C ∧ D)
1 mark for the ∨ joining the two parts
Accept alternative notation. Accept answers without brackets.
Mark yourself: how many marks did you get?
/ 3
Question 20H446/01 · June 20172 marks
Simplify the expression (E ∧ F) ∨ (E ∧ G).
Show mark scheme
E ∧ (F ∨ G) or (F ∨ G) ∧ E
1 mark for (F ∨ G)
1 mark for ∧ E
(2 marks)
Mark yourself: how many marks did you get?
/ 2
Question 21H446/01 · June 20173 marks
Draw a half adder using logic gates.
Show mark scheme
XOR Gate for Sum output
AND Gate for Carry output
Correct connections and no additional gates
(3 marks - 1 per bullet)
Mark yourself: how many marks did you get?
/ 3
Key Exam Tips for 1.4.3
1Logic gates: AND (all 1), OR (at least one 1), NOT (invert), XOR (different)