Topics / Boolean Logic / Logic Gates

Logic Gates

Logic gates are the building blocks of a digital circuit.

Every terminal in a logic gate will always be in one of the two binary states (0) or (1).

These binary states represent the presence (1), or absence (0), of an electrical voltage. Binary (1) can be referred to as positive or ON, whilst binary (0) can be called negative or OFF.

There are many types of logic gates, each with their own characteristics.

Our Logic Circuits page explains how these gates can be placed together to form circuits.


The Logic Gates

NameSymbolExplanationNotation
NOTnot gateInverses the current output, therefore positive (1 or ON) becomes negative (0 or OFF), whilst negative (0 or OFF) would become positive (1 or ON). Z = NOT A
 AND and gateBoth inputs have to be positive (1) before the output is also positive (1). Z = A AND B
 OR or gateAt least one input has to be positive (1) to give a positive output (1 or ON).  Both inputs could also be positive. Z = A OR B
 NAND nand gateNOT AND.  The same as AND, but then inverse (NOT) the outcome.  So, perform AND first, then apply a NOT to the output. Z = A NAND B
 NOR nor gateNOT OR.  The same as OR, but then inverse (NOT) the outcome.  So, perform OR first, then apply a NOT to the output. Z = A NOR B
 XOR xor gateExclusive OR. Only one input is allowed to be positive (1 or ON) to give a positive output (1).  If both inputs are positive (1) then there is a negative outcome (0, or OFF). Z = A XOR B

Test your logic gate knowledge with our quick quiz.

Logic Gate Truth Tables

Truth tables are used to calculate the output from a logic gate or circuit.

Every possible binary input combination is covered in a truth table.  From this, we can clearly see what the output would be in any scenario.

NOT

NOT gate truth table

Input AOutput Z
01
10

AND

AND gate truth table

Input AInput BOutput Z
000
010
100
111

OR

OR gate truth table

Input AInput BOutput Z
000
011
101
111

NAND

NAND gate truth table

Input AInput BOutput Z
001
011
101
110

NOR

NOR gate truth table

Input AInput BOutput Z
001
010
100
110

XOR

XOR gate truth table

Input AInput BOutput Z
000
011
101
110

Test your knowledge of truth tables with our quick quiz.

Topics / Boolean Logic / Logic Gates

Popular Downloads