XOR always give 0 output

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

XOR always give 0 output

jsridhar72
I just started the course. I ran the Xor.hdl code, however,the output variable is 0 for all possible combos of a,b. Why?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: XOR always give 0 output

cadet1620
Administrator
jsridhar72 wrote
I just started the course. I ran the Xor.hdl code, however,the output variable is 0 for all possible combos of a,b. Why?
All of the HDL files in nand2tetris/projects01 have no implementation so their output are always 0.

Have you written and tested Not, And and Or? Xor depends on these gates. You need to build the gates in the order they are presented in Chapter 1.

Nand is built in so it is always available. Use Nand to make Not.hdl and pass Not.tst.
Use Nand and Not to build and test And.
Use Nand, Not and And to build and test Or.
Etc.

--Mark
Loading...