Navigation

Authors

Useful programs

Logic Gates Extras

 

How-to: Draw Truth Tables and Venn Diagrams

 
 

Truth Tables

Truth tables are created to easily display the inputs and outputs of logic circuits. They can show the inputs and outputs of a single logic gate to a complex circuit with multiple gates.

All truth tables consist of columns for input and a column for output. However, extra columns can be added to make the job easier and find the outputs of a logic circuit easier.

Truth tables for single logic gates are relatively simple. One or two columns for the input depending on the number of inputs, and a single output column.

Here is a truth table for a very simple NOT gate.

NOT Gate
Truth Table: NOT Gate
InputOutput
AX
01
10

As you can see you list all the possible inputs, in this case only two, in the input column and then using the "math equations" or boolean equations given for each gate in order to get the output results.

This is a more complex gate with two inputs, the AND gate.

AND Gate
Truth Table: AND Gate
InputOutput
ABX
000
010
100
111

Now we will show you a simple circuit with a few gates. This circuit has several steps. This is the final truth table based on the circuit on the right.

Circuit 1
Truth Table: Circuit Gate
InputOutput
ABX
000
011
101
111

This may be difficult to do in one step, especially if the circuits have even more different gates, which is why we can add extra columns into the truth table. After each gate in the circuit, we will give it another column. Here is the circuit with the new variables included. (The line over the A symbolizes a "not" in other words the line means to take the opposite of A.)

Circuit 1a

The new table will include a column for A(not) and M.

Here's the final truth table

Truth Table: Circuit 1
InputSub Inputs/OutputsOutput
ABMX
00100
01101
10001
11011

As you can see, finding the outputs one at a time is much easier then finding the final answer in one go.

Here's another example.

Circuit 1a

There are many more gates here, so there are more steps. Though this will take a longer time, it is not any more difficult. As always, first label the diagram after each gate using different variables. Here is a labeled version of the circuit. Remember that any variable can be used, but generally variables between the variables chosen for the inputs and outputs are used.

Circuit 1a

Now create the truth table with all the columns for different steps.

Truth Table: Circuit 2
Inputs Sub Inputs/Outputs Outputs
A B C D M N O P Q X
0 0 0 0 0 1 0 0 1 1
0 0 0 1 0 1 1 0 0 1
0 0 1 0 0 0 1 0 0 1
0 0 1 1 0 0 0 0 1 1
0 1 0 0 1 1 0 1 1 0
0 1 0 1 1 1 1 1 0 1
0 1 1 0 1 0 1 0 0 1
0 1 1 1 1 0 0 0 1 1
1 0 0 0 1 1 0 1 1 0
1 0 0 1 1 1 1 1 0 1
1 0 1 0 1 0 1 0 0 1
1 0 1 1 1 0 0 0 1 1
1 1 0 0 0 1 0 0 1 1
1 1 0 1 0 1 1 0 0 1
1 1 1 0 0 0 1 0 0 1
1 1 1 1 0 0 0 0 1 1

Venn Diagrams

A Venn diagram is a visual representation of the outputs of a logic gate with different inputs. A Venn diagram can be easily created with the truth tables learned above.

Venn diagrams look exactly like the traditional Venn diagram.

Each space represents the input type and each circle represents an input of 1. The area that is not inside either of the circles is 00. The area inside one circle would be 10 and 01. The area inside both the circles then would be 11. This is the layout for a two input logic gate.

To represent the outputs, the spaces are either filled in or not. If the area is filled in, it means that the input of that area has an output of 1. If it is not filled in and left empty, the output would be 0.

Here are a couple of examples of Venn diagrams for different gates.

Don't forget that Venn diagrams can be also created to represent three or more input logic gates as well!