Skip to main content

Computer Organization Notes.

By · · 3 min read

Computer Organization Notes

Download Assignment 1

Download Assignment 2

Download Assignment 3

Download unit 1

Download unit 2

Download unit 3-5

Introduction

Above documents provides detailed yet simple explanations of key concepts in Computer Organization, including memory management, CPU architecture, and instruction sets.
For a quick explantion of the key concepts, refer to the following details:


1. Computer Components

A computer has several important components that work together:

1.1 Input Unit

  • Allows users to enter data into the computer.
  • Examples: Keyboard, Mouse, Scanner.

1.2 Central Processing Unit (CPU)

  • Also known as the brain of the computer.
  • Performs all processing tasks.
  • Has three main parts:
    • Arithmetic Logic Unit (ALU): Performs calculations and logical operations.
    • Memory Unit: Stores data and instructions.
    • Control Unit: Manages and controls all operations.

1.3 Output Unit

  • Displays processed information to the user.
  • Examples: Monitor, Printer, Speakers.

2. Memory Organization

2.1 Types of Memory

  1. Primary Memory (RAM & ROM)
    • RAM (Random Access Memory): Temporary memory, loses data when power is off.
    • ROM (Read-Only Memory): Permanent memory, stores firmware.
  2. Cache Memory
    • Small, high-speed memory between CPU and RAM.
    • Stores frequently accessed data for quick retrieval.
  3. Virtual Memory
    • Uses part of the hard disk as additional RAM when required.

2.2 Cache Memory Mapping

  • Direct Mapping: Each memory block maps to a fixed cache line.
  • Associative Mapping: Any memory block can be stored in any cache line.
  • Set-Associative Mapping: Combines direct and associative mapping.

3. Instruction Set Architecture

3.1 Instruction Formats

  • Instructions tell the CPU what to do.
  • Instruction format consists of Opcode (operation code) and Operands (data or address).

3.2 Addressing Modes

  • Determines how the CPU accesses operands.
  1. Immediate Addressing: The operand is in the instruction itself.
  2. Direct Addressing: The address of the operand is given directly.
  3. Indirect Addressing: The address field contains the address of the actual operand.
  4. Register Addressing: The operand is in a CPU register.

4. CPU Organization

4.1 Types of CPU Organizations

  1. Single Accumulator Organization: Uses one register (Accumulator) for all calculations.
  2. General Register Organization: Uses multiple registers for faster execution.
  3. Stack Organization: Uses a stack to store operands and perform operations.

4.2 Types of Instructions

  1. Zero Address Instructions (Stack-based operations, e.g., PUSH, POP)
  2. One Address Instructions (Uses one operand, e.g., ADD X)
  3. Two Address Instructions (Uses two operands, e.g., MOV A, B)
  4. Three Address Instructions (Uses three operands, e.g., ADD A, B, C)

5. Pipelining in CPU

5.1 What is Pipelining?

  • A technique to improve CPU performance by executing multiple instructions in different stages simultaneously.

5.2 Stages of Pipelining

  1. Fetch: Get the instruction from memory.
  2. Decode: Understand what the instruction means.
  3. Execute: Perform the operation.
  4. Memory Access: Read or write data (if required).
  5. Write Back: Store the result back into a register.

6. RISC vs CISC Processors

6.1 RISC (Reduced Instruction Set Computer)

  • Uses simple, fixed-size instructions.
  • Executes instructions faster.
  • Requires more instructions for complex tasks.
  • Example: ARM processors.

6.2 CISC (Complex Instruction Set Computer)

  • Uses complex, variable-size instructions.
  • Fewer instructions required for complex tasks.
  • Slower execution per instruction.
  • Example: Intel x86 processors.

7. Input-Output Organization

7.1 I/O Methods

  1. Programmed I/O: CPU directly controls data transfer.
  2. Interrupt-Driven I/O: CPU is notified only when data is ready.
  3. Direct Memory Access (DMA): Transfers data without CPU involvement.

8. Memory Hierarchy

Memory is arranged in different levels based on speed and cost:

Level Speed Cost Example
Registers Fastest High CPU registers
Cache Very Fast High L1, L2, L3 Cache
RAM Fast Medium DDR4, DDR5 RAM
Hard Disk Slow Low HDD, SSD

9. Summary

  • The CPU is the brain of the computer, controlling all processes.
  • Memory organization involves cache, RAM, ROM, and virtual memory.
  • Instruction sets and addressing modes determine how the CPU processes data.
  • Pipelining and CPU architectures (RISC & CISC) affect processing speed.
  • I/O operations help computers interact with external devices.
  • Memory hierarchy ensures efficient data storage and retrieval.

These fundamental concepts are key to understanding Computer Organization and how a computer functions at a low level.