RISC AND CISC
RISC AND CISC
In RISC architecture, all instructions are of the same length (e.g., 32 bits or
16 bits).
Uniformity: Each instruction occupies the same amount of memory,
regardless of its type or complexity.
Contrast with CISC: In CISC (Complex Instruction Set Computer),
instructions can vary in length (e.g., 1 byte to 15 bytes in x86), depending on
the operation.
"Simplifying Decoding"
Advantages:
o Faster execution due to simple and uniform instructions.
o Easier hardware implementation.
o Energy efficiency, making it suitable for embedded systems and
mobile devices.
Disadvantages:
o Larger program size due to more instructions needed for complex
operations.
o Requires efficient compilers for optimized code generation.
Example
Variable-Length Instructions in CISC:
Instruction Length Description
MOV AL, 5 2 bytes Move the immediate value 5 into register AL.
MOV AX, [1234] 3 bytes Move data from memory address 1234 into AX.
MOVEAX, Move data from a 32-bit memory address into
6 bytes
[12345678] EAX.
The instruction length varies based on the operation and addressing mode.
Fixed-Length Instructions in RISC:
RISC instructions are typically fixed at 4 bytes (32 bits):
o LOAD R1, #5 → 4 bytes.
o ADD R2, R1, R3 → 4 bytes.
o STORE R2, [100] → 4 bytes.
Complex Addressing Modes refer to the various ways that a processor can access
operands (data) in memory or registers. Addressing modes define how the effective
address of an operand is computed and how it can be accessed during the execution
of an instruction.
In some CPU architectures, particularly CISC (Complex Instruction Set
Computers), addressing modes can be quite sophisticated, enabling a single
instruction to perform multiple operations (such as fetching from memory,
performing an arithmetic operation, and storing the result). These complex
addressing modes are often designed to improve the efficiency of instructions and
reduce the need for multiple instructions.
Advantages:
o Reduced program size due to powerful instructions.
o Easier programming as fewer instructions are required.
Disadvantages:
o Slower execution due to complex instructions.
o Harder to implement pipelining, resulting in less efficient instruction
throughput.
o Higher power consumption and heat generation.
Comparison Table:
Feature RISC CISC
Instruction
Simple and limited Complex and extensive
Set
Execution
One clock cycle per instruction Multiple clock cycles
Time
Instruction
Fixed Variable
Length
Memory
More memory (longer code) Less memory (compact code)
Usage
Pipelining Easy to implement Difficult to implement
Power
Low High
Consumption
Desktop and general-purpose
Use Case Embedded systems, mobile devices
PCs
RISC processors like ARM, MIPS, and SPARC are optimized for speed and
efficiency through simplicity, while CISC processors like Intel x86, AMD64, and
VAX offer greater flexibility with more complex instruction sets, but typically at
the cost of slower execution per instruction.