Level:
Correct: 0
Incorrect: 0
Marks: 0/0
Exam Practice
Subject:
Topics:
Avg
score:
–
Topics
done:
0/32

Logic circuits

Practise 33 exam-style questions on Logic circuits for Cambridge IGCSE Computer Science (Paper 2). Write your answer as you would in the exam and get it marked in seconds against the mark scheme, point by point, with an AI tutor on hand if you get stuck.

  • 33 questions
  • 1–6 marks each
  • Instant marking
  • No sign-up needed
20 questions, marked as you go

Sample questions with model answers

Here are 4 of the questions in this topic, each with a model answer, an explanation of why it earns the marks and the mark scheme an examiner would use.

Question 1

1 mark

A car dashboard has a warning light W controlled by a logic circuit with three inputs:
L = 1 when the oil level is low
T = 1 when the engine temperature is high
E = 1 when the engine is running

The warning light is on (W = 1) when the oil level is low or the engine temperature is high, and the engine is running.

The logic circuit shown has been drawn for this system, but one gate is shown as a blank box, P.

Identify gate P.

Logic circuit with three inputs, E, L and T, on the left and one output, W, on the right. It has two logic gates (numbered here from left to right, then top to bottom): gate 1 is drawn as a blank box labelled P, with inputs L and T; gate 2 is an AND gate with inputs from gate 1 (upper) and input E (lower), and its output is W. As a logic expression, with P standing for the blank gate: W = (L P T) AND E.

Model answer

P is an OR gate.

Explanation

Gate P joins L and T, and the statement says "the oil level is low or the engine temperature is high", so P is an OR gate. Its output then goes into the AND gate with E, because the engine must also be running.

Mark scheme
  1. 1 mark

    OR

    Accept OR gate.

Question 2

2 marks

A garage door Z is controlled by a logic circuit with three inputs:
L = 1 when the door is locked
R = 1 when the remote control button is pressed
K = 1 when the correct code is entered on the keypad

The door opens (Z = 1) when the door is not locked and either the remote control button is pressed or the correct keypad code is entered.

The logic circuit shown has been drawn for this system, but two of its gates are shown as blank boxes, P and Q.

Identify gate P and gate Q.

Logic circuit with three inputs, K, L and R, on the left and one output, Z, on the right. It has three logic gates (numbered here from left to right, then top to bottom): gate 1 is drawn as a blank box labelled P, with input L; gate 2 is drawn as a blank box labelled Q, with inputs R and K; gate 3 is an AND gate with inputs from gate 1 (upper) and gate 2 (lower), and its output is Z. As a logic expression, with P and Q standing for the blank gates: Z = (P L) AND (R Q K).

Model answer

P: NOT
Q: OR

Explanation

Gate P has a single input, L, and "not locked" means L must be inverted, so P is a NOT gate. "Either the remote ... or the keypad" joins R and K with an OR gate, so Q is an OR gate; the AND gate then combines the two conditions.

Mark scheme
  1. 1 mark

    P is a NOT gate

  2. 1 mark

    Q is an OR gate

Question 3

3 marks

A quiz machine has a lamp L controlled by a logic circuit with three inputs:
P = 1 when contestant 1 has pressed their buzzer
Q = 1 when contestant 2 has pressed their buzzer
R = 1 when the quizmaster presses the reset button

The lamp lights (L = 1) when exactly one of the two contestants has pressed their buzzer and the quizmaster is not pressing the reset button.

Describe the logic circuit for this system. For each logic gate, state its type and its inputs.

Model answer

An XOR gate with inputs P and Q.
A NOT gate with input R.
An AND gate with inputs from the XOR gate and the NOT gate. Its output is L.

Explanation

"Exactly one of the two" is the XOR function: it is 1 when P and Q are different. An OR gate would wrongly light the lamp when both contestants press. The reset must not be pressed, so R goes through a NOT gate, and an AND gate requires both conditions.

Mark scheme
  1. 1 mark

    An XOR gate with inputs P and Q

    1 mark for each correct gate with its correct inputs. Accept L = (P XOR Q) AND (NOT R). For MP1 accept a correct sub-circuit giving 1 only when exactly one of P and Q is 1.

  2. 1 mark

    A NOT gate with input R

  3. 1 mark

    An AND gate whose inputs are the outputs of the XOR gate and the NOT gate, giving output L

Question 4

4 marks

A games console has an LED X controlled by a logic circuit with three inputs:
A = 1 when player 1 has pressed their button
B = 1 when player 2 has pressed their button
C = 1 when the console is in demo mode

The LED lights (X = 1) when exactly one of the two players has pressed their button, or when the console is in demo mode and neither player has pressed their button.

Describe the logic circuit for this system, without simplification. For each logic gate, state its type and its inputs.

Model answer

Gate 1: XOR gate, inputs A and B.
Gate 2: NOR gate, inputs A and B.
Gate 3: AND gate, inputs C and the output of gate 2.
Gate 4: OR gate, inputs are the outputs of gate 1 and gate 3. Its output is X.

Explanation

"Exactly one" is XOR and "neither ... nor" is NOR, so A and B each feed two gates. The demo-mode condition needs C AND (A NOR B), and the two conditions are joined by OR. Using OR in place of XOR is the most common error: it would light the LED when both players press.

Mark scheme
  1. 1 mark

    An XOR gate with inputs A and B

    1 mark for each correct gate with its correct inputs. Accept X = (A XOR B) OR (C AND (A NOR B)).

  2. 1 mark

    A NOR gate with inputs A and B

    Accept an OR gate followed by a NOT gate, or NOT gates on A and B feeding an AND gate.

  3. 1 mark

    An AND gate whose inputs are C and the output of the NOR gate

  4. 1 mark

    An OR gate whose inputs are the outputs of the XOR gate and the AND gate, giving output X

Ready to try the rest? Every answer you write is marked against the mark scheme, so you can see exactly where the marks are.

AI Tutor Hints first, answers after you try

Hi! Stuck? Ask me for a hint and I’ll help you work it out. Once you’ve checked your answer I can explain exactly where the marks are.