|
i just wanted to knw whether i can build and simulate chips based on the canonical representation of the truth table??? and moreover i have already implemented the MUX using this method and i get the same output as in .cmp file so i wanted to confirm again!!!
i have implemented the MUX using the implemented AND chips instead of NAND....and heres the implementation code....
CHIP Mux {
IN a, b, sel;
OUT out;
PARTS:
Xor(a=b,b=sel,out=outbsel);
Not(in=outbsel,out=outnot);
And(a=a,b=outnot,out=outab1);
Xor(a=a,b=sel,out=outasel);
And(a=b,b=outasel,out=outab2);
Or(a=outab1,b=outab2,out=out);
}
plz let me knw whether its right...
|