Logic Gate

Logic gates perform basic logical operations and serve as the building blocks of digital circuits. Most logic gates take one or two binary values (0 or 1) as inputs and produce a single binary output. Basic circuits contain only a few logic gates, while complex ones — such as microprocessors — may contain millions.

There are eight primary types of logic gates, each with a specific Boolean function. Their names and symbols (used in logic gate diagrams) are listed below.

The table below explains the function of each logic gate, with example inputs and outputs.

GateDescriptionExample
(A, B → Output)
ANDTrue if both A and B are True(1,1 → 1) ; (0,1 → 0)
NANDAND followed by NOT (False only if both A and B are True)(1,1 → 0)
ORTrue if either A or B is True(1,0 → 1) ; (0,0 → 0)
NOROR followed by NOT (True only if both A and B are False(0,0 → 1)
BufferOutputs the same value as the input, often used to strengthen a signal(1 → 1) ; (0 → 0)
NOTInverts the input value(1 → 0) ; (0 → 1)
XORTrue if only one of A or B is True(1,0 → 1) ; (1,1 → 0)
XNORXOR followed by NOT (True if A and B are both the same)(1,1 → 1) ; (0,0 → 1)

By combining thousands or even millions of logic gates, digital circuits can perform highly complex computations. The number of logic gates on an integrated circuit depends on the chip's size and the transistor size used to build them. Typically, there is an inverse correlation between processor performance and transistor size. Processors with smaller transistors are generally more powerful and efficient than those with larger ones.

Updated April 8, 2025 by Per C.

quizTest Your Knowledge

Which of the following is not a method of specifying colors in CSS?

A
Color names
0%
B
RGB values
0%
C
CMYK values
0%
D
Hexadecimal digits
0%
Correct! Incorrect!     View the CSS definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Logic Gate on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation bar directly below the definition.

Our goal to explain computer terminology in a way that is easy to understand. We strive for accuracy and simplicity with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

TechTerms Newsletter

Improve your technical knowledge with our daily or weekly newsletter! Subscribe today and get new terms and quizzes delivered to your inbox.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.