ScholarQuill logoScholarQuillUniversity Notes
  • Notes
  • Past Papers
  • Blogs
  • Todo
Login
ScholarQuill logoScholarQuillUniversity Notes
Login
NotesPast PapersBlogsTodo
More
SubjectsDiscussionCGPA CalculatorGPA CalculatorStudent PortalCourse Outline
About
About usPrivacy PolicyReportContact
Notes
Past Papers
Blogs
Todo
Analytics
    Current Subject
    🧩
    Computer Organization and Assembly Language
    COMP3137
    Progress0 / 73 topics
    Topics
    1. Introduction to Computer Organization2. Assembly Language3. Comparison of Low-Level and High-Level Languages4. Register Types (16-bit): General Purpose and Special Purpose Registers5. Introduction and Usage of RAM6. Processor7. Registers8. System Bus9. Instruction Execution Cycle10. Assembly and Machine Language11. Assembler12. Linker and Link Libraries13. Programmer's View of a Computer System14. RISC and CISC Architecture15. Physical Address Calculation16. Basic Memory Organization17. CPU Organization18. Top Level View of Computer Function and Interconnection19. Assembler Instruction Cycle20. Execute Cycle21. Interrupts22. Interrupt Cycle23. Memory Connection24. Input/Output Connection25. CPU Connection26. MASM27. MIPS28. Defining Data in MASM Assembler29. Elements of Assembly Language30. Integer Constants31. Integer Expressions32. Real Number Constants33. Character Constants34. String Constants35. Reserved Words36. Identifiers37. Directives38. Instructions39. The NOP (No Operation) Instruction40. Adding and Subtracting Integer41. INC and DEC Instructions42. NEG Instruction43. How to Move Integer Number in Register44. Adding and Subtracting Numbers in Registers45. Declaration and Initialization of Variables46. Moving Data from Variable to Register47. Data Definition Statement48. BYTE and SBYTE Data49. WORD and SWORD Data50. Defining DWORD and SDWORD Data51. Knowledge about Different Data Types52. Operations, Array & Loops53. Division and Multiplication in Assembly54. Jumps Based on Specific Flags55. Jumps Based on Equality56. Simple Jump Statements57. Jumps Based on Specific Condition58. Code Examples59. Practice on MASM60. Procedures61. File Operations Procedures62. Labels in Procedures63. Stack64. Runtime Stack65. Conditional Control Flow Directives66. Compound Expressions67. Data Representation & Conversion68. Architecture69. Data Path70. Control Unit71. Critical Path72. General Principles of Pipelining73. Pipelined Y86 Implementations
    COMP3137›RISC and CISC Architecture
    Computer Organization and Assembly LanguageTopic 14 of 73

    RISC and CISC Architecture

    7 minread
    1,237words
    Intermediatelevel

    RISC and CISC Architecture

    When designing Central Processing Units (CPUs), there are two primary architectural approaches that guide how instructions are processed and how the processor is designed: RISC (Reduced Instruction Set Computing) and CISC (Complex Instruction Set Computing). Both approaches have different philosophies regarding the instruction set, performance, and complexity of processors.

    1. RISC (Reduced Instruction Set Computing)

    Definition:

    • RISC is a CPU architecture that uses a small, highly optimized set of instructions. The idea behind RISC is that a simple instruction set will lead to faster instruction execution, as each instruction is designed to do a single, simple operation.

    Key Characteristics of RISC:

    1. Simple Instructions: RISC processors are designed to execute a small set of instructions. These instructions typically take a fixed amount of time to execute (often one clock cycle).

    2. Large Number of Registers: RISC systems tend to have more general-purpose registers. This reduces the need to use slower memory operations, as many operations can be performed directly in registers.

    3. Load/Store Architecture: In RISC, operations on memory are separated from operations on registers. This means that only load (to read from memory) and store (to write to memory) instructions can access memory, while arithmetic and logical operations can only occur between registers.

    4. Fixed-Length Instructions: Most RISC architectures use fixed-length instructions, meaning that every instruction is the same size. This simplifies instruction decoding, speeding up the processor.

    5. Few Addressing Modes: RISC has fewer and simpler ways to specify where operands for instructions are located (e.g., registers or memory), making instruction decoding simpler and faster.

    6. Pipelining: RISC architectures are designed to support pipelining, where multiple instruction stages (fetch, decode, execute, etc.) can be processed simultaneously. This allows for greater throughput and faster execution.

    Advantages of RISC:

    • Faster Execution: The simplicity of the instructions allows for faster execution, as each instruction can be processed in one clock cycle (depending on the CPU).
    • Efficient Pipelining: Since RISC instructions are uniform in length and simple, they are well-suited for pipelining, allowing multiple instructions to be processed simultaneously.
    • Easier Optimization: A simpler instruction set makes it easier to optimize the hardware, leading to higher performance per clock cycle.

    Disadvantages of RISC:

    • More Instructions for Complex Tasks: Since RISC instructions are simpler, it may take more instructions to complete a complex operation that could be handled by a single instruction in a CISC machine.
    • Requires More Registers: Because memory access is slower than register access, RISC machines require more registers, which can increase hardware complexity.

    Examples of RISC Architectures:

    • ARM: Used in many mobile and embedded devices.
    • MIPS: Often used in academic environments and embedded systems.
    • SPARC: A RISC architecture used in some high-performance servers.

    2. CISC (Complex Instruction Set Computing)

    Definition:

    • CISC is an architecture that uses a large, complex set of instructions. The idea behind CISC is that each instruction is designed to do as much work as possible in a single instruction, reducing the number of instructions per program and simplifying the task of writing code.

    Key Characteristics of CISC:

    1. Complex Instructions: CISC processors have a wide variety of instructions that can perform multi-step operations with a single instruction. Some CISC instructions perform several tasks, like loading data from memory, performing an operation on it, and storing it back, all in one step.

    2. Smaller Number of Registers: Since CISC processors can perform more work in a single instruction, they often have fewer general-purpose registers than RISC processors. More operations can be handled in memory.

    3. Variable-Length Instructions: CISC instructions can vary in length, meaning some instructions are very short, while others are quite long, depending on the complexity of the operation. This can lead to more efficient use of memory but makes instruction decoding more complex.

    4. Memory-to-Memory Operations: CISC allows instructions to operate directly on memory without having to load data into registers first. This is different from the RISC load/store architecture, where data must first be loaded into registers before being operated on.

    5. Multiple Addressing Modes: CISC processors support a wide variety of addressing modes, allowing more flexibility in how memory operands are accessed. This helps in performing more complex operations directly with memory.

    6. Microcode: CISC processors often use microcode to implement complex instructions. Microcode is a layer of low-level control instructions that help manage how high-level instructions are executed in hardware.

    Advantages of CISC:

    • Fewer Instructions: Since each instruction can perform multiple operations, fewer instructions are typically required to complete a task. This can reduce program size and the amount of memory required.
    • Simpler Assembly Code: CISC instructions are more complex, but because they can perform multiple operations at once, the assembly code tends to be simpler and shorter, which can be an advantage in terms of development time.
    • Better for Memory-Constrained Systems: CISC architectures can be more memory-efficient for certain types of programs because fewer instructions are needed, meaning less code needs to be loaded into memory.

    Disadvantages of CISC:

    • Slower Execution: Complex instructions may take more than one clock cycle to execute, potentially slowing down execution compared to RISC, where instructions are simpler and typically execute in a single clock cycle.
    • Harder to Pipeline: The variability in instruction length and complexity makes it harder to optimize and pipeline CISC architectures for high throughput. This can limit performance compared to RISC architectures, which are better suited for pipelining.
    • Instruction Decoding Complexity: The variety in instruction formats requires more complex decoders, which can add overhead and reduce overall performance.

    Examples of CISC Architectures:

    • x86: This is the most widely used CISC architecture, commonly found in personal computers and servers.
    • VAX: A CISC architecture developed by Digital Equipment Corporation (DEC), popular in the 1980s and 1990s.

    Comparison: RISC vs. CISC

    Feature RISC (Reduced Instruction Set Computing) CISC (Complex Instruction Set Computing)
    Instruction Set Small, simple, fixed-length instructions Large, complex, variable-length instructions
    Execution Time Typically one clock cycle per instruction Instructions may take multiple clock cycles
    Memory Access Load/store architecture (only load/store instructions access memory) Memory-to-memory operations are allowed
    Registers More general-purpose registers Fewer general-purpose registers
    Instruction Complexity Simple, one operation per instruction Complex, multiple operations per instruction
    Pipelining Easier to pipeline due to uniform instruction format Difficult to pipeline due to variable instruction length
    Code Size Larger programs due to more instructions per task Smaller programs due to fewer instructions per task
    Program Speed Faster execution for simpler programs, optimized for pipelining Slower due to more complex instruction execution
    Hardware Complexity Simpler hardware design, optimized for performance More complex hardware design to support varied instructions
    Example Architectures ARM, MIPS, SPARC x86, VAX, Motorola 68k

    Conclusion

    • RISC is a philosophy that emphasizes a small, efficient set of simple instructions, which leads to a streamlined design and better performance for certain types of programs, especially those that require high-performance pipelining.
    • CISC aims to reduce the number of instructions per program by making each instruction more powerful, allowing for complex operations with fewer instructions. However, the trade-off is often more complex hardware and potentially slower execution for individual instructions.

    Both architectures have their strengths and weaknesses, and many modern processors (like Intel's x86-64 and ARM processors) combine elements of both RISC and CISC to try to get the best of both worlds, depending on the application needs.

    Previous topic 13
    Programmer's View of a Computer System
    Next topic 15
    Physical Address Calculation

    Past Papers

    Open this section to load past papers

    Click on Show Past Papers to see past papers.
    On This Page
      Reading Stats
      Est. reading time7 min
      Word count1,237
      Code examples0
      DifficultyIntermediate