← IGCSE Computer Science Paper 2

Where NOT applies in an expression

NOT before a bracket flips the whole bracket's result. In (NOT A) AND B, NOT flips only input A, so NOT (A AND B) gives different results.

Understanding Where NOT applies in an expression in IGCSE Computer Science Paper 2

What it does: Only A is inverted. B goes into the AND gate unchanged, so the NOT is on one input only. The bracket holds A AND B, and NOT flips its output. This is the same as a NAND gate. NOT is placed before the bracket, so it flips the result of everything inside the bracket. A AND B = 1, and NOT makes it 0. For (NOT A) AND B: NOT 1 = 0, then 0 AND 1 = 0 as well, so check carefully. Here NOT (A AND B) is 0, and (NOT A) AND B is also 0, so use A = 0 and B = 1 to tell them apart.

Common mistakes: NOT must go before the bracket so it flips the whole result of A AND B. (NOT A) AND B only flips A, giving 0 here instead of 1. It should be X = NOT (A AND B). The comment says NOT applies to input A only, so A needs its own brackets: (NOT A) AND B. NOT (A AND B) flips the whole bracket and gives 1, not 0.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 552–561) and word search (Modules 539–580).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
In X = NOT (A AND B), what does NOT apply to?
The output of the bracket (A AND B)Only input A
Matches
X = NOT A AND B (meant: NOT (A AND B))
↓
The brackets are missing, so NOT applies only to A. The student wanted NOT to flip the whole result of A AND B.
Applying
Meanings
Term
NOT (A AND B)
Meaning
NOT before a bracket flips the whole bracket's result. In (NOT A) AND B, NOT flips only input A, so NOT (A AND B) gives different results.
Practice
X = NOT (A AND B)
Testing
Gaps
X = (A AND B)
Check Answer
Spots
1# A=1, B=0, so X must be 1
2X = (NOT A) AND B

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Galaxy Phoenix' badge — Orbit Champion, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. In X = NOT (A AND B), what does NOT apply to?
A. The output of the bracket (A AND B) ✓
B. Only input A
NOT is placed before the bracket, so it flips the result of everything inside the bracket.
2. In X = (NOT A) AND B, what does NOT apply to?
A. Only input A ✓
B. The output of A AND B
The bracket contains only NOT A, so NOT flips input A before it reaches the AND gate. B is not changed.
3. A = 1 and B = 1. Which expression gives X = 0?
A. (NOT A) AND B
B. NOT (A AND B) ✓
A AND B = 1, and NOT makes it 0. For (NOT A) AND B: NOT 1 = 0, then 0 AND 1 = 0 as well, so check carefully. Here NOT (A AND B) is 0, and (NOT A) AND B is also 0, so use A = 0 and B = 1 to tell them apart.
4. A = 0 and B = 1. Which expression gives X = 1?
A. NOT (A AND B)
B. (NOT A) AND B ✓
(NOT A) AND B: NOT 0 = 1, then 1 AND 1 = 1. NOT (A AND B): 0 AND 1 = 0, then NOT 0 = 1. Both give 1, so try A = 1, B = 0 to separate them.
5. A = 1 and B = 0. Which expression gives X = 1?
A. NOT (A AND B) ✓
B. (NOT A) AND B
NOT (A AND B): 1 AND 0 = 0, NOT 0 = 1. (NOT A) AND B: NOT 1 = 0, then 0 AND 0 = 0. The two expressions give different results.

Match the Pairs

(NOT A) AND B → NOT flips only input A first. The result of that is then ANDed with B.
NOT (A AND B) → A AND B is worked out first. NOT then flips the whole result of the bracket.
NOT applies to the input A alone, and B is not changed before the AND → X = (NOT A) AND B
NOT is applied to the output of an AND gate, so it flips the result of the bracket → X = NOT (A AND B)
X = NOT A AND B (meant: NOT (A AND B)) → The brackets are missing, so NOT applies only to A. The student wanted NOT to flip the whole result of A AND B.
X = NOT (A AND B) (meant: (NOT A) AND B) → The brackets are placed round A AND B, so NOT flips the final output. The student wanted NOT on input A only.

Key Term

NOT (A AND B)
NOT before a bracket flips the whole bracket's result. In (NOT A) AND B, NOT flips only input A, so NOT (A AND B) gives different results.

Fill in the Blanks

1. X = NOT (A AND B)
Hint: Type the gate keyword placed before the bracket so it flips the whole bracket's result.
2. X = (NOT A) AND B
Hint: Type the gate that combines the result of NOT A with input B.
3. X = (NOT A) AND B
Hint: Type the input letter that NOT flips on its own, the one named first in the expression.
4. When A = 1 and B = 0: NOT (A AND B) = 1
Hint: Work out A AND B first, then flip that bracket result. Type the final output bit.
5. When A = 1 and B = 0: (NOT A) AND B = 0
Hint: Flip only input A, then AND the result with B. Type the final output bit.

Spot the Error

Question 1
A # A=1, B=0, so X must be 1
B X = (NOT A) AND B
C # bracket = 0, NOT gives 1
Line B — NOT must go before the bracket so it flips the whole result of A AND B. (NOT A) AND B only flips A, giving 0 here instead of 1. It should be X = NOT (A AND B).
Question 2
A # A=1, B=0, so X must be 0
B # NOT flips only input A
C X = NOT (A AND B)
Line C — The comment says NOT applies to input A only, so A needs its own brackets: (NOT A) AND B. NOT (A AND B) flips the whole bracket and gives 1, not 0.
Question 3
A a = True
B b = False
C x = not a and b
D print(x) # True
Line C — Without brackets, not applies only to a, so the result is False. To flip the whole result of a and b, write x = not (a and b), which gives True.
Question 4
A A = 0, B = 0
B A AND B = 0
C NOT (A AND B) = 1
D (NOT A) AND B = 1
Line D — NOT A is 1 and B is 0, so 1 AND 0 = 0. The answer should be (NOT A) AND B = 0, which differs from NOT (A AND B) = 1.
Question 5
A A = 1, B = 1
B A AND B = 1
C NOT (A AND B) = 1
D (NOT A) AND B = 0
Line C — A AND B is 1, and NOT flips the bracket's result, so NOT (A AND B) = 0, not 1.

Student with a class code? Join your class →