Showing posts with label XOR gate. Show all posts
Showing posts with label XOR gate. Show all posts

The XOR Gate

XOR Gate, Diode XOR Gate, BJT XOR gate

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


Learning Objectives:

  • Introducing AND 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 = 0







Logical Expression

Y = A ⊕ B



2 Input XOR Gate

Input A

Input B

Output

0

0

0

1

0

1

0

1

1

1

1

0


Logical XOR Gate (Explain with the help of switches)



Implementation Using Diode Logic

XOR is not among the basic logic gates. There are many different ways to implement XOR logic with the help of diodes. I tried the circuit below. The circuit is for learning purposes. The diode logic is no longer used these days.


Case 1:

Both the inputs are connected to the ground. All diodes are off. The output of the circuit is zero (logic 0).


Case 2:

In this case, look at the schematic, switch S1 is closed. Diode D1, LED, D2, D4 turns ON. 


Case 3: 

Look at the schematic in case 3. Switch S2 is closed. Diodes D2, LED and D4 turn ON. 


Case 4:

Look at the schematic in case 4. Switch S1 and S2 both are closed (connected to the 5V sources). Carefully looking at all the junctions, there is no potential difference between these junctions ideally (there is no potential drop across ideal diodes). And hence no current flows through any diode.



Implementation Using Transistor Logic

XOR is a little bit difficult to implement with the help of BJT. There are many other ways to implement XOR logic. I come up with this simple circuit that consists of three BJT.


Case 1:

Look at the schematic in case 1. Both switches are tied to the ground and hence Q1, Q2 and Q3 transistors are off. Output is zero (logic low).


Case 2:

Look at the schematic, switch 1 is connected to a 5V source. Closely looked at Q1. The base of the Q1 transistor is connected to a 5V source. The collector is powered by a 12V source and the emitter is connected to the ground. It is a common emitter configuration. Transistor Q1 is ON while Q2 is OFF. The output of the Q1 transistor is connected to the base of Q3. The positive voltage at the base will turn ON Q3 and hence output goes high. 


Case 3:

Same as case 2.


Case 4:

Look at the schematic in case 4. The base of the transistor Q1 is connected to a 5V source and the emitter is also connected to a 5V source. To operate a transistor VBE = VB - VE ≥ 0.7V. 

In our case VBE = 0. Since base and emitter are at the same potential. So, transistor Q1 is off. Similarly, this is true for Q2. Both transistors (Q1 and Q2) are off. There is no voltage at the base of Q3. So, the output is also low. 






Popular Posts