Some computer CPUs use a fixed lengthinstruction encoding format.
That means:
Every computer instruction is represented using the same number of bytes
For example: ARM instructions are always 4 bytes long
Consequences of fixed length (RISC) instructions
Because each instruction is the same length, we know how many bytes we will need to increase to get the next instruction
But fixed sized instruction is very inflexible:
The more complex an operation is, the more information we need to encodein a computer instruction
Because the instruction length is fixed, the complexity of a (single) computer instruction will be limited
So we often find that:
Computer that uses fixed length computer instruction do not have complex computer instruction
Such a computer is called Reduced Instruction Set Computer (RISC) because the complexity of its instruction set is reduced.
Example of RISC computers that has fixed lengthinstructions are:
ARM processor --- each instruction is 4 bytes long
SPARC processor --- each instruction is 4 bytes long
Variable length (CISC) instructions
Some computer CPUs use a "variable" lengthinstruction encoding format.
That means:
Different computer instructions is represented using different number of bytes
There is basically no constraint on how many bytes is used in encoding the computer instruction (i.e.: use as many bytes you need)
For example: INTEL (the CPU in your laptop) instructions are can have different number of bytes
Consequences of fixed length (RISC) instructions
Because each instruction can have different length, we can encode simpler instruction using fewer number of bytes
Furthermore:
Because there is no restriction on the number of bytes that we can use, we can encode very complex instructions
So we often find that:
Computer that uses variable length computer instruction usually have complex computer instruction
Such a computer is called Complex Instruction Set Computer (CISC)
Example of CISC computer that has variable lengthinstructions are:
The very successful INTEL processor (the CPU used in your laptop)
The very elegantly designed but unsuccesful M68000 processor (we used to teach CS255 in M68000 assembler code)
Power (speed) of a processor and the complexity of its instruction set
You may think that CISC computer has an advantage over RISC because they can execute very complex instructions
The power of a computer is not measured by the complexity of its instructions.
The power (= how fast) a computer rather depends on the circuitry used to execute the instructions.
Specifically: how many steps of the execution of different instructions can you overlap with each other.
If you can overlap the execution of multiple instructions (i.e.: multi-tasking), then you can do things faster
Multi-asking (or pipelining) is a topic in CS355 - so if you want to learn more, you will need to take that course....