<<< Encoding The Opcodes, Cont. | Index | Variable-length Opcodes >>> |
Another important criteria: keep instruction sizes within a reasonable range.
CPU with unnecessarily long instructions will consume extra memory for programs in memory.
Long instructions hurt overall CPU performance.
Using encoding with n-bit size opcodes leaves us with 2n different instructions.
With n bits, it seems like you can't do it with any fewer but 2n opcodes.
<<< Encoding The Opcodes, Cont. | Index | Variable-length Opcodes >>> |