Truth Tables (AQA GCSE Computer Science)

Revision Note

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

AND Gates, OR Gates, NOT Gates & XOR Gates

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

and-gate


A

B

A. B

0

0

0

0

1

0

1

0

0

1

1

1

OR

Circuit symbol

Truth Table

or-gate


A

B

A plus B

0

0

0

0

1

1

1

0

1

1

1

1

NOT

Circuit symbol

Truth Table

not-gate


A

top enclose A

0

1

1

0

XOR (exclusive)

Circuit symbol

Truth Table

xor-gate


A

B

A circled plus B

0

0

0

0

1

1

1

0

1

1

1

0

Worked Example

Describe the purpose of a truth table [2]

Answer

  • To show all possible inputs (to the logic circuit)

  • ...and the associated/dependant output (for each input)

Guidance

  • Must be clear that the output is linked to the input values given

  • "All possible combinations of inputs and outputs" only gets 1 mark

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 // P space equals space open parentheses A. B close parentheses. top enclose 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 table with three columns A, B, and C, and eight rows displaying binary values. Column headers have blue backgrounds, and the table alternates between 0s and 1s.
  • Add a new column to show the results of the brackets first (A AND B // A. B)

Table with columns labeled A, B, C, and A.B. Rows contain binary values representing a logical operation; A.B is the result of a logical AND on A and B.
  • Add a new column to show the results of NOT C // top enclose C

A logical truth table with columns labeled A, B, C, A.B, and C̅. The table contains rows of binary values (0 and 1) representing logic operations.
  • 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

Truth table with columns A, B, C, A.B, C̅, and P displaying binary values (0 or 1) for different combinations of A, B, and C. Rows include highlighted calculations.

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.

Worked Example

Complete the truth table for the following logic diagram [3]

logic-diagram-v2
A table with columns titled T, M, A filled with 0 and 1 values, and three empty columns titled X, Y, P. Column headers have a blue background.

Answers

A truth table with input columns T, M, A, and output columns X, Y, P. Rows contain binary values 0 or 1. Outputs are highlighted in green.

Guidance

  • 1 mark per column

Last updated:

You've read 0 of your 5 free revision notes this week

Sign up now. It’s free!

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

the (exam) results speak for themselves:

Did this page help you?

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

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.