title: How many bits for this op-code?
body: <p>PC memory module contains 512k words. Word has 64 bits. Binary instruction has four segments: indirect bit, operation code, register code part to determine one of the 32 registers and address part. Instruction binary code is stored in word memory.</p>
  
  <ol>
  <li>How many bits are needed for the opcode, register code and the address segment?</li>
  </ol>
  
  <p>Indirect: 1 bit</p>
  
  <p>Reg: 5 (2^5 = 32)</p>
  
  <p>Address: 19 (2^19 = 512k)</p>
  
  <p>Op-code = 64 - 5 – 19 = 40 bits</p>
  
  <p>I think my answer is correct, but practically an opcode cannot have 40 bits. (That's trillion of instructions). Is 40 correct?</p>