• Skip to main content
  • Skip to primary sidebar
  • Basic Electronics
  • Digital Electronics
  • Electronics Instrumentation
  • ADC
  • Comparisons

Electronics Coach

All About Electronics

Logic gates

Definition: Logic gates are basically electronic circuits that perform logical functions such as addition, subtraction, multiplication etc. For any digital system, it acts as an elemental building block and is able to make logical decisions.

It performs logical functions in order to produce an output when two or more inputs are applied. Basically, the operation of logic gates is represented by algebraic expressions.

To form a big logic network sometimes, the output of a gate is fed to the input of other. Logic gates operate on binary logic 0 and 1 where 0 indicates low and 1 indicates a high voltage level.

The basic logic gates are OR, AND, NOT. However, there exist some universal logic gates such as NAND and NOR. Combination of several logic gates, allows us to perform a very complicated logic function in any complex circuitry.

The various input-output possibilities for a logic circuit is expressed with the help of a truth table. In other words, truth table shows variation in output with respect to the input.

Now, let us move further and have a look at how various gates perform the logic operation.

OR logic gate

The OR logic gate is used to perform addition of the applied input signals. It produces high output for one or more than one high input and symbolically denoted by plus sign (+).

or gate

The output expression for OR gate is given as-

Z = A + B

The figure below shows the circuit diagram of OR gate consisting of diodes

As we know, that diode conducts in a forward biased condition. So, when a high voltage is applied at any of the input terminals, the corresponding diode gets forward biased.

Thus allowing current to flow through the circuit, resultantly providing the high voltage at the output.

Similarly, when a low voltage is applied, the diode gets reverse biased. Thus, no current flows through the diode that corresponds to that particular terminal.

Let us now separately discuss 2, 3 and multiple input condition of OR gate.

  • 2 input OR gate:

As we have already mentioned that logic high is achieved in case of OR gate when one or more than one input is high. Otherwise, the output is low.

The figure below shows the logic symbol for two input OR gate:

2 input OR gate symbol

The truth table for OR gate is shown below:

ABZ
000
011
101
111

Let’s understand the operation of OR gate by considering various cases:

Case 1: When both the applied input is low i.e., 0, the output generated is also low. This is because the summation of the low voltage signal produces a low voltage at its output.

Case 2: When the voltage applied at terminal A is 0 and at terminal B is 1 i.e., logic high then after summation the OR gate produces high value at its output.

Case 3: When logic low i.e., 0 is applied to terminal B and the logic high is applied to terminal A. Then, the summation of the two values produces a logic high at the output.

Case 4: When a high-level signal is applied to both the terminals of the gate then their summation produces logic 1 at its output.

  • 3 input OR gate:

The logic symbol for a 3 input OR gate is shown below: 3 input OR gate symbol

The logical operation of the gate is described with the help of the truth table shown below:

ABCZ
0000
0011
0101
0111
1001
1011
1101
1111

One can also construct multiple input OR gate. Let us consider an OR gate consisting of 6 inputs.

multiple input OR gate

So, the Boolean expression is given as

Z = (A+B) + (C+D) + (E+F)

OR gate using transistor

The figure here shows the transistor OR gate circuit that contains 3 transistors Q1, Q2 and Q3 having common supply voltage Vcc = + 5V.

transistor OR gate circuit

Here, Q1 gets forward biased when +5 V is applied at terminal A. At the saturation point of Q1, the supply voltage is dropped across R1 that causes O to go to ground. Resultantly, Q3 gets cut-off that causes output Z to go to Vcc = 5V. Thus, producing a high output.

Suppose when both terminals A and B is supplied with a low voltage, then O drives to + 5V as Q1 and Q3 gets cut-off. This allows Q3 to conduct fully due to forward biasing and + 5v potential drops across R2 that leads to low voltage at the output.

Pinout configuration for 2 input OR gate:

The figure here shows the pin-out configuration of IC 7432 for 2 input OR gate.

Or gate pin configuration

It consists of 14 pins dual in-line package having four, 2 input OR gate.

Sometimes input in the form of pulses is provided to an OR gate whose output is the result of the various combination of input.

timing digram for OR gate

We can see here, a timing diagram for OR gate that depicts two input pulses A and B along with an output Z.

Here, at to, both the inputs are low, thus produces a low output. But, at t1 when the input of A is high and B is low, the output produced is also high. Similarly, at t2 when input at A is low and input at B is high then another high voltage level is achieved at the output.

At time interval t4, both the inputs are at a high voltage level then the output corresponding to that interval is also high.

Thus we can say OR gate basically performs the addition operation.

AND logic gate

The AND gate executes multiplication of the applied input signal and produces a single output. A high output for the AND gate is achieved only when both the applied inputs are high otherwise the output is low.

As it performs the multiplication operation, thus symbolically expressed as a single dot (.)

AND gate

 

The output expression for the AND gate is given by:

Z = A.B

The figure here shows the circuit of AND gate consisting of diodes:circuit using diode for AND logic gate

Here, the supply voltage Vcc of + 5V is common and the two terminal A and B is provided with either low or high voltages in various combinations.

Let us consider that either A or B terminal is applied with a low voltage, in such a condition, the corresponding diode will become forward biased. Thus causing current to flow through it.

Due to this, the whole 5V potential is dropped across R which resultantly causes the low voltage at output Z. The same condition is applicable when both the terminals are at a low voltage level.

When terminal A and B both are at the high potential the this causes the diode to get reverse biased. Hence the diodes corresponding to both the terminals get off and doesn’t conduct.

Thus no current flows through R hence supply voltage appears at the output. Resultantly logic high is obtained at Z.

Moving further let us now discuss 2, 3 and multiple input condition for AND gate:

2 input AND gate:

The logical symbol for AND gate consisting of 2 inputs is shown below:

2 input AND gate''

The respective truth table for AND gate is shown below:

ABZ
000
010
100
111

Consider the following cases in order to understand the truth table of AND gate:

Case 1: When a low-level voltage is applied at both the terminals of the gate then due to multiplication function the result obtained is also low i.e., 0.

Case 2: When terminal A is fed with low voltage level but B is fed with high voltage level then the output produced will definitely be low. This is so because the product of 0 and 1 will surely provide 0 as output.

Case 3: Another condition arises when terminal A is kept at high potential however, B is kept at a low potential. In such a condition output will be low due to product rule.

Case 4: When terminal A and B both kept at high potential then the multiplication function causes the output to be high. This is because the product of 1 and 1 will provide the output as also 1.

3 input AND gate

The figure below shows the logic symbol for 3 inputs:

3 input AND gate ''

 

3 input logical AND operation can be clearly understood with the help of the truth table shown below:

ABCZ
0000
0010
0100
0110
1000
1010
1100
1111

AND gate consisting of multiple can also be constructed. The figure here shows 6 inputs applied to the AND gate:

multiple input AND gate 1

The Boolean expression for 6 input AND gate is given as:

Z = (A.B).(C.D).(E.F)

AND gate using transistor

The figure represents a transistor AND gate circuit:

transistor AND gate

Let us consider first that low potential is provided to both the terminals. This causes Q1 and Q2 to get cut-off thus no any voltage drop will be there at R1.

Thus, a potential at Q3 causes it to become forward biased and it starts conducting. The voltage provided at the input will get dropped across R2, hence at the output logic 0 is obtained. The same output is obtained when any of the two applied input terminals is low.

When the two transistors are provided with the logic high then both of them starts conducting. The current produced drops the supply voltage at R1. Hence Q3 gets cut-off causing +5v to appear across the output. Thus, logic high is obtained at the output when terminals A and B are fed with high voltage level.

Pinout configuration of 2 input AND gate

The figure below shows the pinout diagram of IC 7408, 2 input AND gate.

AND gate pin configuration

For pulsed input the timing diagram is shown below:

timing diagram for AND gate

As we can see here, that when both the applied pulses at the two terminals is high then only the output will be high otherwise low-level signal is obtained at the output.

NOT logic gate

NOT logic circuits basically perform inversion function when employed in any circuit. It is based on single input single output logic and is also known as an inverter.

It basically produces high output for low input and a low output for the high input. Or we can say, any input logic level is changed to its opposite level by using an inverter.

The symbolic representation of NOT gate is shown below:

NOT gate symbol

Here, bubble in the symbol indicates complement of input at the output.

The logic equation for the inverter is given below:

Z = NOT A

= Ā

The truth table for NOT gate is shown below:

AZ
01
10

When the applied input is 0 or low the output produced is 1 or high. Similarly, for high applied input, the output achieved is low this is how an inverter works.

Transistor as an inverter:

The figure below shows the application of the transistor as an inverter.

transistor as an inverter

Let’s now see how this happens-

When a low-level voltage is applied at the input then it causes transistor current to be 0, then at the output potential is equivalent to supply voltage + 5V.

On the contrary when the high voltage level is applied at the input then current flows through the transistor. This flow of current will cause a voltage drop across Rc thus low voltage level is obtained at the output.

Pinout configuration for NOT gate

The figure shows the pinout configuration of IC 7404 for inversion.

NOT gate pin configuration

In the case of pulsed input, when the low input pulse is applied then output achieved is high. However, when the high input pulse is applied then it inverts the input and produces logic low at the output. As we can see in the figure shown below:

pulsed output for NOT gate

Thus we can say that an inverter on operation produces an inverted signal at the output.

Related Terms:

  1. Difference between BJT and JFET
  2. Synchronous Counter
  3. Parallel Binary Adder
  4. Programmable Logic Array (PLA)
  5. Difference between Combinational and Sequential Logic Circuit

Reader Interactions

Comments

  1. Shashi Gupta says

    November 13, 2019 at 5:25 pm

    It is very useful form me😄

    Thanks 🤗

    Reply
  2. Adnan Anam says

    December 21, 2020 at 8:11 am

    Thanks a lot for such a simple explanation. One can easily refer for such beautiful explanation

    Reply
  3. Paul Elai says

    October 22, 2021 at 5:14 am

    Precise

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Most Searched Terms

  • Difference Between Half Wave and Full Wave Rectifier
  • Sample and Hold Circuit
  • Full Wave Rectifier
  • Difference between LED and LASER
  • Characteristics of JFET
  • Varactor Diode
  • 3 Phase Rectifier
  • Number System
  • Difference Between Clipper and Clamper
  • Analogous Systems

Trending Terms

  • Difference Between LED and OLED
  • AC Servomotor
  • Pulse Code Modulation (PCM)
  • Difference Between Multiplexer (MUX) and Demultiplexer (DEMUX)
  • Peak Detector
  • Time Division Multiplexing (TDM)
  • Difference between RC and RL Circuit
  • Differential Amplifier

New Additions

  • Resonant Converters
  • AC Voltage Controllers
  • Static Circuit Breakers
  • Synchronous Motor Drives
  • DC Drives

Categories

  • Analog & Digital Communication
  • Basic Electronics
  • Comparisons
  • Control Systems
  • Digital Electronics
  • Electronics Instrumentation
  • Optical Fiber System
  • Power Electronics

Copyright © 2025 · Electronics Coach · Contact Us · About Us · Privacy