Re: My submission says my ALU failed but when I test it on my side it passes?
Posted by WBahn on Dec 02, 2023; 3:11am
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/My-submission-says-my-ALU-failed-but-when-I-test-it-on-my-side-it-passes-tp4037502p4037506.html
Okay, so by "submission" you are talking about submitting it to some website. Is this the Coursera course?
They are apparently using a different test script than the one on the N2T site. That makes it harder use the reported error to track down the bug since you can't look at the test script to see what the inputs were and what the expected output was.
If it is the Coursera course, I'll pass along to the authors the suggestion that they spend some time providing targeted feedback when errors happen.
When I look at your code, I definitely see issues.
Walk through your code and assume that the input is x=0, y=-1 and all six of the control bits are set (i.e., are 1).
What should the outputs be?
What are they?