When a computer architecture is in the design phase, the instruction set format
must be determined before many other decisions can be made. Selecting this format
is often quite difficult because the instruction set must match the architecture,
and the architecture, if well designed, could last for decades. Decisions made during
the design phase have long-lasting ramifications.
Instruction set architectures (ISAs) are measured by several different factors,
including: (1) the amount of space a program requires; (2) the complexity of the
instruction set, in terms of the amount of decoding necessary to execute an
instruction, and the complexity of the tasks performed by the instructions; (3) the
length of the instructions; and (4) the total number of instructions. Things to consider
when designing an instruction set include:
• Short instructions are typically better because they take up less space in memory
and can be fetched quickly. However, this limits the number of instructions,
because there must be enough bits in the instruction to specify the
number of instructions we need. Shorter instructions also have tighter limits on
the size and number of operands.
• Instructions of a fixed length are easier to decode but waste space.
• Memory organization affects instruction format. If memory has, for example,
16- or 32-bit words and is not byte-addressable, it is difficult to access a single
character. For this reason, even machines that have 16-, 32-, or 64-bit words
are often byte-addressable, meaning every byte has a unique address even
though words are longer than 1 byte.
• A fixed length instruction does not necessarily imply a fixed number of
operands. We could design an ISA with fixed overall instruction length, but
allow the number of bits in the operand field to vary as necessary. (This is
called an expanding opcode and is covered in more detail in Section 5.2.5.)