A computer system is organized into several key components that work together to perform operations, following the Von Neumann architecture, which includes:
Central Processing Unit (CPU): The brain of the computer responsible for executing instructions, encompassing:
Arithmetic Logic Unit (ALU): Handles arithmetic operations (addition, subtraction, etc.) and logical operations (AND, OR, etc.). It directly interacts with data fetched from registers or memory.
Control Unit (CU): Directs and coordinates activities within the computer, decoding instructions fetched from memory and sending control signals to other components, ensuring proper sequence in instruction execution.
Registers: Small, fast storage locations within the CPU for temporary data storage of instructions or intermediate results. Common types include the Accumulator (ACC), Instruction Register (IR), and Program Counter (PC).
Memory is critical for storing data and instructions essential for CPU operation:
Primary Memory (RAM): Volatile memory used for temporary storage while tasks are active, losing content once power is cut.
Secondary Memory: Non-volatile storage like HDDs and SSDs used for long-term data retention.
Cache Memory: Located near or within the CPU, it provides faster access to frequently utilized data.
I/O devices facilitate interaction between users and computer systems:
Input Devices: Include devices like keyboards and mice that input data into the computer.
Output Devices: Include monitors and printers that display computed results. I/O devices communicate with the CPU using controllers and buses.
The communication among components occurs via buses:
Data Bus: Carries actual data between CPU, memory, and I/O.
Address Bus: Transfers memory addresses for data storage.
Control Bus: Sends control signals from the Control Unit to system parts.
Interaction Flow: This includes four key steps:
Fetch: CPU retrieves instructions from memory using the address in the Program Counter.
Decode: CU interprets the fetched instruction.
Execute: The ALU or other components perform the indicated operation.
I/O: Data transfer to or from I/O devices.
Memory hierarchy optimizes performance based on speed, cost, and capacity, depicted generally as a pyramid:
Location: Inside the CPU.
Speed: Fastest memory.
Capacity: Minimal, storing immediate values like intermediate results.
Cost: Extremely high per byte.
Location: Between the CPU and main memory.
Speed: Faster than RAM but slower than registers.
Capacity: Small, often a few MB.
Purpose: Stores frequently needed data to reduce waiting time.
Types: L1 (fastest), L2 and L3 (larger and slower).
Location: On the motherboard, accessible by CPU.
Speed: Slower than cache but faster than secondary storage.
Capacity: Moderate (e.g., 8GB - 64GB).
Purpose: Temporarily holds currently used data and instructions.
Location: Attached internally or externally.
Speed: Slower than main memory.
Capacity: Very large (100s of GB to TB).
Purpose: Long-term storage, retaining data even after the power is off.
Location: External devices/cloud.
Speed: Slowest in the hierarchy.
Capacity: Extremely large.
Purpose: Archiving data that is infrequently accessed.
Virtual memory utilizes secondary storage as an extension of RAM, enabling the execution of large applications or multitasking through the following methods:
Paging: Dividing memory into pages.
Page Replacement: Swapping data between RAM and storage if needed.
Address Translation: Mapping between virtual and physical addresses using a Memory Management Unit (MMU).
Registers are integral for temporary data holding during CPU processing. They allow rapid access and operational efficiency as they reduce the need to fetch data from slower memory types:
General-Purpose Registers: Versatile for various tasks (e.g., holding operands, temporary results).
Special-Purpose Registers: Focused functions (Instruction Register, Program Counter, Memory Address Register, etc.).
Cache memory functions as a high-speed intermediary between the CPU and main memory, enhancing CPU performance by storing frequently accessed data, facilitating quick retrieval of data through a multi-level organization (L1, L2, L3).
RAM (Random Access Memory) is vital for fast computer operations, temporarily storing data and instructions.
Features: Volatile, size affecting performance and multitasking capabilities. Types include DRAM (e.g., DDR) and SRAM.
Virtual Memory expands the usable memory of a computer beyond physical RAM, enabling improved multitasking and isolation of processes, although accessing this memory can be slower than physical RAM.
The motherboard acts as a hub connecting all computer components, managing functionalities like hardware initialization, power distribution, and component communication. Key components include the CPU socket, RAM slots, chipset, storage connectors, and various ports for external devices.
I/O communication embodies methods for data exchange between computers and external devices, crucial for efficient functioning. Device management regulates this process, ensuring optimal interaction without conflicts. I/O ports and device controllers play a critical role in communications and data handling.
Understanding numeric storage in computers involves recognizing binary equivalents, the notion of signed integers, and methods for representation (e.g., BCD). Concepts like sign-and-magnitude and 2’s complement representation offer insight into how computers process negative numbers.
These bases represent numeral systems critical for performing computations and data encoding in various forms.
The characters utilized (including numbers and symbols) are encoded using standards like ASCII, EBCDIC, and Unicode, with the latter gradually replacing older systems due to its extensive global character support.