5 differences between risc vs cisc that should know about
The architecture of a microprocessor is designed to run programmes that get the desired output based on a specific input. The two common microprocessor architectures predominately used today are the contrasting RISC vs CISC. Each of these two architectures has its own advantages and disadvantages in speed, ease of use for programmers, and practical application. Presented here are descriptions of these two architectures, and five key differences in RISC vs CISC.
Image Via pexels
The performance of a processor can be expressed in the time it takes to run a programme. This is determined by how many instructions are in a programme, how many cycles are in each instruction, and how much time is required for each cycle. However, optimizing computer performance by balancing time, cycles, and instructions is only part of the picture. Different microprocessor architectures place different demands on RAM and compiler technology. They also have different costs to the consumer, and the acceptance in the commercial world is not always quick to change. Comparing RISC vs CISC is anything but straightforward.
What Is RISC?
Image Via pexels
RISC stands for Reduced Instruction Set Computer. It is a type of microprocessor architecture that only uses simple instructions that are most frequently used in programs. It implements less common, more complex instructions using subroutines, or simpler instructions. RISC microprocessors use pipelining to allow the various stages of the instructions to be processed simultaneously and thus more efficiently.
What Is CISC?
CISC stands for Complex Instruction Set Computer. It is a type of microprocessor architecture that contains a large set of computer instructions and commands, from simple to complex. Some of these instructions may only be used rarely in programs. CISC is actually the predecessor of RISC; the terms were only coined when RISC was developed to differentiate between the two. Because RISC came second, CISC tends to be used as a catch-all term for any microprocessor design that is not RISC.
5 Differences: RISC vs CISC
Image Via pexels
There are many differences between RISC and CISC microprocessor architectures. Here the five most important ones are described.
1. Built-In Instructions and Pipelining
RISC microprocessors have fewer instructions built into their physical structures. These instructions are simple and general and used commonly in programmes. More complex instructions must be broken down into sub-routines, also called microinstructions, which are simply more, but simpler instructions.
CISC microprocessors have a greater number of instructions built into their physical structures. These include more complex instructions that can execute several low-level operations or multi-step operations within a single instruction. With CISC microprocessors, different instructions take different amounts of time.
This is the fundamental difference between RISC vs CISC microprocessors. It is the determining factor for all the other differences between these two types of microprocessor architectures.
2. Instructions Per Program, Cycles Per Instruction, and Pipelining
The simple instructions found in RISC microprocessors mean that each instruction is generally performed in one clock cycle. Complex instructions must be broken down into subroutines, or smaller instructions. This means that the number of instructions per program is much greater.
CISC, on the other hand, makes use of built-in complex instructions. These instructions have more cycles within in them (anywhere from 2 to 10 or more), and so different instructions will take variable amounts of time depending on the number of cycles required. However, this minimizes the number of instructions per program.
In the RISC vs CISC comparison, this may appear to give the advantage to CISC microprocessors. However, RISC microprocessors can work on different steps of an instruction at the same time, in a process called pipelining. This allows more instructions to be executed in a shorter period of time. CISC microprocessors cannot take advantage of pipelining.
3. Register Memory Architecture
RISC uses a load/store architecture, which uses a specific instruction to load data from memory to a register, and later a separate instruction to store data, moving it from a register to the computer’s memory.
CISC uses a register-memory architecture, where one operand may be in memory, while the other in a register. It operates directly on the computer memory banks without specific code to load or store functions. The processor erases the registers after each instruction is completed.
Although the CISC approach seems more streamlined, separating the loading and storing of data in the RISC strategy may actually reduce the amount of work the computer has to do. When an operand is needed for another calculation, CISC must re-load the value into the register (since the register is erased after each instruction), whereas RISC can leave a value in a register to be used again without having to store it in memory and then re-load it.
Furthermore, the simpler design of RISC microprocessors means the size of the register can be increased, which is of use when pipelining many instructions at once.
Another advantage of the load/store architecture vs registry-memory architecture in the RISC vs CISC comparison is those complex instructions of CISC microprocessors are difficult and time-consuming to restart in the event of an error such as a page fault. With the load/store architecture of RISC microprocessors, the program counter is sufficient to ‘remember’ which steps have been completed and which remain to be done.
4. Code and RAM Requirements
When comparing RISC vs CISC microprocessors, RISC microprocessors have bigger programs. Complex instructions must be broken down into multiple small instructions, so RISC computers require more lines of code. This also means that more RAM is needed to store the instructions, and the compiler software must do more work to break down high-level language into code. However, operating system and application programmers who use the microprocessor’s instructions will have a smaller instruction set to work with, which may make it easier for them to develop code.
CISC computers, on the other hand, have small programs. They require less code because each of the unique instructions contains multiple steps. It is unnecessary to spell out everything in more complex code because the microprocessor hardware itself is capable of understanding a single instruction as a series of operations. This means that the compiler has less work to do to convert a high-level programming language into the code, and less RAM is needed to store the instructions.
One important difference is how inefficiencies can be addressed in RISC vs CISC instructions. In the CISC instructions, any inefficiencies are difficult to rectify. If there are inefficiencies in the multiple steps in a CISC instruction, this inefficiency will be repeated over and over each time that instruction is used, and that instruction cannot be changed without changing the physical structure of the microprocessor itself.
RISC instructions, by comparison, are simpler and do not involve multiple steps. This means that instructions and code can be streamlined more easily by the programmer to remove inefficiencies and unnecessary code. The simplicity leads to more flexibility in this sense.
5. Emphasis On Hardware Vs Software
The emphasis on hardware vs software in the RISC vs CISC comparison presents an important summary of the differences between the two.
In CISC, the emphasis is on the hardware. The complex instructions are built directly into the microprocessor itself, using fewer lines of code. More transistors are needed for each instruction. CISC microprocessors place little demand on the compiler software to convert high-level programming language into code because of the complexity already built into the microprocessor itself.
In RISC, the emphasis is on the software. There is more demand on the compiler software to convert high-level programming language into the detailed code required, and more lines of code are needed to carry out complex instructions. Although the demand placed on the compiler software by RISC microprocessors may be considered a drawback, advancements in compilers produce the code from higher-level language more efficiently than before.
Indeed, RISC is sometimes said to stand for ‘Relegate Interesting Stuff to the Compiler,’ referring to the fact that the hardware has a small set of simple instructions, and the complex instructions must be broken down by the compiler.
RISC microprocessors use fewer transistors for storing instructions. This means there is more freedom to choose how to use the space on a RISC microprocessor, and more transistors are available for general-purpose registers. This also means that when looking at RISC vs CISC, RISC microprocessors tend to be cheaper to design and produce, and have lower manufacturing costs.
Image Via pexels
In the past, computers used CISC based microprocessors. Only more recently was RISC based processing developed, and the two terms were coined. The dramatic reduction of the cost of RAM and improved compiler technology means that RISC architecture, and its focus on software vs. hardware, has found its place in the market. RISC microprocessors are used across many platforms, from cell phones to tablets to supercomputers. In general, speed is higher, and power consumption is lower in RISC vs CISC.
CISC based microprocessors still remain important, particularly in personal computers. The x86 instructions are standard for Windows, which is optimized for CISC microprocessors and requires much more code for a RISC microprocessor than a CISC one. Personal computers currently use both RISC and CISC microprocessors, depending on the brand.
However, the line delineating RISC and CISC microprocessors is beginning to blur. RISC microprocessors remain defined by their single cycle instructions, and their load/store architecture, and their larger number of general purpose registers. However, CISC chips are starting to make use of pipelining. Increased transistor density allows more CISC-like instructions to be built into RISC microprocessors. In fact, many of today’s RISC microprocessors use as many instructions as CISC chips of the past.
As advances continue, pitting RISC vs CISC against each other is no longer so simple.