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
Added after 42 minutes:
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