Truth Tables (Cambridge (CIE) IGCSE Computer Science)

Revision Note

James Woodhouse

Written by: James Woodhouse

Reviewed by: Lucy Kirkham

Truth Tables

What is a truth table?

  • A truth table is a tool used in logic and computer science to visualise the results of Boolean expressions

  • They represent all possible inputs and the associated outputs for a given Boolean expression

AND 

Circuit symbol

Truth Table

screenshot-2023-05-30-at-08-24-36

A

B

A AND B

0

0

0

0

1

0

1

0

0

1

1

1

OR

Circuit symbol

Truth Table

screenshot-2023-05-30-at-08-24-49

A

B

A OR B

0

0

0

0

1

1

1

0

1

1

1

1

NOT

Circuit symbol

Truth Table

screenshot-2023-05-30-at-08-24-28

A

NOT

0

1

1

0

XOR (exclusive)

Circuit symbol

Truth Table

screenshot-2023-05-30-at-08-25-28

A

B

A XOR B

0

0

0

0

1

1

1

0

1

1

1

0

NAND (not and)

Circuit symbol

Truth Table

screenshot-2023-05-30-at-08-25-01

A

B

NOT (A AND B)

0

0

1

0

1

1

1

0

1

1

1

0

NOR (not or)

Circuit symbol

Truth Table

Logic gate diagram showing a NOR gate with two input lines on the left and one output line on the right with a small circle.

A

B

NOT (A OR B)

0

0

1

0

1

0

1

0

0

1

1

0

Truth Tables for Logic Circuits

How do you create truth tables for logic circuits?

  • To create a truth table for the expression P = (A AND B) AND NOT C 

    • Calculate the numbers of rows needed (2number of inputs)

    • In this example there are 3 inputs (A, B, C) so a total of 8 rows are needed (23)

    • To not miss any combination of inputs, start with 000 and count up in 3-bit binary (0-7)

A

B

C

0

0

0

0

0

1

0

1

0

0

1

1

1

0

0

1

0

1

1

1

0

1

1

1

  • Add a new column to show the results of the brackets first (A AND B)

A

B

C

A AND B

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

1

1

1

1

1

  • Add a new column to show the results of NOT C

A

B

C

A AND B

NOT C

0

0

0

0

1

0

0

1

0

0

0

1

0

0

1

0

1

1

0

0

1

0

0

0

1

1

0

1

0

0

1

1

0

1

1

1

1

1

1

0

  • The last column shows the result of the Boolean expression (P) by comparing (A AND B) AND NOT C // open parentheses A. B close parentheses. top enclose C

A

B

C

A AND B

NOT C

P

0

0

0

0

1

0

0

0

1

0

0

0

0

1

0

0

1

0

0

1

1

0

0

0

1

0

0

0

1

0

1

0

1

0

0

0

1

1

0

1

1

1

1

1

1

1

0

0

Examiner Tips and Tricks

It is possible to create a truth table when combining expressions that show only the inputs and the final outputs.

The inclusion of the extra columns supports the process but can be skipped if you feel able to do those in your head as you go.

Last updated:

You've read 0 of your 10 free revision notes

Unlock more, it's free!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Did this page help you?

James Woodhouse

Author: James Woodhouse

Expertise: Computer Science

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

Author: Lucy Kirkham

Expertise: Head of STEM

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.