Re: Comparison Failure
Posted by WBahn on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Comparison-Failure-tp4034379p4034389.html
So let's see how you might improve your troubleshooting for the future.
Notice from the test failure that the mismatch occurred at bit 11.
So that is where to focus your efforts in your troubleshooting and, sure enough, when you trace that signal through you would almost immediately discover that it is missing from the Not hookups.
I suspect that, after fixing that problem, you would have had a failure on another line of the output that would have pointed you at the error involving bit 2.
Another good habit to get into is using your innate abilities as a human for doing pattern recognition. You organized your code well, so you can scan down the list asking if it goes in the expected order, from 0 through 15, for all of the signals.
Did you test your Not16 before implementing your Mux16? If you had, it should have failed the tests, allowing you to find and fix the problem on a simpler circuit before using that circuit as a building block in a larger, more complex circuit.
Incremental build and test is a key strategy in both hardware and software projects.