/** * IsZero16: * out = 1 if in == 0 * 0 otherwise */ CHIP IsZero16 { IN in[16]; OUT out; PARTS: Or8Way(in=in[0..7], out=notZeroA); Or8Way(in=in[8..15], out=notZeroB); Or(a=notZeroA, b=notZeroB, out=notZero); Not(in=notZero, out=out); }