Logic Expressions (Cambridge (CIE) IGCSE Computer Science): Revision Note

Exam code: 0478 & 0984

James Woodhouse

Written by: James Woodhouse

Reviewed by: Lucy Kirkham

Updated on

Logic Expressions

  • A logic expression is a way of expressing a logic gate or logic circuit as an equation

  • The output appears on the left of the equals sign with the inputs and logic gates on the right

Gate

Symbol

Truth Table

Logic Expression

NOT

not

A

Z

0

1

1

0

Z = NOT A

AND

and

A

B

Z

0

0

0

0

1

0

1

0

0

1

1

1

Z = A AND B

OR

or

A

B

Z

0

0

0

0

1

1

1

0

1

1

1

1

Z = A OR B

NAND

nand

A

B

Z

0

0

1

0

1

1

1

0

1

1

1

0

Z = A NAND B

NOR

nor

A

B

Z

0

0

1

0

1

0

1

0

0

1

1

0

Z = A NOR B

XOR

xor

A

B

Z

0

0

0

0

1

1

1

0

1

1

1

0

Z = A XOR B

  • Logic circuits containing multiple gates can also be expressed as logic expressions/statements

An example logic circuit containing two inputs

screenshot-2023-05-30-at-09-28-55
  • The logic circuit above can be expressed as the logic expression Q= NOT(A OR B) 

 

An example logic circuit containing two inputs

screenshot-2023-05-30-at-09-29-06
  • The logic circuit above can be expressed as the logic expression Q= (NOT A) AND B 

 

An example logic circuit containing three inputs


  • The logic circuit above can be expressed as the logic expression P = ((NOT A) OR B) NAND C

 

An example logic circuit containing three inputs

screenshot-2023-05-30-at-09-35-30
  • This logic circuit above can be expressed as X = NOT (A NAND B) OR (B NOR C)

Examiner Tips and Tricks

  • You may be required to write a logic expression/statement from a truth table or a logic circuit. You may also have to do the opposite - draw a logic circuit and complete a truth table for a logic expression

Worked Example

Consider the logic statement: X = (((A AND B) OR (C AND NOT B)) XOR NOT C) 

a. Draw a logic circuit to represent the given logic statement. [6]

Answer

screenshot-2023-05-30-at-09-37-21

One mark per correct logic gate, with the correct input

For teachers

Ready to test your students on this topic?

  • Create exam-aligned tests in minutes
  • Differentiate easily with tiered difficulty
  • Trusted for all assessment types
Explore Test Builder
Test Builder in a diagram showing questions being picked from different difficulties and topics, and being downloaded as a shareable format.
James Woodhouse

Author: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.

Lucy Kirkham

Reviewer: Lucy Kirkham

Expertise: Head of Content Creation

Lucy has been a passionate Maths teacher for over 12 years, teaching maths across the UK and abroad helping to engage, interest and develop confidence in the subject at all levels.Working as a Head of Department and then Director of Maths, Lucy has advised schools and academy trusts in both Scotland and the East Midlands, where her role was to support and coach teachers to improve Maths teaching for all.