TopMyGrade

GCSE/Computer Science/OCR

2.4.1Logic gates AND, OR, NOT; constructing logic circuits and truth tables; combining gates

Notes

Boolean logic: AND, OR, NOT gates and truth tables

Boolean logic is tested on every OCR J277 Paper 2. Expect truth table questions (completing a table for a given circuit), circuit diagram questions (draw the gates for a Boolean expression), and expression questions (write the expression for a circuit). These are reliable marks — learn the rules.

Basic logic gates

NOT gate (inverter)

ANOT A
01
10
  • Inverts the input. If A is true (1), NOT A is false (0). Written: ¬A or NOT A or A'.

AND gate

ABA AND B
000
010
100
111
  • Output is 1 only if both inputs are 1. Written: A AND B or A · B.

OR gate

ABA OR B
000
011
101
111
  • Output is 1 if at least one input is 1. Written: A OR B or A + B.

Combined gates — worked example

Expression: NOT (A AND B) OR C

Step 1: Evaluate A AND B. Step 2: Apply NOT to that result. Step 3: OR the result with C.

Full truth table (A, B, C all possible combinations — 8 rows for 3 inputs: 2³):

ABCA AND BNOT(A AND B)NOT(A AND B) OR C
000011
001011
010011
011011
100011
101011
110100
111101

Drawing logic circuits

  • NOT: triangle with a small circle at the output.
  • AND: flat-backed D-shape gate.
  • OR: curved D-shape gate (input side concave).

Wires connect inputs → gates → output.

Common OCR exam mistakes

  1. AND gate confusion: "both inputs must be 1" — even 1+0 gives 0. Only 1 AND 1 = 1.
  2. NOT applied after the gate (NAND-like result) — read expressions carefully for brackets: NOT(A AND B) ≠ NOT A AND NOT B.
  3. Row count for truth tables: 2 inputs → 4 rows (2²); 3 inputs → 8 rows (2³). Always list binary in order (000, 001, 010, 011, …).
  4. Writing the wrong number of columns — include intermediate columns for each gate in the expression.

AI-generated · claude-opus-4-7 · v3-ocr-computer-science

Practice questions

Try each before peeking at the worked solution.

  1. Question 14 marks

    Complete a truth table

    Complete the truth table for the expression: (A OR B) AND (NOT C)

    ABCA OR BNOT C(A OR B) AND (NOT C)
    000
    001
    010
    011
    100
    101
    110
    111

    [4 marks]

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-ocr-computer-science

  2. Question 22 marks

    Write a Boolean expression

    A logic circuit has two inputs A and B. The output is 1 if A is 0, OR if both A and B are 1. Write the Boolean expression for this circuit. [2 marks]

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-ocr-computer-science

  3. Question 33 marks

    Gate identification

    State the output of each gate:
    (a) AND gate with inputs A=1, B=0 [1]
    (b) OR gate with inputs A=0, B=0 [1]
    (c) NOT gate with input A=1 [1]

    Ask AI about this

    AI-generated · claude-opus-4-7 · v3-ocr-computer-science

Flashcards

2.4.1 — Logic gates AND, OR, NOT; constructing logic circuits and truth tables; combining gates

10-card SR deck for OCR Computer Science (J277) topic 2.4.1

10 cards · spaced repetition (SM-2)