Unit 3: Computer Hardware
I. Orientation — The Physical Foundation of Computing
Computer hardware is the collection of physical, electronic, and mechanical components that make up a computer system. Hardware operates under the input–process–output–storage model: data enters through input devices, processors manipulate it according to instructions, output devices present the results, and memory devices retain instructions and data.
- Physical nature: Hardware includes tangible components such as the motherboard, processor, keyboard, monitor, memory modules, and storage drives.
- Binary operation: Digital hardware represents data using bits, whose two states are written as
0and1; eight bits normally form one byte. - Instruction execution: A processor repeatedly fetches, decodes, and executes machine instructions stored in memory.
- Interconnection: Components communicate through electrical pathways called buses:
- Data bus: Transfers instructions and data.
- Address bus: Identifies a memory location or device.
- Control bus: Carries signals such as read, write, and interrupt commands.
- System coordination: The motherboard connects the CPU, memory, storage, expansion cards, and peripheral interfaces.
- Performance factors: Hardware performance depends on processor architecture, clock rate, core count, memory capacity, data-transfer rate, and storage speed.
- Units of measurement:
- Capacity is measured in bytes:
KB,MB,GB, andTB. - Processor frequency is measured in hertz, commonly
GHz. - Transfer speed may be measured in bits per second or bytes per second.
- Capacity is measured in bytes:
- Hardware–software relationship: Software supplies instructions, while hardware performs the physical operations required to execute them.
II. Processing Hardware — Executing Instructions and Calculations
Processing hardware transforms input data into useful information by carrying out arithmetic, logical, control, and graphical operations.
A. CPU and GPU
The CPU is a general-purpose processor responsible for controlling program execution, whereas the GPU is a specialized processor designed to perform many similar calculations in parallel.
-
Central Processing Unit (CPU)
- Primary purpose: The CPU executes operating-system and application instructions, coordinates other components, and handles tasks requiring flexible decision-making.
- Control Unit (CU): The CU directs the fetch–decode–execute cycle and sends control signals to memory, registers, and input/output devices.
- Arithmetic Logic Unit (ALU): The ALU performs operations such as addition, subtraction, comparison, and Boolean logic, including
AND,OR, andNOT. - Registers: Registers are extremely fast storage locations inside the CPU.
- Program Counter (PC): Holds the address of the next instruction.
- Instruction Register (IR): Holds the instruction currently being decoded or executed.
- General-purpose registers: Temporarily hold operands and intermediate results.
- Cache memory: CPU caches retain frequently needed instructions and data closer to the processing cores.
L1is usually the smallest and fastest cache.L2is larger but generally slower thanL1.L3is larger again and is often shared among several cores.
- Clock rate: A
3.5 GHzclock produces approximately 3.5 billion clock cycles per second, although one cycle does not necessarily equal one completed instruction. - Cores and threads: A multicore CPU contains multiple processing cores; simultaneous multithreading may allow one core to manage more than one instruction stream.
- Instruction cycle:
- Fetch: Obtain an instruction from memory.
- Decode: Determine the required operation and operands.
- Execute: Perform the operation.
- Store: Save the result in a register or memory.
- CPU suitability: CPUs are effective for operating-system control, branching logic, word processing, database transactions, and other sequential or mixed workloads.
-
Graphics Processing Unit (GPU)
- Primary purpose: The GPU rapidly processes graphics and other workloads that can be divided into many similar operations.
- Parallel design: A GPU contains many smaller processing units capable of working on numerous data elements simultaneously.
- Graphics pipeline: GPUs calculate vertex positions, textures, lighting, and pixel colours when rendering two-dimensional or three-dimensional images.
- General-purpose computing: Modern GPUs also accelerate machine learning, scientific simulations, image processing, and video encoding.
- Memory: A dedicated graphics card normally uses high-bandwidth video memory, or VRAM, to store textures, frame buffers, and working data.
- GPU suitability: GPUs perform well when the same calculation must be applied to a large dataset, such as adjusting every pixel in an image.
- Explicit contrast: A CPU has relatively few powerful, versatile cores optimized for low-latency control and varied instructions; a GPU has many simpler processing units optimized for high-throughput parallel work.
- Performance limitation: Clock rate alone cannot fairly compare different processors because architecture, core efficiency, cache, memory bandwidth, software, and thermal limits also affect performance.
- Integrated and discrete graphics:
- Integrated GPU: Built into the processor package and usually shares system RAM.
- Discrete GPU: A separate component with dedicated processing hardware and usually its own VRAM.
B. Applications and Limitations
Processor choice must match the structure of the workload rather than relying on a single specification.
- Balanced systems: A powerful processor may remain underused if insufficient RAM or slow storage prevents data from reaching it quickly.
- Thermal design: CPUs and GPUs generate heat and require heat sinks, fans, or liquid-cooling systems to remain within safe operating temperatures.
- Power consumption: Higher-performance processors generally require stronger power supplies and consume more electrical energy.
- Parallelism limit: A workload gains little from a GPU when operations must occur strictly in sequence or involve frequent unpredictable branches.
- Compatibility: A CPU must match the motherboard socket and chipset; a discrete GPU requires a compatible expansion slot, physical space, power connections, and software drivers.
- Specialization: Neither processor universally replaces the other—the CPU directs general computation, while the GPU accelerates suitable parallel operations.
III. Peripheral Hardware — Communication Between Users and Computers
Peripheral devices allow a computer to receive data from its environment and communicate processed information back to users or other systems.
A. Input Devices and Output Devices
Input devices convert actions or physical signals into computer-readable data, while output devices convert processed digital data into a form people or other equipment can use.
-
Input Devices
- Keyboard: Converts keystrokes into scan codes used to enter text, numbers, and commands.
- Mouse and touchpad: Detect movement and button actions to control an on-screen pointer.
- Touchscreen input: Detects contact or gestures through technologies such as capacitive sensing; because it also displays information, a touchscreen is both an input and output device.
- Scanner: Captures printed images or documents as digital image data; optical character recognition can convert a scanned picture of text into editable characters.
- Microphone: Converts sound waves into electrical signals, which an analogue-to-digital converter samples to create digital audio.
- Digital camera: Uses an image sensor to convert light into digital photographs or video frames.
- Barcode and QR-code reader: Interprets machine-readable patterns used for product identification, inventory, payments, or web links.
- Biometric device: Measures characteristics such as fingerprints, facial features, or iris patterns for identification.
- Sensors: Measure environmental properties such as temperature, pressure, motion, or light in monitoring and control systems.
-
Output Devices
- Monitor: Displays text, graphics, and video as pixels; important specifications include resolution, refresh rate in hertz, size, and colour accuracy.
- Printer: Produces hard copy on paper or other material.
- Inkjet printer: Sprays small ink droplets and is commonly used for colour images.
- Laser printer: Uses toner and an electrostatic imaging process, often providing rapid document printing.
- Speakers and headphones: Convert electrical audio signals into sound waves; a digital-to-analogue converter prepares digital audio for reproduction.
- Projector: Enlarges visual output onto a screen or wall for presentations, classrooms, and cinemas.
- Actuator: Converts a control signal into physical action, such as turning a motor, opening a valve, or moving a robotic arm.
- Haptic device: Produces vibration, force, or motion as tactile feedback, as in a game controller.
- Measurement criteria:
- Input accuracy: Describes how correctly a device captures the original action or signal.
- Latency: The delay between input and the corresponding system response, commonly measured in milliseconds.
- Resolution: Indicates detail, such as
1920 × 1080pixels on a display or dots per inch for printing.
- Accessibility: Alternative keyboards, screen readers, refreshable Braille displays, voice-input systems, and switch controls make computing usable by people with different needs.
- Device drivers: Drivers translate operating-system requests into commands understood by a particular peripheral.
- Limitations: Input can be affected by user error, noise, poor calibration, or damaged sensors; output quality is limited by device resolution, accuracy, speed, and physical medium.
IV. Memory and Storage Hardware — Retaining Data and Instructions
Memory hardware preserves the instructions and information required before, during, or after processing.
A. Memory devices
Memory devices differ in capacity, speed, cost, volatility, and intended duration of data retention.
- Memory hierarchy: Faster memory is generally smaller and more expensive per byte, while slower memory provides greater capacity at lower cost.
Registers → Cache → RAM → Secondary storage → Archival storage
Fastest/smallest Slowest/largest- Random Access Memory (RAM): RAM temporarily stores active programs, instructions, and data so that the CPU can access them quickly.
- Volatility: RAM normally loses its contents when power is removed.
- DRAM: Dynamic RAM stores bits in cells that require repeated refreshing and is commonly used as main system memory.
- SRAM: Static RAM is faster and more expensive and is commonly used in processor caches.
- Capacity effect: Insufficient RAM forces the operating system to use slower storage as virtual memory.
- Read-Only Memory (ROM): ROM is non-volatile memory used for instructions that must remain available after shutdown, such as firmware needed during startup.
- Flash memory: Flash retains data without power and can be electrically erased and rewritten; it is used in solid-state drives, USB drives, memory cards, and firmware storage.
- Hard Disk Drive (HDD): An HDD stores data magnetically on rotating platters and uses a moving read/write head.
- Strength: Offers high capacity at relatively low cost.
- Limitation: Mechanical movement makes it slower and more vulnerable to shock than solid-state storage.
- Solid-State Drive (SSD): An SSD uses flash memory and has no moving mechanical parts.
- Strength: Provides fast access, silent operation, and good resistance to physical movement.
- Limitation: Flash cells tolerate a finite number of write cycles, although controllers use wear-leveling to extend service life.
- Optical storage: CDs, DVDs, and Blu-ray discs use laser-readable marks; they are removable but generally slower and lower-capacity than modern drives.
- Magnetic tape: Tape stores data sequentially and is economical for high-capacity backups and long-term archives, but locating individual files is slow.
- Capacity units:
1 byte = 8 bits
1 KiB = 1,024 bytes
1 MiB = 1,024 KiB
1 GiB = 1,024 MiB- Worked capacity example: A
4 GiBmemory device contains4 × 1,024³ = 4,294,967,296bytes, whereGiBmeans gibibytes. - Primary versus secondary memory:
- Primary memory: Registers, cache, RAM, and ROM are directly involved in processing and system operation.
- Secondary memory: SSDs, HDDs, optical discs, and tapes provide longer-term storage with greater capacity but slower access.
- Reliability and protection: Backups, redundancy, error-detecting mechanisms, encryption, and safe handling reduce the risk of data loss; storage capacity alone does not guarantee data security.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →