title: CPU.hdl - Need explanation to understand the code
body: <p>I have this CPU.hdl code.    </p>
  
  <pre><code>CHIP CPU {
  
  IN  inM[16],         // M value input  (M = contents of RAM[A])
      instruction[16], // Instruction for execution
      reset;           // Signals whether to re-start the current
                       // program (reset=1) or continue executing
                       // the current program (reset=0).
  
  OUT outM[16],        // M value output
      writeM,          // Write into M? 
      addressM[15],    // Address in data memory (of M)
      pc[15];          // address of next instruction
  
  PARTS:
  Not(in=instruction[15], out=isAcmd);
  Not(in=isAcmd, out=isCcmd);
  
  // Create the ALU chip.
  // First input to ALU is always D; 2nd is A or M based on inst[12]
  Mux16(a=outA, b=inM, out=outAM, sel=instruction[12]);
  ALU(x=outD, y=outAM, zx=instruction[11], nx=instruction[10], zy=instruction[9], ny=instruction[8], f=instruction[7], no=instruction[6], out=outM, out=outALU, out=inD, zr=zr, ng=ng);
  //also need logic as to whether to write to M ... it's part of the instruction
  And(a=isCcmd, b=instruction[3], out=writeM);
   .
   .
   .
  }
  </code></pre>
  
  <p>I am trying to understand the CPU.hdl. I don't understand the 2 lines after the PARTS. What do they accomplish?</p>