Learn through the super-clean Baeldung Pro experience:
>> Membership and Baeldung Pro.
No ads, dark-mode and 6 months free of IntelliJ Idea Ultimate to start with.
Last updated: May 13, 2023
In this tutorial, we’ll briefly give details about the pros and cons of the two forms of CPU design, reduced instruction set computing (RISC) architecture, and the complex instruction set computing (CISC) architecture.
The debate of the best way to design a CPU has been continuing since the 80s. Some computer scientists support the idea that low-level instructions should be long and powerful. This can be done by using fewer individual instructions to perform a complex task (CISC). Controversially, some other computer scientists argue that the commands can be shorter and simpler. It requires more individual instructions to perform a complex task (RISC). However, it allows fewer cycles per instructions.
According to Moore’s Law, the number of transistors on a microchip doubles every two years, and the cost is halved. While designing CISC, there is always a high risk because of greater complexity on the hardware side. It also takes more time to design new CISC architecture. On the other side, RISC is a simple architecture and it is simple to implement. It means it takes short time to market and it has a lower risk than CISC. For that reason, RISC is the inevitable conclusion of Moore’s Law.
Even though there are some debates about which one is better, we can say that there is no correct answer for this debate. Because both approaches have advantages and drawbacks. We can see the overall comparison between RISC and CISC in the figure below:
RISC (reduced instruction set computing) architecture is a design choice that aims to reduce the complexity of instructions and to deliver simple but powerful instructions that execute within a cycle at a high clock speed. It is proposed by David Patterson and John Hennessy.
Reducing the complexity of the instruction set performed by the hardware paves the way for providing flexible intelligence by using software rather than hardware. As a result, a RISC architecture design requires greater complexity on the compiler.
The RISC has some major design principles:
Because of these design principles, RISC processors can be simpler. This situation allows the core to run at higher clock frequencies. On the other hand, traditional CISC processors are more complicated and run at lower clock frequencies. However, the line between RISC and CISC has faded over in recent years. That’s because CISC processors have adopted some of the design principles of the RISC.
The most common examples of RISC are ARM which is used in many cell phones and PDAs, Sparc, and PowerPC.
CISC is the ancestor approach of CPU design. Because before some principles weren’t found, CISC was prominent in the sector. So, the CISC architecture aims to reduce the number of instructions per program while increasing the number of cycles per instruction.
CISC architecture-based computers are intended to reduce memory costs. Because huge programs require more storage, so large memory causes the cost. to address these issues, the number of instructions per program can be lowered by combining the number of instructions in a single instruction. Therefore it increases the complexity of the instructions on the hardware.
The most common examples of CISC are x86 CPUs.
| RISC | CISC |
|---|---|
| Emphasis on software | Emphasis on hardware |
| Low cycles per second | High cycles per second |
| Large code sizes | Small code sizes |
| Spends more transistors on memory registers | Transistors used for storing complex instructions |
| Single-clock, reduced instruction only | Includes multi-clock complex instructions |
| “load” and “store” independent instructions (Register to register) | “load” and “store” incorporated instructions (Memory-to-memory) |
Let’s also look at the figure below to understand the difference between the RISC and CISC. It’s an example of multiplying two numbers in the memory:
In the CISC approach, as we see in the figure, there is only one complex instruction “MULT”. It takes care of everything. It works directly on the memory of the computer. So it doesn’t need the programmer to manually invoke any loading or storing. It is similar to a command in a higher-level language.
In the RISC approach, as we can see in the figure, there is more than one instruction. Because RISC processors execute simple instructions. These instructions can be completed in a single clock cycle. As a result, “MULT” instruction is divided into three separate instructions: “LOAD”, which moves data from the memory to register, “PROD”, which calculates the product of two inputs placed in the registers, and “STORE”, which moves data from registers to memory.
In this tutorial, we’ve shared the details of the continuing debate on the design choices of the CPU. We’ve briefly given information about the RISC and CISC architecture. We’ve shared the advantages and disadvantages of both design choices. In recent days, since the ARM is proprietary, RISC-V comes on the stage and starts to change the market share in microprocessor architectures.