Truth table of mux: a is selected when s = 0 and b is selected when s =1
so the eqn is (b.s)+(a.sbar)
a b s o/p
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 1
1 0 1 0
1 1 0 1
1 1 1 1
For half adder the equation is sum = a^b and carry = a.b
truth table is as follows
a b sum cout
o o o o
o 1 1 o
1 o 1 o
1 1 o 1
HA circuit uses xor for sum, and gate for carry.now i want to implement the mux equation and if i give "a" and "s" as my input to xor gate, the output is = (a.sbar)+(abar.s). I dont want the term abar.s and that changes the result in some cases. So i am not knowing how to model the circuit using half adders.
Please give me some direction to go on.