AS Level · Topic 3.2
A-Level Computer Science 9618 / Topic 3 / AS

Six gates, one output.

Every operation inside a processor is built from logic gates: tiny circuits that take binary inputs and give one binary output by a fixed rule. Learn the six standard symbols, define what each gate does, and construct the truth table for each one.

The key idea

A logic gate takes binary inputs (0 or 1) and produces one binary output. NOT has one input and inverts it; in 9618 every other gate has exactly two inputs. AND outputs 1 only if both inputs are 1; OR outputs 1 if at least one input is 1; XOR (EOR) outputs 1 if the inputs are different. NAND and NOR are AND and OR with the output inverted, shown by a small circle on the symbol. A truth table lists the output for every combination of inputs: 2 rows for one input, 4 for two, 8 for three.

NOT A X X = NOT A AND A B X X = A AND B OR A B X X = A OR B NAND A B X X = A NAND B NOR A B X X = A NOR B XOR A B X X = A XOR B
Fig. 1: the standard symbols for the six logic gates used in 9618
Section 01

NOT, AND and OR.

Pick a gate in the lab and switch its inputs on and off. The output lamp lights for 1. Check every row of each truth table against the lab.

AX = NOT A
01
10
ABA AND BA OR B
0000
0101
1001
1111
Examiner trap

Draw the shapes carefully: AND has a straight back, OR a curved back. A NOT gate must have its circle; a triangle alone is a buffer, not a NOT gate.

Section 02

NAND and NOR: inverted outputs.

NAND means NOT AND, and NOR means NOT OR. Work out AND or OR first, then invert every output. The circle on the symbol is the inversion.

ABA AND BA NAND BA OR BA NOR B
000101
010110
100110
111010
Worked example Reading a gate
A NOR gate has inputs A = 0 and B = 1. What is the output?
  1. Work out OR first: 0 OR 1 = 1.
  2. NOR inverts this: NOT 1 = 0.
Answer: 0
Your turn
Both inputs of a NAND gate are connected to the same input A. Complete the outputs for A = 0 and A = 1, and name the single gate this behaves like.
Stage 1 · Learn

Check what the sim just showed you

Four quick checks. Each correct answer earns XP and records this skill on your profile.

Quick check+10 XP

Which gate outputs 1 only when both of its inputs are 0?

Quick check+10 XP

In the lab, an XOR gate has both input switches on. What is the output?

Quick check+10 XP

What does the small circle on the output of a NOR gate symbol show?

Quick check+10 XP

How many rows does the truth table for a circuit with three inputs need?

Section 03

XOR: inputs different.

XOR (exclusive OR, also written EOR) is like OR, except that it outputs 0 when both inputs are 1. Its symbol is the OR shape with an extra curved line behind it. Compare OR and XOR row by row in the lab.

ABA OR BA XOR B
0000
0111
1011
1110
Examiner trap

Learn the output columns in the order 00, 01, 10, 11: AND 0001, OR 0111, NAND 1110, NOR 1000, XOR 0110. Writing rows in binary counting order means you never miss a combination.

Stage 2 · Exam

Exam-style questions

Unlocks once the four checks above are done. Worth more XP, written to AS Paper 1 and Paper 2 standard.

Finish the four checks above to unlock the exam questions
Exam style+20 XP

For inputs (A, B) in the order 00, 01, 10, 11, which output column belongs to a NAND gate?

Exam style+20 XP

A gate has two inputs. Its output is 1 when the inputs are different and 0 when they are the same. Which gate is it?

Exam style+20 XP

Which statement about the gates in the 9618 syllabus is correct?

Exam style+20 XP

An OR gate and a NOR gate both receive inputs A = 1 and B = 0. What are the two outputs?

Skill unlocked

Logic gates, mastered.

This skill is now recorded on your profile. Keep the chain going.

-Rank -Level -Score -Topics
Go deeper · practice
Six original Cambridge-style questions
The symbols, functions and truth tables of NOT, AND, OR, NAND, NOR and XOR.