XOR gate is kind of a special gate. We are familiar with the truth table of the XOR gate.
Figure1. XOR gate
We often use symbol OR symbol ‘+’ with circle around it to represent the XOR operation. There is an alternate way to describe XOR operation, which one can observe based on the truth table. One of the best way to find out a equation representation of any table is to use K-maps.
Figure 2. XOR K-map.
Out = A * (B)bar + (A)bar * B
Now having this equation at our hand it is easier to start with 2:1 MUX equation and convert it to XOR equation that we want.
2:1 MUX equation is :
Out = S * A + (S)bar * B
We can see that if we replace A with (B)bar, we get what we want.
Out = S * (B)bar + (S)bar * B
This is the XOR between S and B.
Following is the figure for the same.
Figure 3. XOR using 2:1 MUX
Next time we will work on XNOR gate.
-SS