This code passes the test for me.
Please edit your post to remove the working HDL.
Things to try to find the problem.
1) Look at the test output and confirm that your Add16 is computing the wrong value.
2) If it's failing, make a subdirectory under projects/02 and copy
only Add16.* into it. Then test that Add16. This will eliminate any of your HDL other than Add16 being used. If it fails, there must be something wrong with your Add16.tst or Add16.cmp.
3) If it's
not failing, the problem is with your HalfAdder or FullAdder. Copy HalfAdder into the subdirectory and retest. If it fails, something's subtly wrong with HalfAdder. Do the same thing with FullAdder.
If you find that your HalfAdder and FullAdder both past their tests, but cause Add16 to fail, please email them to me so that I can improve the tests to catch your problem.
--Mark
My Add16.cmp:
| a | b | out |
| 0000000000000000 | 0000000000000000 | 0000000000000000 |
| 0000000000000000 | 1111111111111111 | 1111111111111111 |
| 1111111111111111 | 1111111111111111 | 1111111111111110 |
| 1010101010101010 | 0101010101010101 | 1111111111111111 |
| 0011110011000011 | 0000111111110000 | 0100110010110011 |
| 0001001000110100 | 1001100001110110 | 1010101010101010 |
My Add16.tst
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/02/Add16.tst
load Add16.hdl,
output-file Add16.out,
compare-to Add16.cmp,
output-list a%B1.16.1 b%B1.16.1 out%B1.16.1;
set a %B0000000000000000,
set b %B0000000000000000,
eval,
output;
set a %B0000000000000000,
set b %B1111111111111111,
eval,
output;
set a %B1111111111111111,
set b %B1111111111111111,
eval,
output;
set a %B1010101010101010,
set b %B0101010101010101,
eval,
output;
set a %B0011110011000011,
set b %B0000111111110000,
eval,
output;
set a %B0001001000110100,
set b %B1001100001110110,
eval,
output;