Re: DMux8Way related question
Posted by AntonioCS on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/DMux8Way-related-question-tp2874088p3353677.html
Cadet1620
Are you sure you only need 3 lines of hdl?
I am now trying to implement the dmux4 and I have managed to implement the Mux4/8way16 but I still needed more than 3 lines of hdl.
I need to check which selector was selected. I wrote this code (for the Mux4Way16, the Mux8Way16 was indeed 3 lines):
Not(in=sel[0],out=sel0not);
Not(in=sel[1],out=sel1not);
And(a=sel[0],b=sel1not,out=isB);
And(a=sel0not,b=sel[1],out=isC);
And(a=sel[0],b=sel[1],out=isD);
And then used another 3 lines of hdl. Was my approach incorrect? (it passed in the hdl editor)