Login  Register

Incrementer Troubles

Posted by jaromdl on Oct 08, 2014; 4:47am
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Incrementer-Troubles-tp4028408.html

Here's what I've done for the incrementer:

   Add16(a[0]=in[0], b[0]=true, out[0]=out[0]);
   Add16(a[1..15]=in[1..15], b[1..15]=false, out[1..15]=out[1..15]);

This seems pretty straight-forward to me, yet it still doesn't work.  I figured it might have to do with a bug in the Add16 chip, but I've tested it multiple times, manually and with the supplied test file without failure; works great.

Here are the test results from manually playing around with the Inc16 in the HardwareSimulator:

Input/Output Pins
    input: 00000000 -> output: 00000001
    input: 00000001 -> output: 00000000
    input: 00000010 -> output: 00000011
    input: 00000011 -> output: 00000010

Part Pins:
    a[0] in[0] 0000000000000001
    b[0] true 1111111111111111
    out[0] out[0] 0000000000000000

    a[1..15] in[1..15] 0000000000000001
    b[1..15] false 0000000000000000
    out[1..15] out[1..15] 0000000000000001

Any help or advice would be appreciated.  Thanks!