/2/ZN.hdl
Unknown | 12 lines | 10 code | 2 blank | 0 comment | 0 complexity | 76d1cb172a9873076b0d1adcfdac6e63 MD5 | raw file
1CHIP ZN { 2 IN in[16], z, n; 3 OUT out[16]; 4 5 PARTS: 6 // first decide whether to zero input 7 Mux16(a=in, b=false, sel=z, out=zout); 8 9 // then decide whether to negate possibly zeroed input 10 Not16(in=zout, out=notzout); 11 Mux16(a=zout, b=notzout, sel=n, out=out); 12}