Troubles with implementing Incrementer chip

Posted by markoFooego on
URL: http://nand2tetris-questions-and-answers-forum.52.s1.nabble.com/Troubles-with-implementing-Incrementer-chip-tp698157.html

Hi!

I tried to build Incrementer chip with the help of 16-bit Adder chip which was build and tested successfully.
What I don't understand is which value should be put for "b" pin of Adder chip. I tried with "true" keyword but the Hardware simulator reported an error while running a testing script. Input value was 16-bit value for 0. And Incrementer out pin was again 0.

My HDL code for Incrementer chip:

CHIP Inc16 {

    IN  in[16];
    OUT out[16];

    PARTS:
    And16(a=in, b=true, out=out);
}

Thanks for your help!
Marko