Study Material
Semester-03
LDCO
Unit-04

Unit 4: Computer Organization & Processor

1. Computer Organization and Architecture

Overview

Computer Organization refers to the operational structure of a computer system, including the hardware and how the hardware components interact. On the other hand, Computer Architecture refers to the design principles and the functionality of the system, focusing more on how data flows through the hardware and how a computer's performance is optimized.

Computer systems consist of various units that work together to execute instructions, process data, and manage storage and input/output operations.

Functions and Types of Computer Units

CPU (Central Processing Unit)

The CPU is often referred to as the brain of the computer, as it executes instructions and processes data. It consists of several components that work together to perform these functions.

  • Typical Organization: The CPU is structured into key units such as the Control Unit (CU), Arithmetic Logic Unit (ALU), and various registers.
  • Functions: Executes instructions, manages data, and controls peripheral devices through input/output (I/O) operations.
  • Types of CPUs: CPUs vary based on their architecture (RISC vs CISC), core count (single-core, dual-core, multi-core), and performance characteristics.

Memory

Memory is the storage area used by the CPU to store data and instructions. Memory in a computer can be categorized as:

  • Primary Memory: This includes RAM (volatile, used for temporary data storage) and ROM (non-volatile, stores essential system instructions).
  • Secondary Memory: Non-volatile storage like hard drives, SSDs, and optical disks used for long-term data storage.

Input/Output (I/O)

I/O devices allow a computer system to interact with the outside world by receiving inputs and sending outputs. These devices include keyboards, mice, printers, and external drives.

  • Functions: Facilitates user interaction, data entry, and data retrieval from peripherals.
  • Types: Devices can be classified as input devices (e.g., keyboards), output devices (e.g., monitors), and input/output devices (e.g., storage devices).

System Bus

The system bus is the communication pathway between the CPU, memory, and I/O devices. It consists of three main types:

  • Address Bus: Carries the address of data or instructions.
  • Data Bus: Carries the actual data being processed.
  • Control Bus: Sends control signals to coordinate the actions of the computer components.

The bus ensures efficient communication and synchronization across the system. Advanced systems may feature multiple-bus hierarchies to manage data flows more effectively.


2. Von Neumann & Harvard Architecture

Von Neumann Architecture

In the Von Neumann Architecture, the computer system uses a single memory for both data and instructions. This means that the program data and executable instructions are stored in the same memory space, accessed by the CPU via a single bus.

  • Features:
    • A single memory space for data and instructions.
    • Sequential execution of instructions.
    • Simplified design, but limited by the Von Neumann bottleneck, where the CPU spends time waiting for data and instructions to be transferred on the same bus.

Harvard Architecture

In the Harvard Architecture, there are separate memories for data and instructions, allowing the CPU to access both simultaneously. This parallelism improves efficiency and overall system performance.

  • Features:
    • Separate memory and buses for data and instructions.
    • Faster execution due to parallel access.
    • More complex architecture compared to Von Neumann.

3. Instruction Cycle

The instruction cycle refers to the steps the CPU takes to execute an instruction. Every program is made up of instructions, and the CPU continuously cycles through these steps to execute them. The instruction cycle includes the following phases:

  1. Fetch: The CPU retrieves an instruction from memory.
  2. Decode: The CPU decodes the fetched instruction to understand what needs to be done.
  3. Execute: The decoded instruction is executed by performing the required operations, such as arithmetic calculations or data transfer.
  4. Store: The result of the operation is stored in memory or a register.

4. Processor and Single Bus Organization

CPU Architecture

The CPU is organized in various ways to efficiently execute instructions and process data. A common approach is the single bus organization, where all components (ALU, registers, memory) communicate over a single bus. This design reduces hardware complexity but may limit performance.

ALU (Arithmetic Logic Unit)

The Arithmetic Logic Unit (ALU) is the part of the CPU responsible for performing mathematical and logical operations.

  • ALU Signals: Control signals instruct the ALU on which operation to perform (addition, subtraction, logical AND, OR, etc.).
  • Functions: Performs arithmetic operations (addition, subtraction), logical operations (AND, OR, NOT), and comparison tasks.
  • Types of ALUs: There are basic ALUs that perform simple operations, and more complex ones that support advanced arithmetic like division and floating-point calculations.

Registers and Types

Registers are small, fast storage locations within the CPU used to temporarily hold data and instructions during processing. There are various types of registers in a CPU:

  • General Purpose Registers (GPRs): Used for temporary data storage during instruction execution.
  • Address Registers: Hold memory addresses for data access (e.g., the Program Counter (PC) which holds the address of the next instruction).
  • Data Registers: Store the actual data being processed (e.g., Memory Buffer Register (MBR)).
  • Control and Status Registers: These include registers like the Instruction Register (IR) (which holds the current instruction being executed) and Flag Registers (which store the results of logical or arithmetic operations).

Control Unit (CU)

The Control Unit (CU) is responsible for directing the operations of the CPU by generating control signals. These signals dictate the flow of data within the CPU and between the CPU, memory, and I/O devices.

  • Hard-Wired Control Unit: Uses fixed logic circuits to generate control signals. It is fast but inflexible.
  • Microprogrammed Control Unit: Uses a sequence of microinstructions stored in memory to generate control signals, allowing for more flexibility in instruction execution.

5. Micro-Operations and Control Signals

Types of Micro-Operations

A micro-operation is a low-level operation that is part of the execution of an instruction. These operations are broken down into smaller steps for efficient execution by the CPU. The four primary micro-operations in a processor are:

  1. Fetch: Retrieves an instruction from memory.
  2. Indirect: Accesses memory for additional data if the instruction involves indirect addressing.
  3. Execute: Performs the actual operation, such as arithmetic or data transfer.
  4. Interrupt: Handles any interrupt signals that may require immediate attention from the CPU.

Control Signals for Micro-Operations

Control signals are critical for guiding micro-operations. These signals direct the movement of data and the execution of operations at a low level within the CPU. The control unit generates these signals based on the current instruction being processed.

  • Fetch Operation: Control signals are sent to retrieve the next instruction from memory.
  • Execute Operation: The ALU and registers receive control signals to perform the necessary operations and store results.

Conclusion

Understanding computer organization and processor design is essential for developing efficient and high-performing systems. From the basic architecture of the CPU, ALU, and registers to the more complex control unit and instruction cycle, each component plays a critical role in the overall functionality of the computer. Mastering these concepts enables deeper insights into how computers process data and execute programs, ensuring efficient system design and optimization.