The OR Gate - Truth Table, Circuit Symbol, Diode Circuit & Transistor Circuit

<meta content="width=device-width, initial-scale=1" name="viewport"></meta> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script async="" id="MathJax-script" src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>

 The OR Gate:

The OR gate performs logical OR function. The output is high when any one input is high. 


Learning Objectives:

  • Introducing OR gate implementation using


Working:

Case 1: 

Input A = 0

Input B = 0

Output = 0


Case 2:

Input A = 0

Input B = 1

Output = 1


Case 3:

Input A = 1

Input B = 0

Output = 1


Case 4:

Input A = 1

Input B = 1

Output = 1


In figure 1 the waveforms or timing diagram of OR gate are also given. The output pulse rises from 0 to 1 when any one of the two inputs are high.



OR gate waveforms, truth table, logical expression
Figure 1: OR Gate circuit symbol, truth table, logical expression and waveforms


OR gate basic circuit, Multisim simulation results
Figure 2: OR gate basic working


Truth Table Of OR Gate:


2 Input OR Gate

Input A

Input B

Output

0

0

0

1

0

1

0

1

1

1

1

1


Logical Expression Of OR Gate:

Y = A + B


Logical OR Gate (Explain with the help of switches) | Switch Model and OR Logic:

The OR gate implementation using switches | How to produce or logic using switches
Figure 3: OR gate switch model

Before starting the circuit model of OR gate, it is better to understand the concept of OR logic with the help of switches. The figure shows the switch model of OR gate. Two switch (switch A and switch B) are connected in parallel in between input and output. Input doesn't reach when both switches are off (open). If anyone switches on (closed) input reaches to output. 

Implementation Of OR Gate Using Diode Logic


How to implement OR gate using switches?
Figure 4: OR gate diode circuit

Practically diode circuit models are not used. But for beginners and better understanding of circuit analysis, implementation and designing, it is better to understand this topic.

Case 1:

See schematic in case 1, both inputs are connected to ground. Both diodes (D1 and D2) are off. Output is zero (LED remains off).


Case 2:

See schematic in case 2. Switch S1 is connected to a 5V source, turns on the D1 diode. Switch S2 is connected to the ground, D2 remains off. The current flows from 5V source to LED and the current grounded.


Case 3: 

 This case is the same as case 2.

Case 4:

See schematic in case 4. Both switches (S1 & S2) are connected to a 5V voltage source. As a result both the diodes are turned on. Current flows from 5V sources to the LED and grounded.


Implementation Of OR Gate Using Transistor Logic:


BJT OR gate | OR gate implementation using bipolar junction transistors
Figure 5: OR gate Bipolar Junction Transistor circuit

Case 1:

Look at the schematic in case 1, both switches are open. There is no voltage at the base. Both transistors are turned off. 


Case 2:

Look at the schematic in case 2, S1 is closed and hence Q1 is turned on. The transistor is in common collector configuration. Output is taken from the emitter. Once the transistor is ON, LED starts to glow. 


Case 3: 

Same as case 2.


Case 4:

Both transistors are ON. Current flows from emitter to collector and hence LED turns ON or output is logic high.






The NAND Gate - Explanation and Implementation Using Switches, Diodes and Transistors

The NAND gate - Truth Table and Switch Diagram, Diode Circuit and Transistor Circuit Explanation

 

The logic symbol is the same as the AND gate with an inversion bubble placed at the output side.


Learning Objectives:

  • Explain the working of nand gate

  • Introducing NAND gate implementation using


Working:

Case 1: 

Input A = 0

Input B = 0

Output = 1


Case 2:

Input A = 0

Input B = 1

Output = 1


Case 3:

Input A = 1

Input B = 0

Output = q


Case 4:

Input A = 1

Input B = 1

Output = 0


In figure 1 the waveforms or timing diagram of the NAND gate are also given. The output pulse falls to 0V when both inputs are high.


NAND gate waveforms, truth table, circuit symbol
Figure 1: The NAND Logic Expression, Truth Table and Timing Diagram 

Explain the working of NAND gate with the help of simulation results
Figure 2: The NAND gate simulation results 

2 Input NAND Gate

Input A

Input B

Output

0

0

1

1

0

1

0

1

1

1

1

0



Logical Expression:

Y = (A.B)C


Logical NAND Gate (Explain with the help of switches)

Explain the working of NAND using switches

Figure 3: Implementation Of NAND Logic Using switches


This is the switch model of the NAND gate. Two switches are connected in series and an LED is connected in parallel. 


When switch A is closed, and switch B is opened, the LED turns ON. Because there is no path for the current to flow. 

When switch B is closed, the LED turns ON. There is no way for the current to flow.


When both switches are closed the current flows from input to output through closed switches.


Implementation Using Diode Logic

Use diodes to implement the NAND logic. Diode nand gate.
Figure 3: Implementation Of NAND Logic Using Diodes 


Case 1:

Look at switches S1 and S2

 Both are connected to the ground. Both the

are forward biased. Current flows from higher potential level to ground level. Current through 5 V source divides into R2 and R2. And hence LED turns ON.


Case 2:

In this case the position of S1 changes from ground to a voltage source. While S2 remains in the same position. Current flowing from the voltage source to S2 and then grounded. 


Case 3:

Same as case 2.


Case 4:

In this case, both switches are connected to a voltage source. Diodes turned off. No path for the current to flow. LED is not going to be turned on.





Implementation Using Transistor Logic

Figure 4: NAND Logic using Transistors case 1:

Look at switches S1 and S2. Both are open. There is no voltage at the base. VBE = 0. The transistors are off. All the current will flow through the LED. Output is high. 


Case 2:

Look at switch S1, it is closed. Switch S2 is opened. Transistor Q2 is turned off. Now check the mode of each transistor. In digital switching devices BJT either works in saturation or cut off. 


VBE > 0


The above condition is true. Transistor Q1 is ON Now check for the second condition. 


VCE = VCE(sat) = 0.2V


VC is approximately at the same potential level of VE. So, Q1 is in saturation.  


Case 3:

It is the same as case 2.


Case 4:

Both switches are closed. Both transistors are in saturation mode.

VBE > 0


Q1's collector is connected to Q2's emitter. 

Q1's Collector is connected to a 12 V source. Checking for the second condition, 

VCE = VCE(sat) = 0.2V


In saturation mode collector voltage VC and emitter voltage VE are approximately at the same potential. Current flows from both the transistors and then grounded. No current flows through the LED. 





The AND Gate

The AND gate explanation & Implementation

 The AND Gate:


The AND gate performs logical AND function. The output is HIGH (true) only when all the inputs are HIGH (true). Or in other words, if all inputs are non-zero, the output of this gate goes HIGH (non-zero). Or if any of the input is low the output remains low.


Learning Objectives:

  • Introduction to AND logic, and digital building block

  • Introducing AND gate implementation using

Working:


Figure 1

Case 1: 

Input A = 0

Input B = 0

Output = 0


Case 2:

Input A = 0

Input B = 1

Output = 0


Case 3:

Input A = 1

Input B = 0

Output = 0


Case 4:

Input A = 1

Input B = 1

Output = 1


In figure 1 the waveforms or timing diagram of AND gate are also given. The output pulse rises from 0 to 1 when both inputs are high.




Figure 2

Logical Expression:

Y = A.B


2 Input AND Gate

Input A

Input B

Output

0

0

0

1

0

0

0

1

0

1

1

1



Now it is very easy to learn with the help of simulation software available. I always prefer to use multisim live it is quite easy and user friendly. I have made a short video. Check it out.

Implementation Of AND Gate:



Logical AND Gate (Explain with the help of switches)


AND gate & switch theory
Figure 3

This is the switch model of AND logic. It is usually easy to understand the concept with the help of switches. In digital electronics diodes and transistors work as switches. So it is easy to grasp the concepts with the help of the switch model. Here you can see two switches connected in series. The input goes to the output only if both switches (switch A and switch B) are closed.


Implementation Using Diode Logic:

AND gate using diodes
Figure 4

In modern electronics, it is ridiculous to implement this logic. But for beginners, it is necessary to understand the working of AND logic with the help of diodes


Case 1:

It is seen in the schematic diagram, both inputs are tied to the ground. The positive side of the diode is connected to the positive side of the voltage supply. Both diodes are turned on and the current flows from the higher potential level to the lower potential level. The current will flow from the least resistive path. No current will flow from the LED and hence it remains off.


Case 2:

In this case diode, D2 is connected to the ground and D1 is connected to the 5V source. D2 is turned on. D1 is also tuned on. This is because the positive side of D1 is connected to the 7V source and the negative side is connected to the 5V source. Most of the current flow from D2 to ground and hence LED remains off.


Case 3:

The circuit working will be the same as in case 2.


Case 4:

In this case diode, D1 and D2 both are connected to a 5V source. Both the diodes are turned on. Only a little current flows from D1 and D2 because the potential difference is very low. The current flows from LED to ground. And hence LED turns on. The current and voltage values will be determined with the help of KVL.





Implementation Using Transistor Logic

In practical terms, BJTs are not suitable for switching. But we are interested to understand the logic or working of AND gate. It is easy to gain knowledge by practising different types of circuits on breadboards.

And gate using BJT
Figure 5

Case1:

Look at switches S1 and S2. Both are open. There is no voltage at the base. VBE = 0. The transistors are off. Output is low.


Case 2:

Look at switch S1, it is closed. Switch S2 is opened. Transistor Q2 is turned off. Now check the mode of each transistor. In digital switching devices BJT either works in saturation or cut off. 


VBE > 0


The above condition is true. Transistor Q1 is ON Now check for the second condition. 


VCE = VCE(sat) = 0.2V



VC is at a much higher potential than VE. So, Q1 is not in saturation.


Case 3:

It is the same as case 2.


Case 4:

Both switches are closed. Let's look at Q2, base is at 5V, the emitter is grounded.


VBE > 0


Q1's collector is connected to Q2's emitter. 

Q1's Collector is connected to a 12 V source. Checking for the second condition, 

VBC > 0


It is valid for both transistors.





Popular Posts