What are CISC Processor?
CISC stands for Complex Instruction Set Computing. CISC processors were launched in 1970 and can perform complex tasks with relatively few instructions (without using multiple codes). The aim of this architecture is to create an instruction set that functions seamlessly with higher-level languages and data structures.
It can use instructions that are different lengths:
- Register-based instructions can be as short as 2 bytes
- Instructions with two memory addresses can be 5 bytes for the complete code
As instructions can be of different lengths, the execution time can also vary. Many will use more than one clock cycle.
Another unique feature is direct access to operands in memory. This reduces the difficulty of software (compilers) to convert high-level commands to machine-level instructions.
Imagine you have an instruction to add two numbers together. CISC processors can directly work with these numbers without requiring extra steps.
An instruction can add a number stored in memory and another in a register. And finally, save our result to some location in memory.
So, rather than working with small, fast storage areas called registers that are inside the processor, CISC processors work directly with computer memory to take in and send out information.
Architectural Overview: How CISC Processor Works
CISC processors perform their tasks through repeating cycles:
- Program Counter (PC): It holds the 16-bit instruction address to be fetched.
- Instruction Fetch: Then, the instruction is loaded from memory into the data bus and sent to the decoder.
- Instruction Decoding: The decoder then figures out which operation to perform and the applicable operands.
- Control Signals: The control unit sends the commands needed for fetching and executing further instructions.
- Execution: Finally, the operation takes place. If required, it may fetch more data and store the result in memory.
- PC Update: The Program Counter gets the next address, gets latched, and the cycle goes on.
How does this recurring cycle help? It ensures that most actions happen in memory – so only a few registers are required.
Unlike RISC, CISC can perform operations directly on data in memory without first loading it into registers. For example, the instructions MUL 2:1 and 3:5 multiply values and store the result directly in memory.
How it Works? Example of ADD and MUL Instructions
Let’s say you need to add two 8-bit numbers. In a CISC processor, you can get it done by using a single instruction only (instead of many).
For that, you can use commands like ADD and tell the processor where the numbers are stored in memory and where to put the results.
The processor will go to the memory, grab the two numbers, add them together, and store the result – within that one instruction.
Similarly, for multiplication, you can use this command: MUL 2:1, 3:5. How does it perform?
It multiplies the value at 2:1 by the value at 3:5, and stores the results WITHOUT any load/store commands. The entire operation is directly manipulated in memory.
Key Features of CISC Processors
CISC processors have several key features that set them apart. Let’s take a look at them and then understand with an example.
Instruction Set and Addressing
- Large Instruction Set: Typically, 100 to 250 instructions are available.
- Specialized Instructions: Some instructions are used rarely but support unique or advanced operations.
- Several addressing modes: It generally ranges between 5 and 20 and can be used for flexible design.
- Variable-Length Instructions: It can also vary depending on what kind of task you’re doing or how the data is being accessed.
- Memory Operations: Many instructions can directly work with the data in memory. It means that you don’t always need to move the data to a faster register first. This saves time and simplifies the process.
Further Architectural Features
- Complex Instruction Decoding: Due to variable-length and complex instructions, decoding logic is intricate.
- General-Purpose Registers: CISC processors don’t need as many of these registers because they do most of their work directly with memory instead of using registers for temporary storage.
- Special Purpose Registers: These are specific registers for special tasks. For example, some registers help manage things like the program’s stack (which keeps track of data), handle interruptions, or record important details like the result and status of operations (this is called the Condition Code Register).
- Multiple Data Types: CISC processors handle varied data types with their extensive instruction sets.
- Limited Register Use: Chip space is mostly dedicated to instruction decoding, execution, and microcode storage.
- Multiple Clock Cycles: Some instructions require more than one clock cycle to complete.
- Condition Code Register: It is used to store certain conditions, like whether the last result was negative, zero, or positive. It also flags errors if any.
- Special Registers: They’re used for particular tasks, such as tracking the stack (where data is kept) or dealing with interruptions.
Why Use CISC Processors?
CISC design focuses on incorporating complexity directly into the CPU. By doing so, it takes stress off the software and other hardware. These processors are well-suited to tasks such as complex workloads generated by high-level programming languages.
Key points:
- Makes compiler’s job easier: Each high-level language statement is directly into a single machine instruction.
- Multithreading: CISC designs can benefit from running many tasks at the same time.
- x86 Ecosystem: Started in the 80s by Intel, the x86 family is the biggest CISC architecture. Only Intel and AMD remain as leading manufacturers after decades of investment in PC hardware and software.
- Market Status: ARM architecture has made progress in some areas, but x86 CISC chips still dominate IT infrastructure, especially in data centers.
- Cooling Solutions: High power consumption and heat output are handled by innovations such as liquid and immersion cooling.
Advantages of CISC Processors
- Smaller Code Size: The smaller the size of the code, lesser the amount of RAM an application with the same footprint will require.
- Efficient Compilation: CISC can compile a programming language to machine code more easily and quickly.
- Simpler Code: CISC processors can do some really complex things in a few instructions. This makes the code simpler.
- Direct mapping: It means that complex commands in a program can be directly turned into instructions for the hardware to follow.
Disadvantages of CISC Processors
- High hardware complexity can reduce computational speed and efficiency
- Multiple instructions require multiple clock cycles, which can slow down operations
- CISC architectures generally lack efficient pipelining support, limiting parallel execution