assemblycomputer-sciencecpu-architecturemachine-codemarie

How many bits are required to store MARIE's instruction set?


I know that MARIE's instruction set has 16-bit per instruction, given that there are 9 instructions, doesn't it make sense that 16*9 = 144bits are needed to store all of the instruction? But apparently its wrong, whats wrong with my reasoning and can you guide me to the answer?


Solution

  • I think you are looking for the following data structure

    -------------------------------------
    | Opcode  | Address                 |
    -------------------------------------
    | _ _ _ _ | _ _ _ _ _ _ _ _ _ _ _ _ |
    -------------------------------------
      Bit Bit   Bit                 Bit
       15  12    11                   0
    

    as Paul R and Peter Cordes already mentioned in his comments.