Logic Gates

Teach any GCSE Computer Science class

We have put together a full GCSE Computer Science curriculum that will give you all the teaching materials you need to teach any topic.

Whether you’re a brand new Computer Science teacher, or you’ve been teaching ICT for years, our resources will save you hours and hours of lesson preparation every single week.

View the resources →

Logic gates execute basic logical functions and are the core components of digital integrated circuits.  Most logic gates accept an input of two binary values and provide an output of a single binary value.  Some circuits have a few logic gates, while others have many logic gates.  A microprocessor has millions of logic gates.
The connection between the input and the output is based on a definite rationale.  These gates are enforced using electronic switches like diodes and transistors.  As a custom, primary logic gates are produced using Complementary Metal Oxide Semiconductor (CMOS) technology, Field Effect Transistor (FET) and Metal Oxide Semiconductor Field Effect Transistor (MOSFET).

Types of Logic Gates

Here are the 7 different types of logic gates:

Name Explanation Notation
AND True if A and B are both True Z = A AND B
OR True if either A or B is True Z = A OR B
NOT Inverts value: True if input is False; False if input is True Z = NOT A
XOR True if either A or B is True, but False if both are True Z = A XOR B
NAND AND followed by NOT: False only if A and B are both True Z = A NAND B
NOR OR followed by NOT: True only if A and B are both False Z = A NOR B
XNOR XOR followed by NOT: True if A and B are both True or both False Z = A XNOR B

Highly complex operations are made possible by combining thousands or even millions of logic gates.  The highest number of logic gates on an integrated circuit is established by the size of the chip divided by the size of the logic gates.  Smaller transistors mean more complicated and quicker processors.

Logic Gate Truth Tables

Every possible input and output scenario are covered in a truth table.

AND

Input A Input B Output Z
0 0 0
0 1 0
1 0 0
1 1 1

OR

Input A Input B Output Z
0 0 0
0 1 1
1 0 1
1 1 1

 NOT

Input A Output Z
1 0
0 1

XOR

Input A Input B Output Z
0 0 0
0 1 1
1 0 1
1 1 0

NAND

Input A Input B Output Z
0 0 1
0 1 1
1 0 1
1 1 0

NOR

Input A Input B Output Z
0 0 1
0 1 0
1 0 0
1 1 0

XNOR

Input A Input B Output Z
0 0 1
0 1 0
1 0 0
1 1 1

Application of Logic Gates

Wherever the existence of any one or more than one incident is needed to be observed or some behaviour are to be taken after their existence, in all those instances OR gates can be used.  For example, in an industrial plant, if one or more than one specification goes beyond the safe value, some security measures must be done.
AND gates are used as Enable gate and Inhibit gate.  Enable gate means acceptance of data through a pathway while Inhibit gate is the opposite of that process which means rejection of data through a pathway.
XOR and XNOR gates are used in identity generation and identity check operation.
NOT gates are also called inverter because they switch the output given to them and show the reverse outcome.

Advantages of Logic Gates

  • Logic gates are quick yet use low energy.
  • Logic gates don’t get overworked.
  • Logic gates can lessen the prescribed number of I/O ports needed by a microcontroller.
  • Logic gates can bring about straightforward data encryption and decryption.