A processor, or say more precisely CPU (Central Processing Unit ) can be defined as an integrated circuit that is responsible for processing stored instructions. The primary operations of a CPU are:
– Fetch : Receiving instructions from memory
– Decode – Convert it into binary instructions
– Execute – Operation is performed
– Store – Saving output to memory
It can have two types of CPU architecture, CISC and RISC. Both provides communication between hardware and software.
These CPU architectures are capable of carrying out primary CPU tasks, though, they follow different approaches. The main difference between them is, CISC supports more instruction sets than RISC.
Difference between RISC AND CISC in Tabular Form
Basis | RISC | CISC |
---|---|---|
Stands for | Reduced Instruction Set Computer | Complex Instruction Set Computer |
Size of instructions | Smaller and simpler instructions | Larger and Complex instructions |
Execution Time | 1 cycle per instruction | Multiple number of cycles per instruction |
Emphasis | On Software | On hardware |
Instruction Formats | Fixed (4 bytes) | Variable Length (2-6 bytes) |
Control Unit | Hardwired Control Unit | Microprogrammed Control Unit |
Data and Instruction Cache | Separate | Combined |
Example of processors | ARM processor and Qualcomm processor are some examples | AMD, VAX and Intel x86 CPUs are some examples |
CPU size | Smaller | Larger as they have larger instruction libraries |
Addressing Modes | Fewer | Many |
Array | Not Supported | Supported |
Pipeline | Easy | Hard |
Power consumption | Less | More |
Referred as | Machine Oriented | Programmer Oriented |
Register sets | Has multiple register sets | Has Single register set |
Memory unit | Doesn't have memory unit | Have memory unit |
RISC (Reduced Instruction Set Computer)
It stands for Reduced Instruction Set Computer.
It is basically conceptualized on the fact of making hardware simpler and less complex. And this is done by implementation of the Instruction set which reduces the load on processes like loading, storing and evaluating data.
In other words, it has an assembly language that enables each and every task to be split into simpler instructions which are then executed for each clock cycle. Its instructions are efficient but due to simplicity it processes more lines of code.
It focuses on reducing execution time by optimising and simplifying instruction set. It requires only single clock cycle to process results in uniform execution time. However, it reduces efficiency in case of large program size which leads to need of more RAM for storing instruction.
RISC architecture is often used in portable devices such as mobile phones.
CISC (Complex Instruction Set Computer)
It stands for Complex Instruction Set Computer.
It is basically based on complex hardware and all the importance is given to that always. This is done by implementing complex hardware which serves as a single instruction for all the processes like loading, storing and evaluating data.
In other words, It processes larger and more complex assembly instructions each time. One CISC instruction can do the task of multiple RISC instructions.
It focuses on reducing the number of instructions per program without considering the number of cycles per instruction. It relatively requires less RAM to store instructions. It is mainly used in desktops or laptops computer.
RISC and CISC example :
Multiplying two variables X*Y:
- CISC approach can be viewed as
MULT X, Y - RISC approach can be viewed as
LOAD R1, X
LOAD R2, Y
PROD X, Y
STORE R3, X
Key Differences:
- RISC machine focuses more on software and less on hardware, whereas; CISC machine focuses more on hardware and less on software.
- RISC machine has greater use of registers so, they use transistors for more registers, whereas; CISC machine uses a greater number of complex instructions, so they use transistors to store all their complex instructions.
- In RISC machine, as it follows a software-based approach that is why, the code part is large, whereas; in CISC machine, as it is complex hardware driven, this makes the code part much smaller.
- In RISC machine, due to its great and reliable software approach, an instruction can execute in a single clock cycle, whereas; in CISC machine, due to its more hardware driven approach, an instruction lags a little bit and takes more than one clock cycle.
- The RISC instructions are quite handy and easy as they can fit in a single word, whereas; the CISC instructions are quite larger than a typical word.