Logic gate truth table

- used for AND, NAND, OR, NOR and exclusive OR functions in electronic logic gate circuits

Logic circuits form the very basis of digital electronics. Circuits including the AND, NAND, OR, NOR and exclusive OR gates or circuits form the building blocks on which much of digital electronics is based.

The various types of electronic logic gates that can be used have outputs that depend upon the states of the two (or more) inputs to the logic gate. The two main types are AND and OR gates, although there are logic gates such as exclusive OR gates and simple inverters.

For the explanations below, the logic gates have been assumed to have two inputs. While two input gates are the most common, many gates that possess more than two inputs are used. The logic in the explanations below can be expanded to cover these multiple input gates, although for simplicity the explanations have been simplified to cover two input cases.

AND and NAND gates

An AND gate has an output that is a logical "1" or high when a "1" is present at both inputs. In other words if a logic gate has inputs A and B, then the output to the circuit will be a logical "1" when A AND B are at level "1". For all other combinations of input the output will be at "0".

A NAND gate is simply an AND gate with its output inverted. In other words the output is at level "0" when A AND B are at "1". For all other states the output is at level "1".

OR and NOR gates

For an electronic OR gates the output is at "1" when the input at either A or B is at logical "1". In other words only one of the inputs has to be at "1" for the output to be set to "1". The output remains at "1" even if both inputs are at "1". The output only goes to "0" if no inputs are at "1".

In just the same way that a NAND gate is an AND gate with the output inverted, so too the NOR gate is an OR gate with its output inverted. Its output goes to "0" when either A OR B is at logical "1". For all other input states the output of the NOR gate goes to "1".

Exclusive OR

One other form of OR gate that is often used is known as an exclusive OR gate. As the name suggests it is a form of OR gate, but rather than providing a "1" at the output for a variety of input conditions as in the case of a normal OR gate, the exclusive OR gate only provides a "1" when one of its inputs is at "1", and not both (or more than one in the case of a gate with more than two inputs).


The final form of gate, if indeed it could be categorised as a gate is the inverter. As the name suggests this circuit simply inverts the state of the input signal. For an input of "0" it provides an output of "1" and for an input of "1", it provides an output of "0". Although very simple in its operation, these circuits are often of great use, and accordingly they are quite widely used.

Logic Truth Table
0 0 0 1 0 1 0
1 0 0 1 1 0 1
0 1 0 1 1 0 1
1 1 1 0 1 0 0

Logic gate truth table

By Ian Poole

Share this page

Want more like this? Register for our newsletter

Mobile World Congress 2017 MWC 17 Ian Poole | Radio-Electronics.com
What is Happening at Mobile World Congress 2017
Editor Ian Poole looks at some of the underlying trends and developments that are being seen at Mobile World Congress 2017
Online - Effective Vector Network Analyzer Measurements
How to make effective VNA measurements at RF and microwave frequencies

More training courses

Understanding 5G
Find out all about the current thinking and the technologies likely to be used for 5G. Be prepared . . read this informed and informative white paper.

More whitepapers

Radio-Electronics.com is operated and owned by Adrio Communications Ltd and edited by Ian Poole. All information is © Adrio Communications Ltd and may not be copied except for individual personal use. This includes copying material in whatever form into website pages. While every effort is made to ensure the accuracy of the information on Radio-Electronics.com, no liability is accepted for any consequences of using it. This site uses cookies. By using this site, these terms including the use of cookies are accepted. More explanation can be found in our Privacy Policy