Browse Definitions:
Definition

# logic gate (AND, OR, XOR, NOT, NAND, NOR and XNOR)

AND | OR | XOR | NOT | NAND | NOR | XNOR

A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment, every terminal is in one of the two binary conditions low (0) or high (1), represented by different voltage levels. The logic state of a terminal can, and generally does, change often, as the circuit processes data. In most logic gates, the low state is approximately zero volts (0 V), while the high state is approximately five volts positive (+5 V).

There are seven basic logic gates: AND, OR, XOR, NOT, NAND, NOR, and XNOR.

The AND gate is so named because, if 0 is called "false" and 1 is called "true," the gate acts in the same way as the logical "and" operator. The following illustration and table show the circuit symbol and logic combinations for an AND gate. (In the symbol, the input terminals are at left and the output terminal is at right.) The output is "true" when both inputs are "true." Otherwise, the output is "false."

AND gate

 Input 1 Input 2 Output 1 1 1 1 1

The OR gate gets its name from the fact that it behaves after the fashion of the logical inclusive "or." The output is "true" if either or both of the inputs are "true." If both inputs are "false," then the output is "false."

OR gate

 Input 1 Input 2 Output 1 1 1 1 1 1 1

The XOR ( exclusive-OR ) gate acts in the same way as the logical "either/or." The output is "true" if either, but not both, of the inputs are "true." The output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit is to observe that the output is 1 if the inputs are different, but 0 if the inputs are the same.

XOR gate

 Input 1 Input 2 Output 1 1 1 1 1 1

A logical inverter , sometimes called a NOT gate to differentiate it from other types of electronic inverter devices, has only one input. It reverses the logic state.

Inverter or NOT gate
 Input Output 1 1

The NAND gate operates as an AND gate followed by a NOT gate. It acts in the manner of the logical operation "and" followed by negation. The output is "false" if both inputs are "true." Otherwise, the output is "true."

NAND gate

 Input 1 Input 2 Output 1 1 1 1 1 1 1

The NOR gate is a combination OR gate followed by an inverter. Its output is "true" if both inputs are "false." Otherwise, the output is "false."

NOR gate

 Input 1 Input 2 Output 1 1 1 1 1

The XNOR (exclusive-NOR) gate is a combination XOR gate followed by an inverter. Its output is "true" if the inputs are the same, and"false" if the inputs are different.

XNOR gate

 Input 1 Input 2 Output 1 1 1 1 1 1

Using combinations of logic gates, complex operations can be performed. In theory, there is no limit to the number of gates that can be arrayed together in a single device. But in practice, there is a limit to the number of gates that can be packed into a given physical space. Arrays of logic gates are found in digital integrated circuits (ICs). As IC technology advances, the required physical volume for each individual logic gate decreases and digital devices of the same or smaller size become capable of performing ever-more-complicated operations at ever-increasing speeds.

See an introductory tutorial on logic gates:

This was last updated in May 2015

### 20 comments

Send me notifications when other members comment.
there are only three basic gates AND OR NOT
Universal Gates are NAND NOR
Derrived gates are XOR XNOR
Cancel
What do thou mean good sir?
Cancel
well that only depends on if there would be no new inventions

Cancel
it is not given a full part just basic is here
Cancel
WHY ARE THE NAMES OF LOGIC GATES ALL CAPITAL LETTERS??
Cancel
Because if i was to call an and gate an and gate or an or gate an or gate it would look confusing
Cancel
i still don't get it! :(
Cancel
Easy, a great refresher. This is basic. The diagrams help the most.
Cancel
can you post the gate transformation next time.

but thanks a lot,
Cancel
where is the memory cell gate?
Cancel
its nice ,i like it
Cancel
Thank you! Only thing I found that actually makes sense.
Cancel
This is very useful...
William
Chary
Rachel VO
Cancel
Please note that there are no 7 basic gates but there are ONLY and ONLY 2 basic gates that are AND and OR and an INVERTER with using AND, OR and INVERTOR you can create any type of gate, perhaps author was confused with 7 colors of white lights, but digital binary world is a way different than the Analog business.
Thanks,
Mansoor Alam
Cancel
what about the exclusive OR

Cancel
Thanks, man. I just needed some clearing up on OR and XOR for some code I'm working on!
Cancel
I am in Middle school and my dad is teaching CS50, a Harvard coding class at a high school, I saw him go over different gates so I build each one in the game Minecraft using Redstone, basically wires.
Cancel
Much better. Thanks!
Cancel
you saved my day thanks guys....

Cancel
If you use a  ~  it will invert your BIT like a NOT gate. example IN ~BI01 will be inverted
Cancel

Powered by:

## SearchCompliance

• ### risk map (risk heat map)

A risk map, also known as a risk heat map, is a data visualization tool for communicating specific risks an organization faces.

• ### internal audit (IA)

An internal audit (IA) is an organizational initiative to monitor and analyze its own business operations in order to determine ...

• ### pure risk (absolute risk)

Pure risk, also called absolute risk, is a category of threat that is beyond human control and has only one possible outcome if ...

## SearchSecurity

• ### FIDO (Fast Identity Online)

FIDO (Fast ID Online) is a set of technology-agnostic security specifications for strong authentication. FIDO is developed by the...

• ### cryptanalysis

Cryptanalysis is the study of ciphertext, ciphers and cryptosystems with the aim of understanding how they work and finding and ...

• ### Trojan horse (computing)

In computing, a Trojan horse is a program that appears harmless, but is, in fact, malicious.

## SearchHealthIT

• ### vendor neutral archive (VNA)

A vendor neutral archive (VNA) is a technology that stores medical images in a standard format and interface, making them ...

• ### HITECH (Health Information Technology for Economic and Clinical Health) Act of 2009

The HITECH (Health Information Technology for Economic and Clinical Health) Act of 2009 is legislation that was created to ...

• ### Epic Systems

Epic Systems is one of the largest providers of health information technology, used primarily by large U.S. hospitals and health ...

## SearchDisasterRecovery

• ### business continuity and disaster recovery (BCDR)

Business continuity and disaster recovery (BCDR) are closely related practices that describe an organization's preparation for ...

• ### business continuity plan (BCP)

A business continuity plan (BCP) is a document that consists of the critical information an organization needs to continue ...

• ### call tree

A call tree -- sometimes referred to as a phone tree -- is a telecommunications chain for notifying specific individuals of an ...

## SearchStorage

• ### cloud storage provider

A cloud storage provider, also known as a managed service provider (MSP), is a company that offers organizations and individuals ...

• ### personal cloud storage (PCS)

Personal cloud storage (PCS) enables users to store data, photos, music, videos and other files on a local network-attached ...

• ### cloud SLA (cloud service-level agreement)

A cloud SLA (cloud service-level agreement) is an agreement between a cloud service provider and a customer that ensures a ...

## SearchSolidStateStorage

• ### hybrid hard disk drive (HDD)

A hybrid hard disk drive is an electromechanical spinning hard disk that contains some amount of NAND Flash memory.

Close