I agree (or if I am under 13 my parent or guardian agrees on my behalf) to the terms and conditions of use and that: - My test statistics may be published on the site leaderboard against my username - My teacher(s) can review my test scores - I can receive feedback on my tests from my teacher(s)
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.
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.