Fixed length and variable length instruction codes
 

  • Different computers (CPUs) encode their instructions in a different format

  • Some computers use fixed length instruction codes

      • Example: the ARM processes encodes each instruction in 4 bytes

  • Some computers have variable length instruction codes

      • Example: the isntructions of the Intel x86 processor can vary from 2-15 bytes

Final comments on instruction encoding
 

  • Each CPU manufacturer designs its own way to encode the computer instructions (in binary)

  • It's a waste of time to study a particular CPU's way

  • Just remember that each machine code must encode:

      • The operation (opcode)
      • The source operand(s)
      • The destination (where to store the result)

How these information are encoded and encoding format are determined by each CPU manufacturer