Skip to main content

Logic Gate Truth Tables - Reference Guide (Cheat Sheet)

A logic gate is the implementation of a Boolean function. It performs a logic operation on one or more binary input. By binary I mean that the input can either be 1 or 0, nothing else.
This guide is intended to be quick guide\reference, I will dive into more details about each gate on transistor\diode level in other posts.

The guide cover gates with 2 inputs, meaning that each truth table will have 4 cases (2^2 = 4)


AND Gate:
Boolean Logic Operator: Q = A  B 

Input Output
A B Q
0 0 0
0 1 0
1 0 0
1 1 1
Summary: in order to achieve 1 on the output, both inputs A AND B must be 1


OR Gate:
Boolean Logic Operator: Q = A + B 

Input Output
A B Q
0 0 0
0 1 1
1 0 1
1 1 1
Summary: in order to achieve 1 on the output, input A OR input B must be 1


NOT Gate (Inverter):
Boolean Logic Operator: Output will be A'

Input | Output
A A'
0 1
1 0
Summary: whatever is on the input will be inverted on the output. HIGH (1) will become LOW (0) and vice versa.


Buffer Gate:

Boolean Logic Operator: Output will be the same as Input

Input | Output
A A
0 0
1 1
Summary: whatever is on the input, will be the same on output


NAND Gate:
Boolean Logic Operator: Q = (A  B)' 

The NAND gate is pretty much AND with its output connected to a NOT gate like in the figure below:

Input Output
A B Q
0 0 1
0 1 1
1 0 1
1 1 0
Summary: in order to achieve 0 on the output, both inputs must be 1


NOR Gate:
Boolean Logic Operator: Q = (A + B)' 

The NOR gate is pretty much OR with its output connected to a NOT gate like in the figure below:

Input Output
A B Q
0 0 1
0 1 0
1 0 0
1 1 0
Summary: in order to achieve 1 on the output, both inputs must be 0

Popular posts from this blog

LTspice Tutorial: How to Design and Simulate a Circuit in LTspice (Video Version)

Text version with screenshots can be found by clicking here If you do not have LTSpice already installed on your machine, please head over to LTSpice's page on Analog Device's website (Link:  LTspice Information Center | Analog Devices ). Click on the applicable download button that suits your machine's operating system.

Write a C Program That Requests an Integer Value from the User. (Code and Explanation)

Write a C program that requests an integer value from the user. If the value is between 1 and 100, print “OK;” otherwise, print “Out of range”.

How Does an Inverter (NOT) Gate Work - NOT Gate Explained (Video Version)

This is a video version of the NOT Gate Explained tutorial post. For the text version,  CLICK HERE .