CSS Prepare

optional · CSS study notes

CISC vs RISC

CSS Optional — Paper-II, Section-A · Chapter 7 · 🔥 Near-guaranteed question

The RISC/CISC debate is a genuine engineering argument about where complexity should live — inside the hardware, or inside the compiler. CISC puts it in hardware; RISC pushes it into software. Everything else follows from that single choice.

🗺️ Architecture Diagram — CISC vs RISC Pipeline

graph TD
    subgraph CISCP["CISC Pipeline"]
        C1["Fetch
variable length, hard to predict"] --> C2["Microcode Decode"] --> C3["Multiple Execute Cycles"] --> C4["Memory Access
any instruction"]
    end
    subgraph RISCP["RISC Pipeline"]
        R1["Fetch
fixed length"] --> R2["Decode
hardwired"] --> R3["Execute
1 cycle, register-register"] --> R4["Memory Access
Load/Store only"] --> R5["Write Back"]
    end

1. CISC — Complex Instruction Set Computer

Designed in the 1970s when memory was scarce and expensive and compilers were primitive. The goal was to make each instruction do as much work as possible, so programs stayed short.

  • Large instruction set — often 200–400+ instructions, including highly specialised ones (a single x86 instruction can copy an entire string).
  • Variable instruction length — anywhere from 1 to 15 bytes on x86. Saves memory, but the CPU cannot know where the next instruction begins until it has decoded the current one, which cripples pipelining.
  • Multiple cycles per instruction — a complex instruction may take 5, 10, or more cycles.
  • Microprogrammed control unit — each complex instruction is internally broken into a stored sequence of microinstructions.
  • Memory-to-memory operations allowed — an instruction can read from memory, compute, and write back to memory directly.
  • Fewer general-purpose registers — typically 8–16.
  • Examples: Intel x86, AMD64, VAX, Motorola 68000.

2. RISC — Reduced Instruction Set Computer

Emerged in the 1980s from a key observation: ~80% of a typical program's execution time is spent on ~20% of the instruction set. The exotic instructions were rarely used but slowed down every instruction by complicating the decoder.

  • Small instruction set — typically 50–100 simple instructions.
  • Fixed instruction length — usually 32 bits. The CPU always knows where the next instruction starts, so it can fetch several ahead. This is what makes deep pipelining practical.
  • Single cycle per instruction (ideally) — combined with pipelining, this approaches a throughput of 1 instruction per cycle.
  • Hardwired control unit — faster than microprogramming because there is no microcode lookup.
  • Load/Store architecture — only LOAD and STORE instructions touch memory. All arithmetic happens register-to-register. This is the defining structural feature of RISC.
  • Many general-purpose registers — typically 32 or more, reducing memory traffic.
  • Examples: ARM, MIPS, RISC-V, SPARC, PowerPC.

3. Head-to-Head Comparison

FeatureCISCRISC
Instruction countLarge (200–400+)Small (50–100)
Instruction lengthVariable (1–15 bytes)Fixed (usually 32-bit)
Cycles per instructionMultipleMostly one
Control unitMicroprogrammedHardwired
Memory accessAny instruction may access memoryOnly LOAD / STORE
General-purpose registersFew (8–16)Many (32+)
PipeliningDifficult (variable length)Easy and deep
Code sizeSmallerLarger
Compiler burdenLightHeavy (must optimise)
Power consumptionHigherLower
ExamplesIntel x86, VAXARM, MIPS, RISC-V

4. The Modern Convergence (worth a marks-scoring paragraph)

The pure distinction has blurred. Since the Pentium Pro, Intel's x86 chips have used a hybrid design: they accept CISC instructions externally, then a hardware decoder translates each into internal RISC-like micro-operations (μops) which are executed by a RISC-style pipelined core. So a modern x86 chip presents a CISC architecture to the programmer while using a RISC organization internally — a neat illustration of the architecture-vs-organization distinction from Fundamental Concepts.

Meanwhile ARM has added some complex instructions (SIMD/NEON), moving slightly toward CISC.

Why RISC dominates mobile: power. Simpler decoders and hardwired control mean fewer transistors switching per instruction, which directly translates into longer battery life — the reason ARM, not x86, is in essentially every smartphone.


🧮 Solved Numerical 1 — Which Design is Faster for a Given Program?

Q: A program is written for both a CISC and a RISC machine.

  • CISC: 2,000,000 instructions, average CPI = 6, clock = 1 GHz
  • RISC: 4,000,000 instructions, average CPI = 1.2, clock = 1 GHz

Which machine executes the program faster?

Given: ICCISC=2,000,000IC_{CISC} = 2{,}000{,}000, CPICISC=6CPI_{CISC} = 6; ICRISC=4,000,000IC_{RISC} = 4{,}000{,}000, CPIRISC=1.2CPI_{RISC} = 1.2; clock rate =1 GHz= 1\ \text{GHz} for both.

Formula (CPU performance equation):

T=IC×CPI×TcT = IC \times CPI \times T_c

Step 1 — Clock cycle time:

Tc=1f=11×109=1 nsT_c = \frac{1}{f} = \frac{1}{1 \times 10^{9}} = 1\ \text{ns}

Step 2 — CISC execution time:

Total cycles=2,000,000×6=12,000,000TCISC=12,000,000×1 ns=12,000,000 ns=12 ms\begin{aligned} \text{Total cycles} &= 2{,}000{,}000 \times 6 = 12{,}000{,}000 \\ T_{CISC} &= 12{,}000{,}000 \times 1\ \text{ns} = 12{,}000{,}000\ \text{ns} = 12\ \text{ms} \end{aligned}

Step 3 — RISC execution time:

Total cycles=4,000,000×1.2=4,800,000TRISC=4,800,000×1 ns=4,800,000 ns=4.8 ms\begin{aligned} \text{Total cycles} &= 4{,}000{,}000 \times 1.2 = 4{,}800{,}000 \\ T_{RISC} &= 4{,}800{,}000 \times 1\ \text{ns} = 4{,}800{,}000\ \text{ns} = 4.8\ \text{ms} \end{aligned}

Step 4 — Speed-up:

Speed-up=TCISCTRISC=124.8=2.5\text{Speed-up} = \frac{T_{CISC}}{T_{RISC}} = \frac{12}{4.8} = 2.5

Answer: RISC is faster — 12 / 4.8 = 2.5× speedup.

The examiner's point: RISC executed twice as many instructions yet still finished in less than half the time. This is the whole RISC argument in one calculation — instruction count is not what matters; total cycles are.

🧮 Solved Numerical 2 — Code Size Trade-off

Q: For the same program, CISC uses 2,000,000 instructions averaging 4 bytes each; RISC uses 4,000,000 instructions of exactly 4 bytes each. Compare memory footprint.

Given: CISC: 2,000,000 instructions averaging 4 bytes each. RISC: 4,000,000 instructions of 4 bytes each.

Formula:

Code size=Number of instructions×Average instruction length\text{Code size} = \text{Number of instructions} \times \text{Average instruction length}

Step 1 — CISC code size:

SCISC=2,000,000×4=8,000,000 bytes=8,000,0001,048,576≈7.63 MB\begin{aligned} S_{CISC} &= 2{,}000{,}000 \times 4 = 8{,}000{,}000\ \text{bytes} \\ &= \frac{8{,}000{,}000}{1{,}048{,}576} \approx 7.63\ \text{MB} \end{aligned}

Step 2 — RISC code size:

SRISC=4,000,000×4=16,000,000 bytes=16,000,0001,048,576≈15.26 MB\begin{aligned} S_{RISC} &= 4{,}000{,}000 \times 4 = 16{,}000{,}000\ \text{bytes} \\ &= \frac{16{,}000{,}000}{1{,}048{,}576} \approx 15.26\ \text{MB} \end{aligned}

Step 3 — Ratio:

SRISCSCISC=16,000,0008,000,000=2\frac{S_{RISC}}{S_{CISC}} = \frac{16{,}000{,}000}{8{,}000{,}000} = 2

Answer: RISC code is 2× larger. This is the price RISC pays for its speed, and it explains why CISC was the rational choice in the 1970s when memory cost far more than CPU cycles. The economics reversed; the architecture followed.

🧮 Solved Numerical 3 — Break-even CPI

Q: A CISC machine runs a program in 1,000,000 instructions at CPI = 5. A RISC version of the same program needs 2,500,000 instructions. What is the maximum CPI the RISC machine can have and still match CISC performance (same clock)?

Given: ICCISC=1,000,000IC_{CISC} = 1{,}000{,}000, CPICISC=5CPI_{CISC} = 5, ICRISC=2,500,000IC_{RISC} = 2{,}500{,}000, same clock rate.

Condition: with the same clock, equal execution time means equal total cycles:

ICCISC×CPICISC=ICRISC×CPIRISCIC_{CISC} \times CPI_{CISC} = IC_{RISC} \times CPI_{RISC}

Step 1 — CISC total cycles:

1,000,000×5=5,000,000 cycles1{,}000{,}000 \times 5 = 5{,}000{,}000\ \text{cycles}

Step 2 — Solve for the RISC CPI:

2,500,000×CPIRISC=5,000,000CPIRISC=5,000,0002,500,000=2\begin{aligned} 2{,}500{,}000 \times CPI_{RISC} &= 5{,}000{,}000 \\ CPI_{RISC} &= \frac{5{,}000{,}000}{2{,}500{,}000} = 2 \end{aligned}

Check:

2,500,000×2=5,000,000 cycles=CISC cycles ✓2{,}500{,}000 \times 2 = 5{,}000{,}000\ \text{cycles} = \text{CISC cycles} \ \checkmark

Answer: CPI = 2. Since real RISC machines achieve CPI near 1–1.3, they comfortably beat this break-even point — which is precisely why the design won.

Extension (break-even instruction count): if the RISC machine achieves CPI = 1.25, the most instructions it can use and still match CISC is:

ICRISC=5,000,0001.25=4,000,000=4×ICCISCIC_{RISC} = \frac{5{,}000{,}000}{1.25} = 4{,}000{,}000 = 4 \times IC_{CISC}

🧮 Solved Numerical 4 — Different Clock Rates and Instruction Counts

Q: A CISC processor at 2 GHz with CPI = 5 executes a program of 1,200,000 instructions. A RISC processor at 1.5 GHz with CPI = 1.3 executes the same program as 3,000,000 instructions. Which is faster, and by how much?

Given: ICCISC=1,200,000IC_{CISC} = 1{,}200{,}000, CPICISC=5CPI_{CISC} = 5, fCISC=2 GHzf_{CISC} = 2\ \text{GHz}; ICRISC=3,000,000IC_{RISC} = 3{,}000{,}000, CPIRISC=1.3CPI_{RISC} = 1.3, fRISC=1.5 GHzf_{RISC} = 1.5\ \text{GHz}.

Formula:

T=IC×CPIfT = \frac{IC \times CPI}{f}

Step 1 — CISC execution time:

TCISC=1,200,000×52×109=6,000,0002×109=3×10−3 s=3 msT_{CISC} = \frac{1{,}200{,}000 \times 5}{2 \times 10^{9}} = \frac{6{,}000{,}000}{2 \times 10^{9}} = 3 \times 10^{-3}\ \text{s} = 3\ \text{ms}

Step 2 — RISC execution time:

TRISC=3,000,000×1.31.5×109=3,900,0001.5×109=2.6×10−3 s=2.6 msT_{RISC} = \frac{3{,}000{,}000 \times 1.3}{1.5 \times 10^{9}} = \frac{3{,}900{,}000}{1.5 \times 10^{9}} = 2.6 \times 10^{-3}\ \text{s} = 2.6\ \text{ms}

Step 3 — Speed-up:

TCISCTRISC=32.6=1.15\frac{T_{CISC}}{T_{RISC}} = \frac{3}{2.6} = 1.15

Answer: RISC is faster by about 1.15× (15%), even though its clock is lower and it executes 3,000,0001,200,000=2.5\frac{3{,}000{,}000}{1{,}200{,}000} = 2.5 times as many instructions.

🧮 Solved Numerical 5 — The MIPS Trap

Q: Both machines run at 1 GHz. CISC executes the program in 1,000,000 instructions at CPI = 4. RISC needs 5,000,000 instructions at CPI = 1. Compare their MIPS ratings and their execution times.

Formulas:

MIPS=fCPI×106T=IC×CPIfMIPS = \frac{f}{CPI \times 10^{6}} \qquad T = \frac{IC \times CPI}{f}

Step 1 — MIPS ratings:

MIPSCISC=1×1094×106=250MIPSRISC=1×1091×106=1,000\begin{aligned} MIPS_{CISC} &= \frac{1 \times 10^{9}}{4 \times 10^{6}} = 250 \\ MIPS_{RISC} &= \frac{1 \times 10^{9}}{1 \times 10^{6}} = 1{,}000 \end{aligned}

Step 2 — Execution times:

TCISC=1,000,000×4109=4 msTRISC=5,000,000×1109=5 ms\begin{aligned} T_{CISC} &= \frac{1{,}000{,}000 \times 4}{10^{9}} = 4\ \text{ms} \\ T_{RISC} &= \frac{5{,}000{,}000 \times 1}{10^{9}} = 5\ \text{ms} \end{aligned}

Step 3 — Compare:

MIPSRISCMIPSCISC=1,000250=4TRISCTCISC=54=1.25\frac{MIPS_{RISC}}{MIPS_{CISC}} = \frac{1{,}000}{250} = 4 \qquad \frac{T_{RISC}}{T_{CISC}} = \frac{5}{4} = 1.25

Answer: RISC has 4× the MIPS rating, yet CISC finishes the program 1.25× sooner (4 ms against 5 ms). MIPS counts instructions, not useful work, and one CISC instruction can do the work of several RISC instructions, so execution time is the only fair comparison.


🎯 CSS Exam Angle

This is one of the most repeated questions in the entire CS-optional syllabus and has appeared in some form in most attempts. Examiners award the top band to answers that:

  1. Give the comparison table (guaranteed marks).
  2. Name the defining structural feature — RISC's load/store architecture, CISC's variable-length instructions.
  3. Include the modern convergence paragraph, which distinguishes a prepared candidate from a memorised one.
  4. Support the claim with a numerical using T = IC × CPI × Cycle time.

🔁 Repeated CSS Questions

  1. Differentiate between RISC and CISC architectures with examples. (Very frequently repeated — treat as certain)
  2. Why do ARM (RISC) processors dominate mobile devices while x86 (CISC) dominates desktops? (Applied variant)
  3. Explain the trade-off between hardwired and microprogrammed control in the RISC/CISC context.
  4. "Modern processors are neither purely RISC nor purely CISC." Discuss.
  5. Given instruction counts and CPI values for two machines, determine which is faster. (Numerical)

⚠️ MCQ Traps

  • RISC does not execute fewer instructions. "Reduced" refers to the complexity of each instruction, not the number executed. RISC programs typically run more instructions than CISC ones. This is the single most common misconception on this topic.
  • RISC code is larger, not smaller — a direct consequence of the point above.
  • Only LOAD and STORE access memory in RISC. If an MCQ describes an architecture where an ADD instruction reads directly from a memory address, that is CISC.
  • Hardwired = RISC = faster but inflexible; Microprogrammed = CISC = slower but easier to modify. Examiners routinely swap these two.
  • Modern x86 is CISC architecture with a RISC-like internal organization — not "pure CISC."

📜 Past-Paper Questions & MCQs (CSS 2016–2026)

2016 · Paper-II · Q3(c) and 2019 · Paper-II · Q2(a) · 6 and 8 marks

Q. Differentiate between RISC and CISC architectures. Which type of architecture is suitable for pipelining?

Ans.

BasisRISCCISC
Instruction setSmall, simple instructionsLarge, complex instruction set
Instruction lengthFixed (for example 32 bits)Variable
ExecutionSimple instructions enable efficient pipelining; throughput may approach or exceed one instruction per cycleComplex instructions can require multiple micro-operations; modern designs also pipeline and execute multiple instructions per cycle
Memory accessLoad/store only; other operations use registersMany instructions can operate directly on memory
RegistersOften many general-purpose registersRegister count depends on the ISA; modern x86-64 also provides many architectural and physical registers
Addressing modesFew, simpleMany, complex
Control unitHardwired (fast)Microprogrammed (flexible)
Code sizeLarger programsCompact programs
ExamplesARM, MIPS, RISC-Vx86 (Intel, AMD), VAX
  • Suitable for straightforward pipelining: RISC. Regular instruction formats, load/store operations and relatively uniform decoding simplify pipeline design. Pipelining is not exclusive to RISC: modern x86 processors decode complex instructions into micro-operations and use deeply pipelined, often superscalar execution.

For a 6-mark comparison: definition/central distinction (1), any four correct contrasts in a compact table (4), pipelining judgement with a reason (1). For an 8-mark response, add instruction-format examples and the modern-x86 qualification. These are revision guidelines, not official marking allocations.

2026 · Paper-II · Q2 · 20 marks

Q. Machine instructions are the interface between hardware and software. Compare the representation and execution behaviour of machine instructions in CISC and RISC architectures. Evaluate how the instruction-cycle organisation shapes the design of the control unit, hardwired versus microprogrammed.

Ans.

  • Representation:
    • RISC: fixed-length instructions (such as 32 bits), a uniform format with opcode and register fields at fixed positions, and a load/store model, so decoding is trivial.
    • CISC: variable-length instructions with optional operands and many addressing modes, which allow powerful single instructions (string move, memory-to-memory operations) and give compact code, but need complex decoding.
  • Execution behaviour:
    • RISC: instructions take about one cycle through a regular pipeline, giving a low and predictable CPI and an easy design for pipelining and superscalar execution. The price is more instructions per program.
    • CISC: one instruction may take many cycles (it is broken into micro-operations), so CPI is higher and varies. Fewer instructions are needed per program.
    • Performance equation: time = (instructions) × CPI × (cycle time). RISC lowers CPI and cycle time, while CISC lowers the instruction count.
  • Instruction cycle and control unit: the control unit must generate the control signals for each step of fetch, decode, operand fetch, execute and write-back, in the right sequence.
    • Hardwired control unit: a fixed logic circuit (gates, decoders, counters) generates the signals directly from the opcode and timing. It is fast, which suits RISC's regular, short cycle, but it is hard to design and modify, and a large instruction set makes it impractical.
    • Microprogrammed control unit: each machine instruction is executed by a sequence of microinstructions stored in a control memory. It is flexible and easy to change or extend, which suits the large, irregular CISC instruction set, but it is slower because of the extra control-store access.
  • Evaluation: the regular and short instruction cycle of RISC lets a hardwired unit hit high clock speeds. The long, variable cycle of CISC makes microprogramming the practical way to build a large instruction set. Modern CISC processors use a hardwired decoder for common simple instructions and microcode only for the complex ones.
  • Conclusion: the organisation of the instruction cycle (simple and uniform versus complex and variable) decides the control-unit style, which in turn decides speed, flexibility and design effort.