Understanding Computer Systems
Hardware and Software Fundamentals
Introduction
Computer systems consist of two main components: hardware and software. Hardware refers to the physical elements of a computer, while software comprises the instructions and data that control the hardware.
Software
Software can be categorized into:
- Application Software: Programs designed for specific tasks, such as word processing or gaming.
- System Software: Programs that manage and control the computer’s hardware, including the operating system (OS) and firmware.
- Firmware: Software embedded in hardware components, providing low-level control.
Hardware
The core hardware components include:
- Central Processing Unit (CPU): The “brain” of the computer, responsible for executing instructions. It consists of the arithmetic-logic unit (ALU) and the control unit (CU).
- Main Memory (RAM): Stores data and instructions currently being used by the CPU.
- Controllers: Manage data flow between the CPU and peripherals.
- Buses: Communication pathways between different hardware components.
- Peripherals: Input and output devices, such as keyboards, mice, and monitors.
CPU Components
- Instruction Register: Holds the current instruction being executed.
- Program Counter: Stores the memory address of the next instruction.
- Control Unit and Decoder: Interprets instructions.
- Sequencer: Generates signals to control the execution of instructions.
- Clock: Provides timing signals.
- ALU: Performs arithmetic and logical operations.
- Registers: Hold data used in operations.
- Accumulator: Stores the results of operations.
- Status Register: Records the conditions of previous operations.
Memory
External Memory
- Hard Disk Drives (HDD)
- Floppy Disks
- DAT Tapes
- Pen Drives
Internal Memory
- RAM (Random Access Memory): Stores and modifies data; the main memory.
- ROM (Read-Only Memory): Contains permanent instructions, primarily for booting the computer.
RAM Details
- Address Register: Holds the memory address being accessed.
- Exchange Register: Buffers data during read and write operations.
- Memory Selector: Connects the specified memory cell to the exchange register.
- Control Signals: Indicate read or write operations.
RAM is composed of flip-flops (electronic switches) that store bits of information. Data is typically organized into bytes (8 bits). DRAM (Dynamic RAM) is slower but cheaper than SRAM (Static RAM). SRAM is often used for cache memory due to its speed.
ROM Details
ROM contains the BIOS (Basic Input/Output System). EPROM (Erasable Programmable ROM) allows for firmware updates. CMOS (Complementary Metal-Oxide-Semiconductor) memory stores BIOS settings. VRAM (Video RAM) is used for video processing.
Memory Addressing
- Conventional Memory: 0 to 640 KB
- Upper Memory: 641 KB to 1024 KB
- Extended Memory: 1025 KB to the motherboard’s limit
Addressing Modes
- Immediate Addressing: The operand is directly included in the instruction.
- Direct Addressing: The instruction contains the memory address of the operand.
- Indirect Addressing: The instruction contains the address of a memory location that holds the address of the operand.
- Relative Addressing: The operand’s address is calculated relative to the current instruction’s address.
Buses
Buses facilitate communication between the CPU, memory, and peripherals. The DMA (Direct Memory Access) controller allows peripherals to access memory directly, improving efficiency.