Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

Student and Teacher User Guides |   Schemes of Work |   Real Teacher use Videos |

Join 30000+ teachers and students using TTIO.

Truth Tables

You use truth tables to predict the output depending on certain inputs. In truth tables you list all possible inputs, and then, based on the gate used, can accurately predict the output. The inputs can be listed as T or F or as 1 (which is TRUE) or 0 (which is FALSE)

Truth table for NOT P

The following image shows a truth table for output ~ P (NOT P). If the input is T, the output is F and if the input is F the output is T.

Truth table for AND

In the following truth table we have TWO inputs, P and Q. In order for the output to be TRUE (T), both inputs need to be T.  This truth table corresponds to the nature of an AND gate. 

Truth table for OR

In this example, note that either one of the inputs needs to be T for the output to be T. 

Suggested Video

Further Reading

https://www.bbc.co.uk/bitesize/guides/zc4bb9q/revision/2

https://en.wikipedia.org/wiki/Truth_table

Source for images: brilliant. org / wiki/truth-tables

www.teachyourselfpython.com