Computer Architecture: Functional Units and Memory Systems
Functional Units of a Computer
A computer system is logically divided into several functional units that work together to perform data processing. These units accept input, process the data, store information, and produce output.
Main Functional Units
1. Input Unit
- Accepts raw data and instructions from the user and enters them into the computer.
- Converts the input data into machine-readable form (binary) for processing.
Examples: Keyboard, Mouse, Scanner, Microphone.
2. Output Unit
- Displays the processed results to the user.
- Converts the machine results into human-readable form.
Examples: Monitor, Printer, Speakers.
3. Memory Unit
- Stores data, instructions, and intermediate results required for processing.
- Supplies data to the CPU whenever needed.
Types of Memory:
- Primary Memory: RAM, ROM, Cache
- Secondary Storage: Hard Disk, SSD, Pen Drive
4. Arithmetic Logic Unit (ALU)
- Performs all arithmetic and logical operations.
Arithmetic Operations: Addition, Subtraction, Multiplication, Division.
Logical Operations: AND, OR, NOT, Comparison (>, <, =).
- Works under the direction of the Control Unit and uses data from memory or registers.
5. Control Unit (CU)
- Controls and coordinates the operations of all computer units.
- Fetches instructions from memory, decodes them, and generates control signals.
Functions:
- Controls the execution of instructions.
- Directs data flow between input, memory, ALU, and output.
Von Neumann Architecture
- Stores program instructions and data in the same memory.
- Uses one common bus for both instructions and data.
- CPU reads instructions and data one at a time, causing the Von Neumann Bottleneck.
- Simple, cheaper, and easier to design.
Advantages: Simple hardware, low cost, and flexible.
Disadvantage: Slower due to shared bus; only one operation at a time.
Harvard Architecture
- Stores program instructions and data in separate memories.
- Uses two separate buses (instruction bus + data bus).
- CPU can access instruction and data simultaneously, increasing speed.
Advantages: Parallel access, faster performance, no memory conflict.
Disadvantage: More complex and costly.
| Feature | Von Neumann | Harvard |
|---|---|---|
| Memory | One memory for code & data | Separate code & data memory |
| Bus | Single bus | Two independent buses |
| Speed | Slow | Faster |
| Cost | Low | High |
| Use | PCs, laptops | Microcontrollers, DSPs |
Bus Structure
A bus is a communication pathway that transfers data between computer components.
Types of Buses
- Data Bus: Carries actual data between CPU, memory, and I/O (bi-directional).
- Address Bus: Carries the address of memory locations (uni-directional).
- Control Bus: Carries control signals from the CPU (e.g., Read, Write, Interrupt).
Memory Types and Uses
Primary Memory
- RAM: Temporary, volatile memory for running programs.
- ROM: Permanent, non-volatile memory for firmware/BIOS.
- Cache Memory: High-speed memory inside the CPU for fast access.
Secondary and Virtual Memory
- Secondary Memory: Used for permanent storage (Hard Disk, SSD, etc.).
- Virtual Memory: Technique where part of the hard disk acts as RAM to run large programs.
Data Representation
Computers represent data in binary (0 & 1).
Number Systems
- Binary (Base 2), Octal (Base 8), Decimal (Base 10), Hexadecimal (Base 16).
Number and Character Representation
- Number Representation: Unsigned binary, signed magnitude, 1’s complement, and 2’s complement.
- Character Representation: ASCII (7 or 8-bit) and Unicode (16-bit).
- Floating-Point: Used for real numbers based on the IEEE 754 standard.
English with a size of 659.68 KB