Logic Gates & Logic Circuits (Cambridge (CIE) A Level Computer Science): Exam Questions

Exam code: 9618

45 mins12 questions
12 marks

A security system has both a floodlight (very bright light) and an audio alarm.

The data from multiple sensors is analysed and used to:

  • turn on the floodlight

  • sound the audio alarm.

Sensors can be used to detect:

  • if doors are open

  • the external daylight level

  • if people are detected within a set distance.

The floodlight (X) and audio alarm (Y) operate according to the following criteria:

Parameter

Description of parameter

Binary value

Condition

A

External daylight level

1

Low

0

High

B

Front door

1

Open

0

Closed

C

Person is within 2 m

1

Detected

0

Not detected

D

Back door

1

Open

0

Closed

E

Security system

1

Switched on

0

Switched off

The floodlight turns on (X = 1) if:

  • the security system is switched on

    and

  • the external daylight level is low

    and

  • a person is detected within 2m.

The audio alarm turns on (Y = 1) if:

  • the security system is switched on

    and

  • one or more doors are open, or a person is detected within 2m.

Write logic expressions for the security system.

2a2 marks

Complete the truth table for the logic expression:

X = (A XOR B) NAND (A AND (B XOR C))

A

B

C

Workspace

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

2b2 marks

Draw the logic circuit for the logic expression:

W = P NAND ((Q OR NOT R) XOR (P XOR Q))

Rectangular diagram with letters P, Q, R on the left and W on the right, all pointing to the rectangle's edges, labels represent sections or points.
3a1 mark

Describe the operation of a 2-input XOR gate.

3b2 marks

Write the logic expression for the following logic circuit.

Logic gate circuit with A, B, C inputs; connected via AND, OR, NOT gates, producing output X. Gates are arranged in a combination circuit.
3c2 marks

Draw the logic circuit for the logic expression:

X = ((NOT A AND (B AND C)) OR (B NAND C)) AND NOT A

Rectangle with points labelled A, B, C on the left side and X on the right side, each connected by a short line to the rectangle's edge.
4a1 mark

Tick (✓) one box to identify the correct logic statement for this truth table.

A

B

C

X

0

0

0

1

0

0

1

0

0

1

0

0

0

1

1

0

1

0

0

0

1

0

1

0

1

1

0

1

1

1

1

0

☐ NOT (A AND B AND C)

☐ (A XOR B) NOR C

☐ (A OR B OR C) NOR C

☐ NOT A AND NOT B AND NOT C

4b2 marks

Draw a logic circuit for the logic expression:

X = NOT (NOT A AND (NOT B XOR C))

Diagram of a rectangle with labels A, B, C on the left side and X on the right side, illustrating points on the rectangle's perimeter.
5a4 marks

Describe the operation of each of the following logic gates:

NAND .......................

NOR ........................

XOR .........................

OR ..........................

5b2 marks

Draw a logic circuit for this logic expression:

X = NOT ((A AND B) OR (C AND D))

Diagram with a rectangle labelled A, B, C, D on the left and X on the right, indicating positions or sections within the shape.
63 marks

Each of the following truth tables has three inputs (A, B and C) and one output (X).

Draw one line to match each truth table with its logic expression.

Three truth tables and six logic expressions, including NOT (A XOR B) AND C and A NAND B NAND C, for comparing logical equivalence.
73 marks

The diagram shows a logic circuit.

Logic circuit diagram with inputs A, B, C. Features NOT gate P, AND gates Q, R, S, and OR gate Z. Connections between gates are shown.

Complete the truth table for the given logic circuit. Show your working.

Working space

A

B

C

P

Q

R

S

Z

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

83 marks

The diagram shows a logic circuit.

Logic circuit diagram with three inputs A, B, C, through NOT gates P, Q, R, leading to AND and OR gates, resulting in output Z.

Complete the truth table for the given logic circuit. Show your working.

Working space

A

B

C

P

Q

R

S

T

Z

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

9a2 marks

Complete the truth table for the logic expression:

X = NOT (A NAND B) XOR (NOT B AND (B NOR C))

A

B

C

Working space

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

9b2 marks

Draw a logic circuit for the logic expression:

X = (A AND NOT (B OR C)) AND (B NOR C)

Diagram of a rectangle with labels A, B, C on the left side and X on the right side, indicating specific points on the rectangle's perimeter.
10a3 marks

Write the Boolean expression that corresponds to the following logic circuit.

Logic circuit diagram with inputs A, B, C. It includes NAND, OR, NOT, and AND gates. The output X is generated through these gates from inputs.
10b2 marks

Complete the truth table for the logic expression:

X = A XOR (B AND (A NAND B) AND NOT C)

A

B

C

Working space

X

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

11a2 marks

Complete the truth table for the logic expression:

Y = ((P AND Q) XOR ((NOT Q) OR R)) AND NOT P

P

Q

R

Working space

Y

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

11b2 marks

Draw a logic circuit for the logic expression:

Y = ((P AND Q) XOR ((NOT Q) OR R)) AND NOT P

Diagram of a rectangle labelled P, Q, R on the left and Y on the right, with lines connecting labels to the rectangle's sides.
123 marks

This diagram represents a logic circuit.

Logic circuit with inputs A, B, C into a NAND gate, a NOT gate, input D to an AND gate, and an OR gate producing output Z.

Complete the truth table for the given logic circuit.

A

B

C

D

Working space

Z

0

0

0

0

0

0

0

1

0

0

1

0

0

0

1

1

0

1

0

0

0

1

0

1

0

1

1

0

0

1

1

1

1

0

0

0

1

0

0

1

1

0

1

0

1

0

1

1

1

1

0

0

1

1

0

1

1

1

1

0

1

1

1

1