Continue to Site

# Implementing 2 inputs and gate with mux(2:1)

Status
Not open for further replies.

#### vijay_nag

Interview question

Implement 2 input and gate with mux(2:1)

Re: Interview question

Hi,

Let's say you have a (2:1) mux with inputs M1 (corresponding to S= 0),M2 (corresponding to S = 1) and select line S. You have two signals A, B and you need your mux output to be AND(A,B). Here is what you do:

Connect M1 to '0' (ground)
Connect M2 to B
Connect S to A

In this way, if A is zero, M1 goes to output ('0'). if A is one , M2 goes to output (B), now, if B is zero, output is zero and if B is one , output is one. This is what an AND function does.

Regards - TS

Hi,

Let's say you have a (2:1) mux with inputs M1 (corresponding to S= 0),M2 (corresponding to S = 1) and select line S. You have two signals A, B and you need your mux output to be AND(A,B). Here is what you do:

Connect M1 to '0' (ground)
Connect M2 to B
Connect S to A

In this way, if A is zero, M1 goes to output ('0'). if A is one , M2 goes to output (B), now, if B is zero, output is zero and if B is one , output is one. This is what an AND function does.

Regards - TS

Interview question

of course MUX is a universal LOGIC CIRCUIT !

Re: Interview question

hello you can go through the interview tips give in the attachment

Re: Interview question

hello you can go through the interview tips give in the attachment

Re: Interview question

u can get ii quicklt from

output = AS +AS*

AS cab be used to implement and gate

Re: Interview question

vijay_nag said:
Implement 2 input and gate with mux(2:1)

roughly every digital circuit books give many different styles of logic, for ex Rabaey's book. including
mux logic

Status
Not open for further replies.