Re: mux4way16 selector only accept 0 or 1 ?

Posted by cadet1620 on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/mux4way16-selector-only-accept-0-or-1-tp4027771p4027772.html

pwolf wrote
i dont understand, before trying to implement it, i like to look at the builtin chips functioning. But it only accepts 0 or 1, so i cant choose between all four 16 bit buses..  what am i missing?  
Assuming that you are talking about setting the sel[2] input in the Hardware Simulator, it's a decimal number. You can set it to '2' or '3'.
Or set View>Binary, and you will get a binary editor when you double click on the value.
as for the implementation, is it possible with 2 mux16's and one mux ? the mux to choose between the two mux16s?  i haven;t thought about it much yet as i want to make sure i understand how the chip is supposed to function first
Since the output of the Mux16s is 16 bits wide, you need to use a Mux16 to select between their outputs.
Even more confusing, i just ran the tst file against it and it failed?!
The test loads the Mux4Way16.hdl from the directory when the .tst file is. This replaces whatever chip was previously loaded in the simulator. Unless you changed something, this would be the supplied skeleton file with no implementation.


--Mark