# How to derive xor gate using 2:1 mux and 1 not gate?

Status
Not open for further replies.

#### ppallavi

##### Newbie level 6
HI,

How to derive xor gate using 2:1 mux and 1 not gate?

-P

mux as a universal gate

Suppose A Mux is having Inputs I1,I2 and Select Line S

Connect Inputs A, B (of targeted XOR Gate) as following:

I1 := A
I2 := not A
S := B

xor gate mux

you can easily write the truth table of any function
deduce its equation
then convert that to a mux (which is a universal gate, can be used to construct more complex gates)...by having part of the function multiplied by Select_of_mux and the other one multiplied by Select_of_mux_bar....

Xor= Abar.B+A.Bbar
So here the Select_of_mux is B for instance and it's multiplied by Abar
and same for Select_of_mux_bar

you can read more about Shannon's expansion regarding this approach multiplexer as universal gate

Hi,

Thank you tut.

Salma,

derive xor

hi

for writing any function of a gate...you can deduce it from its truth table
for all the ones found, write the corresponding variables

truth table of XOR is:

A B | Xor_output
0 0 0
0 1 1
1 0 1
1 1 0

okay...so for writing this xor as a function of A and B you'd say:

Xor_output = Abar.B + A.Bbar (since these are the variables which correspond to the ones in the output was that the part confusing you?
or something else???

xor gate from 2 2 to 1 mux truth table

Hi Salma,

this is fine. This gives xor equation in terms of SOP. But now how select line is introduced to get effect of x or ing using mux ?

As you said, Shannon's theorem can be used. I want to know how to apply this logic to derive any gate from 2:1 mux.

e.g if i connect input B to select line of mux, then I get OR gate. But how to arrive to this point from or gate equation and mux equation ?

I hope, you are getting my question...

build xor gate out of muxes

ppallavi said:
Hi Salma,

this is fine. This gives xor equation in terms of SOP. But now how select line is introduced to get effect of x or ing using mux ?

As you said, Shannon's theorem can be used. I want to know how to apply this logic to derive any gate from 2:1 mux.

you have to select one variable to be the select
for this equation it's the same to use either A or B
then you just connect it and put the factor multiplied by this variable as the input of the mux (here, they're are WHATEVER_1 and WHATEVER_2...they can be simple variables or a whole equation!

function= (WHATEVER_1). Select + (WHATEVER_2).Select_bar

for the second part...i didn't get it...explain more plz xor function using 2 2-1 muxes

Hi,

I did not understand the explanation.

Now, we have equations as XOR : Abar.B + A.Bbar
AND : A.B
OR : A + B

and equation of 2:1 mux is : Abar.S + B.S

So, how to come to a conclusion for deriving above 3 equations from mux equation? Is there any standard method to do this derivation?

detailed explanation xor gate with mux

hi pallvi
u r taken 2x1 mux a and b inputs
b is select line b=0 then o/p a value b=1 then o/p abar value

vamsi

Status
Not open for further replies.