Exploring NAND, AND, NOR, OR Gate: A Deep Dive into Basic Logic Gates
업데이트 시간: 20231124 14:35:49
Contents
Logic gates are the fundamental components of all digital circuits in digital electronics, functioning as switching devices. A logic gate is a digital circuit that executes various logical operations in a digital device or system. These gates are responsible for carrying out essential logical functions that form the foundation of digital circuits. Virtually every electronic device utilized in contemporary times incorporates some variation of logic gates in its design. This article provides an overview of the NAND, AND, NOR, OR gates, these four basic logic gates, and explores what are the universal gates.
What is Logic Gate?
A logic gate functions as a foundational element in digital circuits. These gates make decisions within a circuit based on the digital signals received from their inputs. Typically, logic gates feature two inputs and one output. Their operation is rooted in Boolean algebra, where each terminal exists in either binary states: false (0) or true (1). The binary output varies depending on the specific logic gate type and input combinations. Analogous to a light switch, a logic gate has an off position (0) and an on position (1). Integrated circuits (IC) commonly incorporate logic gates.
NAND Gate
NAND is an acronym for NOTAND. In digital logic, a NAND gate is essentially an AND gate accompanied by a NOT circuit, resulting in a negated output. This combination stands out as one of the most valuable configurations of logic gates.
Circuit
The following is an electromechanical circuit illustrating the principle of a NAND gate.
The battery powers the LED via the typically closed switches a and b. Solenoid R1 governs switch a, while solenoid R2 controls switch b.
Initially, inputs A and B are without power, signifying a logic 0 signal (assuming positive logic). The LED is illuminated in this state, and Y = 1 (logic 1).
When only input A is connected to the battery (logic 1), solenoid R1 opens switch a. Despite this, the LED receives power through switch b, maintaining Y = 1 (logic 1).
Similarly, when only input B is connected to the battery (logic 1), solenoid R2 opens switch b. Nevertheless, the LED still receives power through switch a, and Y = 1 (logic 1).
Ultimately, when both inputs, A and B, are connected (logic 1), solenoids R1 and R2 open switches a and b, leading to the deenergization of the LED. The LED is extinguished in this state, and Y = 0 (logic 0).
Truth Table
Compiles this data into a truth table.
A B Y 0 0 1 0 1 1 1 0 1 1 1 0 The truth table for a twoinput NAND circuit
Logic Symbol and Boolean Expression
Displays the circuit symbol and Boolean expression for a twoinput NAND gate.
For a NAND gate with more than two inputs, the Boolean expression is expressed as
Using a Combination of NAND Gates to Create Other Basic Logic Gates
The exclusive use of the NAND circuit allows for the implementing various logical functions. Several instances are detailed below.
In Figure 1, a twoinput NAND gate is configured to function as a NOT circuit. It is noteworthy that a singleinput NAND gate inherently acts as a NOT.
Figure 1. A NOT circuit made with a twoinput NAND gate
Moving to Figure 2, two NAND gates are interconnected to form a twoinput AND gate.
Figure 2. A twoinput AND gate made with two NAND gates
Lastly, Figure 3 illustrates the arrangement of three NAND gates to construct a twoinput OR gate.
Figure 3. A twoinput OR gate made with three NAND gates
Applications
NAND gates find diverse practical applications in realworld scenarios, and a selection of these applications is elucidated below:
Integration into alarm circuits for lightinduced radiation detection.
Utilization of freezer warning buzzer systems.
Deployment in automatic temperature regulation circuits, employing NAND logic gates.
Analysis of sensor status connected to different doors and windows.
Incorporation into burglar alarm systems.
NAND Gate IC
The prevalent integrated circuits (ICs) featuring NAND gates include:
In TTL logic:
74LS00  Quad 2input NAND IC
74LS10  Triple 3input NAND IC
74LS20  Dual 4input NAND IC
74LS30  Single 8input NAND IC
In CMOS logic:
AND Gate
An AND gate is a logical circuit with one output and two or more inputs. It follows the principles of logical multiplication, where the output is low if any input is low (0). Conversely, when all inputs are high (1), the output is also high. Although an AND gate can accommodate various inputs, the 2input and 3input configurations are the most prevalent.
Circuit
AND Gate Diode Circuit Diagram
Typically, an AND gate is crafted using either diodes or transistors.
When diodes are employed in the design of an AND gate, it is termed a diode AND gate. The fundamental circuit of a diode AND gate is illustrated below.
In this diode circuit, +5V is initially applied at point C. Subsequently, applying +5V at both A and B results in the reversal bias of both diodes, rendering them in an OFF or open circuit state.
Under these circumstances, with both diodes OFF, no current flows through resistor R, causing the voltage at point X to mirror the +5V at point C. Consequently, the circuit output is recognized as high or logical 1.
Conversely, if either point A, point B, or both are set at 0 Volts or grounded, the corresponding diode becomes forwardbiased, assuming an 'ON' or shortcircuited status. This allows the +5V supply at point C to find a path to ground through either diodes.
As the current traverses from C to ground via resistor R, the entire 5V experiences a drop across the resistor, consequently, the voltage at point X becomes low or logically zero.
While diodes in the forwardbiased state do not emulate an ideal short circuit, a discernible voltage drop, equivalent to the forward bias voltage, occurs. This voltage drop, present at point X during low output conditions, results in a practical low output ranging from 0.6 to 0.7V, which is conventionally considered zero.
AND Gate Transistor Circuit Diagram
An AND logic gate can also be implemented through a transistor AND gate. The circuit diagram for a transistor AND gate is depicted below:
In this circuit, when A, B, or both A and B are grounded or set at 0V potential, transistors T1, T2, or both T1 and T2 are in the OFF state.
This condition arises because terminals A and B are the base terminals for transistors T1 and T2, respectively. An absence of base voltage renders a transistor OFF. With the paths through T1 and T2 being opencircuited, there is sufficient potential to turn on transistor T3.
Consequently, current flows from the supply to the ground through T3. This results in the entire supply voltage dropping across R1, causing the potential at terminal X to become low or logically zero.
If either of the transistors T1 and T2 is OFF, the same output (low potential at X) is observed since both transistors are in series.
Next, let's examine the logical value of X when both A and B are set to a high logical value. Applying +5V to both A and B, i.e., at the base of transistors T1 and T2, activates both transistors.
This activation causes the supply voltage to drop across R, and the base potential of transistor T3 becomes zero, leading to T3 turning OFF. Consequently, the supply voltage of +5V appears at X, which is logically 1 or higher.
Truth Table
The Truth Table of a 2input AND Gate
A B C 0 0 0 0 1 0 1 0 0 1 1 1
The Truth Table of a 3input AND Gate
A B C X 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1
Logic Symbol and Boolean Expression
2input AND Gate
The symbolic representation of a twoinput AND gate is logically denoted as follows:
Here, A and B symbolize the inputs of the gate, and X signifies the output. Logically, A, B, and X can each assume 0 (low) or 1 (high) values.
The boolean expression of the AND gate is succinctly expressed as:
AB=X
3input AND Gate
In the case of three inputs rather than two, both the logical symbol and the truth table of the AND gate undergo modification.
The logical symbol for a 3input AND gate is depicted as:
The boolean expression of the AND gate is succinctly expressed as:
ABC=X
Applications
The principal application of the AND gate lies in the realms of digital electronics and data transmission, where it facilitates the control of data passage through a channel.
Employed in digital measuring devices.
Utilized in alarm circuits.
Another application worth noting is the Inhibit gate, which operates contrary to the enabling gate.
Found in automatic temperatureregulating circuits.
Integrated into freezer warning buzzer devices.
AND gate IC
The prevalent integrated circuits (ICs) featuring AND gates include:
In TTL Logic:
In CMOS Logic:
NOR Gate
The NOR gate in digital logic is formed by combining an OR gate and an inverter or NOT gate in series. This inclusive NOR (NotOR) gate typically maintains an output at logic level "1" but transitions to logic level "0" only when ANY of its inputs reach logic level "1". The Logic NOR Gate represents the inverse or "Complementary" counterpart of the inclusive OR gate discussed earlier.
Circuit
It's an electromechanical circuit illustrating the NOR gate principle.
The battery powers the LED through normally closed switches a and b. Solenoid R1 governs switch a, while solenoid R2 controls switch b.
Initially, inputs A and B are without power, representing a logic 0 signal (assuming positive logic). The LED is illuminated in this state, and Y = 1 (logic 1).
By connecting only input A to the battery (logic 1), solenoid R1 opens switch a, interrupting the current and turning off the LED. In this scenario, Y = 0 (logic 0).
Similarly, connecting only input B to the battery (logic 1) has solenoid R2 open switch b, interrupting the current and turning off the LED. In this case, Y = 0 (logic 0).
Finally, connecting inputs A and B (logic 1) results in solenoids R1 and R2 opening switches a and b, deenergizing the LED. Under this condition, the LED is off, and Y = 0 (logic 0).
Truth Table
Summarizing these outcomes in a truth table:
A B Y 0 0 1 0 1 0 1 0 0 1 1 0 The truth table for a twoinput NOR circuit
The output of a NOR gate registers a logic 1 exclusively when all its inputs assume a logic 0. In all other combinations of inputs, the result is a logic 0.
Logic Symbol and Boolean Expression
It illustrates the logic symbol and Boolean expression for the NOR gate.
Using a Combination of NOR Gates to Create Other Basic Logic Gates
The entirety of logical operations can be achieved by exclusively utilizing the NOR circuit. Illustrated below are a few instances.
In Figure 4, a twoinput NOR gate is configured to generate a NOT circuit. Notably, a singleinput NOR gate inherently functions as a NOT.
Figure 4. A NOT circuit made with a twoinput NOR gate
Moving to Figure 5, two NOR gates are interconnected to form a twoinput OR gate.
Figure 5. A twoinput OR gate made with two NOR gates
Lastly, Figure 6 exemplifies the interconnection of three NOR gates to construct a twoinput AND gate.
Figure 6. A twoinput AND gate made with three NOR gates
Applications
Electronic devices
Alarm systems
Industrial automation
Digital circuit design
Traffic light systems
Data storage
Robotics
Medical devices
Home automation
Communication systems
Logic in calculators and computer keyboards
Power management
Aerospace applications
Gaming consoles
Automotive systems
NOR Gate IC
The prevalent integrated circuits (ICs) featuring NOR gates include:
In TTL Logic:
In CMOS Logic:
CD4001 Quad 2input
CD4025 Triple 3input
CD4002 Dual 4input
OR Gate
The Logic OR Gate represents a digital logic circuit wherein the output assumes a HIGH state, i.e., logic level 1, solely when one or more of its inputs are in a HIGH state.
The output, Q, from a "Logic OR Gate" reverts to a LOW state only when ALL of its inputs are set to a logic level 0. Essentially, for a logic OR gate, any input at a HIGH state results in a HIGH, logic level 1 output.
Circuit
2input Transistor OR Gate Circuit
A basic 2input inclusive OR gate can be assembled using RTL (ResistorTransistor Logic) with resistortransistor switches interconnected, as illustrated below, where the inputs are directly linked to the transistor bases. For an output at Q, either transistor must be saturated, signifying an "ON" state.
Digital circuits create Logic OR Gates, providing the desired logical function. These gates are symbolically represented, with their shape reflecting the logical operation of OR.
Truth Table
The Truth table of a 2input OR Gate
B A Q 0 0 0 0 1 1 1 0 1 1 1 1
The Truth table of a 3input OR Gate
C B A Q 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1
Logic Symbol and Boolean Expression
The 2input Logic OR Gate
Boolean Expression Q = A+B
The 3input Logic OR Gate
Boolean Expression Q = A+B+C
Applications
Primary Applications of OR Logic Gate:
Employed in circuits where multiple power sources are utilized to execute similar actions.
Implemented alarm systems and intrusion detection equipment.
Used in industrial plants for specific protective measures.
OR Gate IC
The prevalent integrated circuits (ICs) featuring OR gates include:
In TTL Logic:
74LS32 Quad 2input
In CMOS Logic:
Universal Gates: NAND and NOR Gate
It is possible to execute any Boolean expression using exclusively either NAND gates or NOR gates. Consequently, NAND and NOR gates are considered universal gates. And tt's possible to implement a NOR gate using a NAND gate.
NAND and NOR gates serve as complements to the AND and OR gates. Their truth tables mirror the output states of the original gates but in reverse order.
The circuit symbols remain the same, with a small circle added to the output to signify the inversion of the logic level.
Boolean symbols change by placing a bar over the original expression:
Introducing a negated input to an AND gate enables the creation of inhibit/enable functionality.
Conclusion
In wrapping up our deep dive into logic gates, it becomes evident that these fundamental components are the bedrock of modern technology. Each plays a unique role, from NAND to AND, NOR to OR gates, contributing to the seamless functioning of electronic devices and systems.
Read More
이전: The Ultimate Guide to CD4017 Decade Counter IC: Datasheet & Its Application
FAQ
 What is the use of basic logic gates?
Basic logic gates carry out fundamental logical operations and are essential building blocks in integrated circuits.
 What are the types of basic logic gates?
AND gate, OR gate, XOR gate, NAND gate, NOR gate, XNOR gate, and NOT gate constitute the seven fundamental types of logic gates.
 What is the difference between the OR and NOR gates?
The NOR gate symbolizes the inverse of the OR operation, abbreviated as NOT OR. Its visual representation includes the OR symbol with a bubble at the output, indicating the execution of a complement operation on the OR gate's output.
 What is the difference between NOR and NAND latch?
The NOR latch closely resembles the NAND latch, with the only distinction being the reversal of the Q and Q' outputs.
 Why are NAND and NOR gates so popular?
Because NAND and NOR gates are costeffective and simpler to manufacture, they are foundational in all IC digital logic families.
Ratings and Reviews
특수 제품에 대한 관련

CSD86350Q5D
TI
Synchronous Buck Power Stage 8Pin LSON > 
LM3642TLX_NOPB
TI
BGA > 
CS246C029PZTRQ1
TI
TQFP > 
CS241C028PNTR01
TI
QFP > 
DAC121S101CIMM /NOPB
TI
DAC 1CH ResistorString 12bit 8Pin VS > 
BQ25120YFPT
TI
TEXAS INSTRUMENTS BQ25120YFPT Battery Ch > 
TLV3541IDBVR
TI
TLV354x 200MHz, RRIO, CMOS Operational A > 
BQ24261MRGER
TI
1S, 3A, 30V, SingleInput Switchmode Li > 
UCC2750DW
TI
Source Ringer Controller 28SOIC 40 to > 
UC3526DW
TI
PWM Controller, 35V8V supply, 400 kHz, > 
TPS62172DSGT
TI
Conv DCDC 3V to 17V Synchronous Step Do > 
TPS56428DDAR
TI
Conv DCDC 4.5V to 18V Synchronous Step > 
TMX320C6678CYP
TI
Digital Signal Processors & Controllers > 
TMS320C6414EGLZA6E3
TI
FIXEDPOINT DIGITAL SIGNAL PROCESSORS > 
TLV1117LV12DCYR
TI
Low Dropout Regulators  LDO 1A,Pos Fix >
가능 증권
더 THS4222D
 SN74LVC1G07DRLR
 SN74LS194AN
 SN74AUP1G04DRYR
 SN74AHC14DGVR
 SN65LBC174A16DW
 MSP430G2755IDA38
 LP3981IMM3.3/NOPB
 LP3981IMM3.3
 LP38691QSDADJ/NOPB
 LP2992IM5X3.3
 LP2985AIM54.5
 LP2981IM53.3
 LMV431AIM5X/NOPB
 LMC6484IMX/NOPB
 LMC567CM
 LM4880M
 LM4860M
 LM358M
 LM358DRG4
 LM324NE4
 LM319AM/NOPB
 LM2904AVQPWRQ1
 LM2902KAVQPWRQ1
 LM224N
 LF353DR
 ISO1050DUBR
 ISO103
 INA159AIDGKR
 DS16EV5110ASQE/NOPB
 DAC8830MCDEP
 CSD95373AQ5M
 CSD17505Q5A
 CD40103BE
 CC2541F256RHAT
 AHCT14
 ADS8323Y
 ADS8318
 ADS7830IPW
 ADC12D1600CIUT
 ADC1173CIMTC
 ADC0838CCN
 ADC0804LCN/NOPB
 ADC0802LCWMX/NOPB
 74ALS32N