Overview
This chapter introduces the basic concept of a computer system: an integrated set of hardware, software, data and users that accepts input, processes it and produces output. It explains core hardware components (CPU, memory, storage, input/output devices), the role and types of software (system software such as operating systems and utility programs, and application software), and the fundamental ideas of how computers represent and store data. The chapter highlights key services provided by operating systems (process management, memory management, file systems, device management, security) and gives an introductory view of programming languages, number systems and units of storage. Understanding these foundations is important for building computer literacy, troubleshooting simple problems, appreciating how software and hardware interact, and preparing for programming and higher-level topics in Informatics Practices.
Learning Objectives
- Define the term 'computer system' and list its main characteristics
- Explain the difference between hardware and software with suitable examples
- Classify computers by size and purpose (micro, mini, mainframe, supercomputer) and give typical uses
- Differentiate between primary (RAM, ROM) and secondary memory (HDD, SSD, optical) with respect to speed, volatility and capacity
- Describe the architecture and functions of the CPU, including ALU, control unit and registers
- Identify common input, output and storage devices and state their typical applications
- Explain the role and key functions of an operating system (process management, memory management, file management and I/O control)
- Illustrate the booting process (cold and warm boot) and explain the role of BIOS/firmware
Topics in this chapter
16 topics · tap a topic title to jump straight to it.
Overview of Computer Systems
Overview of Computer Systems
Key Point: CPU execution time = (Instruction count × CPI) / Clock frequency
What is a computer system? A computer system is an integrated set of hardware and software that accepts data (input), processes it to produce useful information (output), and stores results for future use. It performs automated, high‑speed, and accurate computations and information processing.
Main components
- Hardware – physical parts such as CPU (processor), memory, storage devices, and input/output devices.
- Software – programs and instructions. Two broad classes: system software (operating system, device drivers, utilities) and application software (word processors, browsers, accounting packages).
- Users – people who interact with the system to get tasks done.
Basic functional units (I‑P‑O‑S model)
- Input – devices that feed data (keyboard, mouse, scanner, sensors).
- Processing – CPU performs arithmetic/logic and controls operations (Control Unit, ALU, registers).
- Output – devices that present information (monitor, printer, actuators).
- Storage – primary (RAM, cache) and secondary (HDD, SSD, optical, cloud) memory for temporary and permanent data.
Von Neumann architecture & Fetch‑Decode‑Execute cycle
Most general‑purpose computers follow the Von Neumann model: a single memory holds both instructions and data. The CPU repeatedly executes the fetch‑decode‑execute cycle:
- Fetch – fetch instruction from memory into Instruction Register (IR).
- Decode – Control Unit decodes the instruction.
- Execute – ALU performs arithmetic/logic or a control action; results stored in registers or memory.
Types of computer systems
- Supercomputers – highest performance for scientific tasks.
- Mainframes – large organizations, transaction processing.
- Minicomputers / Servers – multi‑user services.
- Microcomputers / Personal computers – desktops, laptops.
- Embedded systems – dedicated devices (microwave, washing machine controllers, IoT devices).
Key characteristics: speed, accuracy, automation, storage capability, versatility, reliability.
System software vs Application software
- System software manages hardware and provides services (OS schedules tasks, manages memory, handles I/O).
- Application software performs user‑oriented tasks (document editing, web browsing, games).
Performance factors include clock speed, CPU architecture, number of cores, memory size & speed, cache, storage type (HDD vs SSD), and I/O bandwidth. Tradeoffs often exist between speed, cost, and storage capacity.
Security & networks (brief): Modern computer systems are often networked; security (authentication, authorization, encryption, backups) is essential to protect data and ensure reliable operation.
- ATM (Automated Teller Machine): Input (card, PIN), Processing (authenticate, update bank balance), Output (cash, receipt), Storage (bank database).
- Smartphone: Input (touch, camera), Processing (apps run on CPU), Output (display, speakers), Storage (internal flash + cloud).
- Traffic signal controller (embedded system): Sensors detect vehicles, processor decides light timing, actuators change signals.
- Online shopping website: Web server (hardware + system software) runs application software (shopping cart), database stores user/orders.
- School attendance system: Input (biometric or RFID), Processing (mark attendance), Output (reports), Storage (student records).
- \[CPU execution time = (Instruction count × CPI) / Clock frequency\]
- \[Equivalent form: CPU time = Instruction count × CPI × Clock cycle time (where Clock cycle time = 1 / Clock frequency)\]
- \[Data size conversions: 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB\]
- \[Throughput (basic) = Number of tasks completed / Time period\]
- \[Data transfer rate (bandwidth) = Amount of data transferred / Time (e.g.\]\[Mbps = megabits per second)\]
Characteristics of Computers
Characteristics of Computers
Key Point: CPU execution time (common form): Execution Time = (Instruction Count × CPI) / Clock Rate
Computers are electronic machines that accept data (input), process it according to programmed instructions, store results, and produce output. Their behaviour is defined by a set of characteristic properties that explain why they are widely used across science, business and everyday life.
- Speed: Computers perform millions to billions of operations per second. This allows rapid arithmetic and logical processing of large datasets.
- Accuracy: When given correct instructions and data, computers compute results without human error (subject to hardware/software bugs or input errors).
- Diligence: Computers do repetitive tasks tirelessly without loss of performance (no boredom or fatigue).
- Automation / Programmability: A computer executes instructions automatically. Changing behaviour is done by changing the program.
- Versatility: The same hardware can perform diverse tasks — word processing, web browsing, scientific simulation — by running different software.
- Storage capacity: Computers can store and retrieve huge amounts of data in memory and secondary storage.
- Reliability: Modern systems are designed for long continuous operation with error-checking, backups and redundancy to reduce failures.
- Electronic nature: Because they use electronic circuits, response times are extremely fast compared with mechanical systems.
- Determinism: Given the same program and inputs, a computer produces the same output (repeatability).
- Multitasking and parallelism: Computers can run multiple programs or use multiple processors/cores to handle tasks concurrently.
- Connectivity: Networking enables sharing resources and remote communication (internet, clouds), expanding capability beyond one machine.
- Limitations: Computers are not intelligent by themselves — they cannot think or create without human-provided algorithms and data. They require power, correct instructions, and may fail if hardware/software is faulty.
Understanding these characteristics helps explain where computers add value (speed, scale, repeatability) and where human judgment remains essential (creativity, ethics, contextual decisions).
- Speed — A spreadsheet recalculating thousands of formulas in seconds (e.g., tax computations for many records).
- Accuracy — ATM dispensing the exact amount when correct PIN and balance are provided; transaction logs are precise.
- Diligence — Automated data-entry systems process millions of transactions nightly without fatigue.
- Automation/Programmability — A factory PLC (programmable logic controller) runs the same assembly sequence 24/7 following programmed steps.
- Versatility — A laptop used for coding, video editing, gaming and video calls simply by switching applications.
- Storage capacity — Cloud services storing terabytes of user photos and backups accessible on demand.
- \[CPU execution time (common form): Execution Time = (Instruction Count × CPI) / Clock Rate\]
- \[Equivalent form: CPU Time = Instruction Count × CPI × Clock Cycle Time (Clock Cycle Time = 1 / Clock Rate)\]
- \[Throughput (simple): Throughput = Number of tasks completed / Total time\]
- \[Amdahl's Law (parallel speedup): Speedup = 1 / ((1 − p) + p / s) where p = fraction of program parallelizable\]\[s = speedup of parallel portion\]
- \[Data rate: Data Rate (bps) = bits transferred / time (seconds)\]
- \[Memory units: 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB (binary convention commonly used in computing)\]
Classification of Computers
Classification of Computers
Key Point: CPU time (Execution time) = (Instruction Count × CPI) / Clock Frequency, where CPI = cycles per instruction and Clock Frequency is in cycles/second (Hz).
Overview: Computers are classified to understand their size, power, purpose and mode of operation. Common classification schemes used in Class 11 Informatics Practices are by size/performance, by purpose, by type of data processed, by number of users and by mode of processing.
1. By Size and Performance
- Microcomputer (Personal Computer): Small, single-user machines such as desktops, laptops, tablets and smartphones. Used for word processing, web browsing, small-scale programming and personal use. Low cost, low power and low FLOPS compared to larger machines.
- Minicomputer (Midrange Servers): Mid-level machines used by small businesses or departments for moderate workloads, multi-user support and small databases. Often called servers in modern contexts.
- Mainframe: Large, powerful systems used by big organisations (banks, airlines, government) for transaction processing, large databases and critical multi-user tasks. High reliability and throughput.
- Supercomputer: Extremely powerful computers optimized for complex scientific calculations (weather forecasting, simulations, nuclear research, large-scale modeling). Highest FLOPS and cost.
2. By Purpose
- General-purpose computers: Designed to perform a wide range of tasks (e.g., PCs, servers).
- Special-purpose computers: Built for a specific task (e.g., ATM machines, digital watches, embedded controllers in washing machines).
3. By Type of Data Processed
- Analog computers: Work with continuous data (examples: older scientific instruments, analog speedometers).
- Digital computers: Work with discrete (binary) data; most modern computers are digital.
- Hybrid computers: Combine analog and digital features; used in specialized fields like medical equipment and process control.
4. By Number of Users
- Single-user systems: One user at a time (typical PCs, tablets).
- Multi-user systems: Support simultaneous access by many users (mainframes, servers, time-sharing systems).
5. By Mode of Processing
- Batch Processing: Jobs collected and processed together (historical payroll systems).
- Time-sharing / Interactive: CPU time is shared among users so many can interact concurrently (multi-user servers, university systems).
- Real-time Processing: Immediate processing and response (air-traffic control systems, industrial controllers).
- Distributed Processing: Processing distributed across multiple machines connected by a network (cloud computing, clusters).
Key comparisons (conceptual): As you move from micro → mini → mainframe → supercomputer, processing power (FLOPS) and cost generally increase, while portability decreases. Purpose shifts from general personal tasks to highly specialized, large-scale scientific and transaction workloads.
Practical notes for students: When classifying a computer, identify its scale (small/large), intended purpose (general/special), how many users it supports, the nature of data processed, and its processing mode (batch, real-time, etc.).
- Microcomputer: A home laptop used for studying and browsing, or a smartphone running apps.
- Minicomputer (modern interpretation): A small business server hosting company email and database.
- Mainframe: Bank transaction processing systems that handle millions of daily transactions (e.g., core banking servers).
- Supercomputer: Weather forecasting models run on supercomputers (e.g., systems used by meteorological departments for cyclone prediction).
- General-purpose: A school computer lab PC used for coding, word processing, and browsing.
- Special-purpose: An ATM machine dedicated to banking transactions; digital wristwatch that displays time and sensors.
- \[CPU time (Execution time) = (Instruction Count × CPI) / Clock Frequency\]\[where CPI = cycles per instruction and Clock Frequency is in cycles/second (Hz).\]
- \[MIPS (Millions of Instructions Per Second) ≈ (Instruction Count / Execution Time) / 10^6.\]
- \[FLOPS (Floating Point Operations Per Second) = number of floating point operations performed / second\]\[used to measure supercomputer performance.\]
- \[Clock period (seconds) = 1 / Clock Frequency (Hz).\]
- \[Throughput = number of tasks completed / unit time (useful to compare servers and mainframes).\]
Computer System Components
Computer System Components
Key Point: Memory size conversions: 1 KB = 1024 bytes, 1 MB = 1024 KB = 1024^2 bytes, 1 GB = 1024^3 bytes.
What is a computer system? A computer system is an integrated set of hardware and software components that accepts data (input), processes it according to instructions (processing), stores results (storage), and provides output. Components work together via buses and firmware to perform tasks.
High-level classification
- Hardware – physical parts: CPU, memory, storage, motherboard, I/O devices, power supply, network interfaces, GPU, etc.
- Software – programs and data: operating system, application software, firmware (BIOS/UEFI).
Major hardware components
- CPU (Central Processing Unit): brain of the computer. Consists of the Control Unit (CU), Arithmetic Logic Unit (ALU), registers, and often on-chip cache (L1/L2/L3). It follows the fetch–decode–execute cycle to run instructions. Key characteristics: clock speed (Hz), number of cores, cache size, instruction set.
- Main memory (Primary): volatile memory used for executing programs. RAM (DRAM) stores running programs and data; ROM/flash contains firmware. Characteristics: access time (ns), capacity (bytes).
- Cache: small, very fast memory between CPU and RAM that reduces average access time. Organized in levels (L1 fastest, L3 larger/slower).
- Secondary storage: non-volatile mass storage (HDD, SSD, optical discs, flash drives). Used for long-term storage. Characteristics: capacity, access time, transfer rate.
- Motherboard & buses: motherboard hosts CPU socket, memory slots, chipset and provides buses (data, address, control) that carry information between components. Expansion buses connect peripherals (PCIe, USB).
- I/O devices: input devices (keyboard, mouse, scanner), output devices (monitor, printer, speakers), and combined (touchscreens). Interfaces include USB, HDMI, Ethernet.
- GPU / Graphics card: specialized processor for graphics and parallel computation (used for gaming, video, machine learning).
- Network Interface: wired/wireless adapters for network connectivity (Ethernet, Wi‑Fi).
- Power supply & cooling: provide stable power and remove heat (fans, heatsinks).
How components interact
- Programs/instructions are stored in secondary storage. When executed, code is loaded into RAM.
- The CPU fetches instructions from memory, decodes them, executes them (ALU), and reads/writes data back to registers or memory.
- Buses carry data, addresses and control signals between CPU, memory and I/O.
- Peripherals communicate through controllers and device drivers (software) managed by the OS.
Memory hierarchy (concept): registers → L1/L2/L3 cache → RAM → SSD/HDD → Removable/Tertiary storage. Lower levels are faster but more expensive per byte; higher levels are slower but larger and cheaper.
Performance factors include CPU clock, number of cores, CPI (cycles per instruction), memory latency, cache hits/misses, I/O throughput and bus bandwidth. Optimising systems often means balancing CPU speed, memory speed/size, and storage performance.
Types of systems: personal computers, laptops, servers (more CPU/RAID/backup & network capacity), embedded systems (appliances, controllers), mobile devices (smartphones with integrated SoC).
Summary: Understanding components, their characteristics and interactions helps explain why some tasks run faster on some systems and how to make informed choices when designing or buying computers.
- ATM machine: input (card reader, keypad), CPU + firmware, network interface (connect to bank server), display (output), secure storage—an embedded computer system.
- Smartphone: SoC combines CPU, GPU, memory and I/O; flash storage for apps/data; touchscreen as input/output; wireless network interfaces.
- Laptop: CPU with multiple cores, RAM for running apps, SSD/HDD for storage, GPU for graphics, keyboard/trackpad, Wi‑Fi and Bluetooth adapters.
- Web server: powerful multicore CPUs, large RAM, fast SSDs or RAID arrays for storage, network interface cards (NICs) for high throughput, often redundant power supplies.
- Digital camera: image sensor (input), image processor (specialized CPU/GPU), flash storage (SD card), display and USB/Wi‑Fi for output/transfer.
- Point‑of‑Sale (POS) terminal: barcode scanner (input), receipt printer (output), small CPU, memory and storage, network connection for payment processing.
- \[Memory size conversions: 1 KB = 1024 bytes, 1 MB = 1024 KB = 1024^2 bytes, 1 GB = 1024^3 bytes.\]
- \[CPU Time = (Instruction Count × CPI) / Clock Rate. (Clock Rate in cycles/second\]\[CPU Time in seconds.)\]
- \[CPI = Clock Cycles / Instruction Count\]\[IPC (Instructions per Cycle) = Instruction Count / Clock Cycles.\]
- \[Bus bandwidth (bytes/sec) = (Bus width in bits / 8) × Bus frequency (Hz).\]
- \[Disk average rotational latency (seconds) = 30 / RPM. (Derived: average wait ≈ half a rotation\]\[RPM is rotations per minute.)\]
- \[Disk access time ≈ Seek time + Rotational latency + Transfer time\]\[Transfer time = Data size / Transfer rate.\]
Hardware: Input Devices
Hardware: Input Devices
Key Point: Scanner: width_in_pixels = width_in_inches × DPI ; height_in_pixels = height_in_inches × DPI
Definition
Input devices are hardware components that allow users or external systems to enter data and control signals into a computer for processing. They convert human-readable or physical-world information (text, images, sound, motion, biometric data) into electrical signals or digital data the computer can process.
Role in the computer system
Input devices are the first link in the input–process–output cycle. Typical steps: sensing/actuation → signal conditioning (if analog) → analogue-to-digital conversion (ADC) → buffering/transfer → CPU/RAM.
Classification (by data type and use)
- Text/command entry: keyboards, numeric keypads.
- Pointing/navigation: mouse (mechanical/optical/laser), touchpad, trackball, stylus, touchscreen.
- Imaging/graphics: flatbed/handheld/film scanners, digital cameras, webcams, graphic tablets.
- Audio: microphones (analog → ADC), musical MIDI controllers.
- Biometric/security: fingerprint readers, iris scanners, face recognition cameras, voice recognition.
- Machine/automatic data collection: barcode scanners, QR readers, RFID readers, magnetic stripe & smart card readers, MICR for cheques.
- Controls and gaming: joysticks, gamepads, steering wheels.
- Sensors and IoT inputs: temperature, pressure, light, motion sensors feeding microcontrollers/PCs.
How common devices work (brief)
- Keyboard: matrix of switches; pressing closes a row–column circuit; controller encodes key scan code and sends to OS via USB/PS2.
- Mouse: optical mice use an LED/laser and an optical sensor to detect surface motion and translate to X/Y movement; scroll wheel and buttons generate events.
- Touchscreen: resistive (pressure-based) or capacitive (change in electrostatic field) detect touch coordinates; multi-touch for gestures.
- Scanner/digital camera: use CCD/CMOS sensors to sample light; produce pixel arrays. Resolution (DPI or pixels) and color depth determine image quality and file size.
- Microphone: converts sound pressure (analogue) to voltage, then ADC samples and quantizes to digital audio (sample rate, bit depth).
- Barcode/RFID: barcode scanners read reflected light patterns; RFID uses radio-frequency communication with tags; both translate physical identifiers into digital codes.
- Biometric sensors: capture unique biological patterns, preprocess, and convert to numeric templates for matching.
Important performance metrics
- Resolution: DPI (dots per inch) for scanners; pixels (width × height) for cameras.
- Color depth / bit depth: bits per pixel (e.g., 24-bit = true color).
- Sampling rate (audio): samples per second (Hz); affects frequency range.
- Latency & polling rate: important for mice/game controllers (e.g., 125 Hz to 1000 Hz).
- Accuracy & precision: for pointing devices and sensors.
- Throughput / speed: e.g., pages per minute for document scanners, scans/sec for barcode readers.
Interfaces & connectivity
Input devices connect via wired interfaces (USB, PS/2, Serial) or wireless (Bluetooth, RF). Many devices use standard drivers/profiles (HID for keyboards/mice).
Applications / examples
Everyday use includes typing (keyboard), navigating (mouse), smartphone touch interaction (touchscreen), scanning documents (scanner), supermarket checkout (barcode scanner), ATM transactions (card reader, PIN keypad), biometric attendance systems (fingerprint), voice assistants (microphone), photography and video conferencing (digital camera/webcam), and gaming (joysticks/gamepads).
Ergonomics, maintenance & security
Ergonomic design reduces strain (ergonomic keyboards, vertical mice). Maintain by cleaning sensors and connectors. Security: biometric spoofing, card skimmers, and malware-infected input devices are risks—use trusted hardware and encryption where applicable.
- Supermarket checkout: barcode scanner reads product codes; POS system retrieves price and updates inventory.
- ATM: card reader (magnetic stripe or chip), numeric keypad for PIN entry, and camera for security.
- Smartphone: capacitive touchscreen for multi-touch gestures; microphone for voice commands; camera for photos.
- Office: flatbed scanner digitizes printed documents as images or, with OCR, as editable text.
- Biometric attendance: fingerprint scanner captures fingerprint, converts to digital template, and matches against stored templates to register entry.
- Video calling: webcam captures live video frames; microphone captures audio; both streamed to the remote user.
- \[Scanner: width_in_pixels = width_in_inches × DPI\]\[height_in_pixels = height_in_inches × DPI\]
- \[Total pixels = width_in_pixels × height_in_pixels\]
- \[Image file size (bytes) = total_pixels × bits_per_pixel / 8 (e.g., 24-bit color means bits_per_pixel = 24)\]
- \[Audio (Nyquist theorem): sampling_rate (fs) ≥ 2 × f_max (highest audio frequency to be captured)\]
- \[Quantization levels = 2^n (n = number of bits in ADC\]\[e.g.\]\[n=16 ⇒ 65,536 levels)\]
Hardware: Output Devices
Hardware: Output Devices
Key Point: Total pixels = width_pixels × height_pixels. Example: 1920 × 1080 = 2,073,600 pixels (≈2.07 megapixels).
Hardware: Output Devices
Output devices are hardware components that present processed data from a computer to the user or another device in human- or machine-readable form. They convert electronic signals into visual, audible or physical forms. Common categories include display devices (monitors, projectors), printing devices (printers, plotters), audio devices (speakers, headphones), and specialized accessibility/haptic devices (braille displays, haptic actuators).
Major types and how they work (brief)
- Monitors / Displays: Show visual output as a grid of pixels. Technologies: CRT (cathode-ray tube), LCD (liquid crystal display) with LED backlight, OLED (organic LED). Key parts: pixel matrix, controller, backlight (for LCD), driver electronics.
- Projectors: Magnify display content onto a screen using optical projection. Types: DLP, LCD, LCoS. Used in classrooms, meetings, cinemas.
- Printers: Produce physical copies on paper. Impact printers (dot-matrix) use pins; non-impact printers include inkjet (spray droplets) and laser (electrostatic toner fused to paper).
- Plotters: Large-format printers for vector-based drawings (engineering, CAD) that move pens or cutters precisely.
- Speakers and Headphones: Convert electrical audio signals to sound via diaphragm movement (dynamic, electrostatic types).
- Braille displays / Haptic devices: Provide tactile output for visually impaired users or force/feedback sensations for VR and devices.
Key characteristics and how they affect output
- Resolution: Number of pixels horizontally × vertically (e.g., 1920 × 1080). Higher resolution = sharper image.
- Pixel density (PPI): Pixels per inch. Higher PPI = finer detail on same-size screen.
- Refresh rate: Measured in Hz (frames per second). Higher refresh rates give smoother motion (important for video and gaming).
- Response time: Time for a pixel to change state (ms). Lower response prevents motion blur.
- Color depth: Bits per pixel (bpp). Number of colors = 2^(bpp). Typical: 24-bit color = ~16.7 million colors.
- Brightness: Measured in candela per square meter (cd/m²). Determines visibility in bright environments.
- Contrast ratio: Ratio of maximum to minimum display luminance; higher means deeper blacks and more vivid images.
- Dot pitch / pixel pitch: Distance between sub-pixels; smaller pitch = sharper image.
- Printer dpi: Dots per inch for printers; higher dpi = finer printed detail.
Typical uses (learning, offices, multimedia)
- Monitors/Projectors for lectures, presentations, graphic design, programming and browsing.
- Printers for reports, assignments, photographs, legal documents.
- Plotters for engineering drawings and large posters.
- Speakers/headphones for audio lessons, multimedia, assistive listening.
- Braille displays for accessibility in exams and learning for visually impaired students.
Practical considerations
- Choose display based on resolution and size (PPI) for clear text and images.
- For printing, select printer type by volume and quality: laser for text speed and low cost per page; inkjet for high-quality photos.
- Match refresh rate and response time to application: gaming needs high refresh and low response; reading needs high resolution and comfortable brightness.
- Consider connectivity (HDMI, DisplayPort, USB, wireless) and driver support for the operating system.
Summary: Output devices present processed data to users in various forms (visual, printed, audio, tactile). Each device type has specific characteristics (resolution, dpi, refresh rate, color depth, brightness) that determine suitability for different tasks such as text editing, graphics work, printing photos, or accessibility.
- A 24-inch monitor with 1920×1080 resolution used for coding and browsing (desktop environment).
- An inkjet photo printer used at home to print high-quality colour photographs at 4800 dpi.
- A laser printer in an office producing fast, sharp black-and-white reports at 600 dpi.
- A school projector for displaying slides to a classroom during lectures (LCD or DLP projector).
- Headphones used for listening to audio lessons and language practice; speakers for classroom announcements.
- A tactile braille display that raises pins to form braille characters for a visually impaired student.
- \[Total pixels = width_pixels × height_pixels\]\[Example: 1920 × 1080 = 2,073,600 pixels (≈2.07 megapixels).\]
- \[Pixels per inch (PPI) = sqrt(width_px^2 + height_px^2) / diagonal_in_inches\]\[Example: for 1920×1080 on 24" -> PPI ≈ sqrt(1920^2+1080^2)/24 ≈ 91.79 PPI.\]
- \[Number of colors = 2^(bits_per_pixel)\]\[Example: 24-bit color → 2^24 ≈ 16,777,216 colors.\]
- \[Display bandwidth (bits per second) ≈ total_pixels × bits_per_pixel × refresh_rate\]\[Example for 1920×1080, 24 bpp, 60 Hz: 2,073,600 × 24 × 60 ≈ 2.99 × 10^9 bits/s ≈ 3.0 Gbps.\]
- \[Contrast ratio = Luminance_max / Luminance_min. (e.g., 1000:1 means max luminance is 1000 times the minimum measurable luminance).\]
- \[DPI (printer) relates image detail: higher dpi → more dots per inch → finer print detail (no single universal formula\]\[but dpi specifies dot density).\]
Storage Devices and Media
Storage Devices and Media
Key Point: Storage unit conversions: 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB (binary convention used by OS).
What is storage? Storage devices and media are hardware components used to record and retain digital information — programs and data — for short-term or long-term use. They differ by capacity, speed, volatility, access method and portability.
Classification
- Primary (volatile) storage: Directly accessible by the CPU. Example: RAM (Random Access Memory). Contents are lost when power is off.
- Secondary (non‑volatile) storage: For long‑term storage connected to the system: hard disk drives (HDD), solid state drives (SSD), optical disks (CD/DVD/Blu‑ray), flash drives. Data persists without power.
- Tertiary & offline storage: Removable or large‑scale archive media used for backups and archiving: magnetic tape libraries, removable disks, external drives, cloud storage.
Types of media and devices (brief)
- Magnetic: HDDs and magnetic tape. Uses magnetized surfaces to store bits. Good capacity and cost per GB, moderate access speed (HDD has moving parts).
- Solid state (flash): SSDs, USB flash drives, memory cards. No moving parts, fast access, more durable, generally higher cost per GB than HDD (though prices change).
- Optical: CD/DVD/Blu‑ray. Read/write/ROM variants. Good for distribution and offline backups, slower access.
- Hybrid/other: SSHD (hybrid HDD+SSD), cloud storage (remote servers accessed over Internet).
Key characteristics and tradeoffs
- Capacity: How much data can be stored (bytes, KB, MB, GB, TB).
- Access time / latency: How quickly a device can start delivering requested data. RAM and SSDs have very low latency; HDDs have higher latency due to seek+rotational delay.
- Throughput / transfer rate: Amount of data moved per unit time (MB/s, GB/s).
- Volatility: Whether data is retained without power (volatile = RAM; nonvolatile = HDD/SSD).
- Access method: Random access (most RAM, SSDs) vs sequential access (magnetic tape).
- Durability & physical sensitivity: SSDs tolerate shocks better than HDDs; optical discs scratchable; flash has limited write cycles.
- Cost per GB: Important for choosing media for backups and archives.
Where each is used (practical roles)
- Registers / Cache / RAM: Fast temporary storage for CPU and running programs.
- SSD/HDD (internal): System/ application files, user documents, games, databases.
- External HDD / USB flash / memory cards: Portable data transport and backups.
- Optical discs / tapes: Distribution, long‑term archiving and backups (tape used in enterprise backup systems).
- Cloud storage: Off‑site storage for collaboration, backup and scaling without physical media management.
Care & best practices
- Keep backups: 3‑2‑1 rule (3 copies, 2 different media, 1 offsite) is common.
- Avoid physical damage (shock, moisture) to removable media and drives.
- Monitor SSD wear and HDD SMART health for failures.
- Encrypt sensitive data on removable or cloud media.
Summary: Choose storage based on required speed, capacity, durability and cost. For OS and frequently used apps choose fast (SSD/RAM); for inexpensive bulk storage choose HDD or tape; for portability choose flash drives or memory cards; for collaboration and redundancy choose cloud with proper backups.
- Laptop internal SSD (256 GB) stores the operating system and applications for fast boot and app load times.
- Desktop computer uses a 2 TB HDD to store large media files (movies, photos) where high capacity and low cost per GB matter more than speed.
- USB flash drive (32 GB) used to transfer school project files between home and school computers.
- Memory card (microSD) in a smartphone or camera stores photos and videos; removable and portable.
- Optical DVD used to distribute software or store a video; Blu‑ray discs for higher‑capacity video storage.
- Magnetic tape used by enterprises for long‑term archival backups due to low cost per TB and long shelf life.
- \[Storage unit conversions: 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB (binary convention used by OS).\]
- \[Disk capacity (logical): Capacity = number_of_surfaces × tracks_per_surface × sectors_per_track × bytes_per_sector.\]
- \[Average disk access time ≈ Seek time + Rotational latency + Transfer time.\]
- \[Rotational latency (average) = 0.5 × (60 / RPM) seconds\]\[Example: for 7200 RPM\]\[avg rotational latency = 0.5 × (60/7200) = 0.00417 s ≈ 4.17 ms.\]
- \[Transfer time = Data size / Transfer rate\]\[Example: copying 1 GB over 100 MB/s link takes ≈ 10 s.\]
- \[Throughput (MB/s) often used to compare devices\]\[higher is faster for large sequential reads/writes.\]
Central Processing Unit (CPU)
Central Processing Unit (CPU)
Key Point: Clock period (seconds) = 1 / Clock rate (Hz)
What is a CPU?
The Central Processing Unit (CPU) is the primary component of a computer that performs computation and controls the execution of instructions. It is often called the "brain" of the computer because it interprets program instructions and processes data.
Major components of a CPU
- Control Unit (CU): Directs the operation of the processor by fetching instructions from memory, decoding them, and coordinating the execution steps.
- Arithmetic Logic Unit (ALU): Performs arithmetic (addition, subtraction) and logical (AND, OR, NOT) operations.
- Registers: Small, very fast storage locations inside the CPU used to hold instructions, addresses, counters and intermediate data (e.g., Program Counter, Instruction Register, Accumulator).
- Cache Memory: Small, fast memory (L1, L2, sometimes L3) placed close to the CPU to reduce the average time to access data from main memory (RAM).
- Buses: Communication pathways (data bus, address bus, control bus) that transfer data and signals between CPU, memory and I/O devices.
How the CPU works: The Instruction Cycle
The basic cycle the CPU repeats is Fetch → Decode → Execute (and sometimes Store/Write-back). Steps:
- Fetch: CU reads the next instruction from memory into the Instruction Register using the address in the Program Counter (PC).
- Decode: The instruction is decoded to determine required operations and operands.
- Execute: ALU and other parts perform the operation (compute, read/write memory, I/O operations).
- Update PC: Move to the next instruction (or change PC if a jump/branch).
Performance factors
CPU performance depends on clock speed (frequency), number of cycles needed per instruction (CPI), instruction count, and architecture (single vs multicore, pipelining, superscalar, etc.). Faster clocks and fewer cycles per instruction improve performance, as does adding parallelism (multiple cores or pipelines).
Modern CPU features
- Pipelining: Overlaps instruction stages so several instructions are in different stages at once; increases throughput.
- Multiple cores: Two or more independent processing units on one chip to run tasks in parallel.
- Superscalar execution: Multiple ALUs allowing more than one instruction to execute per cycle.
- Out-of-order execution and branch prediction: Techniques to keep pipelines busy by reordering or guessing instructions safely.
Analogy: Think of the CPU as a factory manager (CU) and workers (ALU) with short-term note pads (registers) and a nearby supplies cupboard (cache). The manager fetches job orders (instructions), tells workers what to do, and stores results back in the cupboard or sends them out to the warehouse (RAM).
Examples of CPUs: Desktop/Notebook (Intel Core i3/i5/i7, AMD Ryzen), Mobile/Tablet/Phone (ARM Cortex series), Embedded (microcontrollers such as AVR, PIC), and Server processors (Intel Xeon, AMD EPYC).
- Smartphone CPU: Executes apps, handles touch input and sensors. (Example: ARM Cortex cores in mobile phones.)
- Laptop CPU: Runs operating system and programs such as browser, office apps, and games. (Intel/AMD processors.)
- Microcontroller in a microwave: Simple CPU reads button inputs, runs the cook-timer program and controls heater cycles.
- Car Engine Control Unit (ECU): CPU processes sensor data (speed, temperature) and controls fuel injection and ignition timing in real time.
- Gaming console CPU + GPU: CPU runs game logic and I/O while GPU handles graphics; both collaborate for smooth gameplay.
- \[Clock period (seconds) = 1 / Clock rate (Hz)\]
- \[CPU execution time = (Instruction count × CPI) / Clock rate\]
- \[CPI (cycles per instruction) = Total cycles / Instruction count\]
- \[IPC (instructions per cycle) = Instruction count / Total cycles = 1 / CPI\]
- \[Instructions per second = Clock rate × IPC\]
- \[MIPS (Million Instructions Per Second) ≈ (Instruction count / Execution time) / 10^6\]
Motherboard, Buses and Interfaces
Motherboard, Buses and Interfaces
Key Point: Maximum addressable memory = 2^(number of address lines) bytes. Example: 2^32 = 4,294,967,296 bytes (4 GB).
Overview
The motherboard is the main printed circuit board (PCB) in a computer that holds the CPU, memory, chipset and connectors for peripherals. It provides electrical connections (buses) and protocol implementations (interfaces) that allow components to communicate and work as a system.
Key motherboard components
- CPU socket: Where the processor is installed.
- Chipset / PCH (Platform Controller Hub): Manages data flow between CPU, memory, storage and peripherals (historically called northbridge/southbridge).
- RAM slots: DIMM slots for system memory.
- Expansion slots: PCIe slots for graphics cards, network cards, etc.
- Storage connectors: SATA ports and M.2 slots (NVMe/PCIe) for SSDs/HDDs.
- Power connectors: 24-pin ATX, CPU power, and peripheral power headers.
- BIOS/UEFI and CMOS battery: Firmware and clock/setting backup.
- I/O panel: USB, Ethernet, audio, HDMI/DisplayPort and other external ports.
What is a bus?
A bus is a set of electrical lines (wires/traces) that carry information between components. Traditionally three logical buses are described:
- Data bus: Carries actual data (width measured in bits, e.g. 8, 16, 32, 64 bits).
- Address bus: Carries addresses specifying memory or I/O locations (width in lines determines addressable memory).
- Control bus: Carries control signals (read/write, clock, interrupts).
Parallel vs Serial buses
Parallel buses send many bits at once across multiple lines (older approach). Serial buses send bits sequentially over one or a few high-speed lanes (modern approach). Modern PCs favour high-speed serial point-to-point links (e.g., PCI Express) because they scale better and avoid signal timing issues of long parallel traces.
Types of buses & interfaces used on motherboards
- Front-side/System bus: Historically connected CPU to main memory; modern CPUs use integrated memory controllers and high-speed links.
- PCI Express (PCIe): Point-to-point serial lanes for expansion cards (x1, x4, x8, x16 lanes).
- USB (Universal Serial Bus): External peripheral interface (USB 2.0/3.x speeds).
- SATA & NVMe: Interfaces for storage (SATA is serial, NVMe uses PCIe lanes for very high performance).
- Ethernet, HDMI, DisplayPort, Audio jacks: Standard interfaces for networking, video and sound.
- I2C, SPI, UART, GPIO: Low-level on-board interfaces used by sensors, controllers and embedded devices.
Bus characteristics
Important properties include:
- Width: Number of data lines (bits) — determines how many bits transfer per cycle.
- Frequency (clock): How many cycles per second (Hz).
- Bandwidth: Data per second (depends on width and frequency).
- Latency: Delay between request and response (measured in cycles/time).
- Topology: Shared bus vs point-to-point links (affects contention and arbitration).
Modern trends
Modern motherboards move from shared parallel buses to point-to-point serial links (PCIe, SATA, USB3, NVMe). Memory controllers are integrated into CPUs, reducing the need for a central parallel front-side bus. Chipsets group I/O and lower-speed functions.
How communication works (simplified)
The CPU issues an address on the address bus and control signals on the control bus to indicate read/write. Data is transferred on the data bus. In modern systems, protocols and controllers (e.g., PCIe root complex, NVMe controller) package data into packets and send them over serial links with layered protocols handling ordering, error checking and flow control.
Class-level implications
Understanding motherboards, buses and interfaces helps you choose compatible components (socket, RAM type, PCIe lanes), understand performance limits (bus widths and speeds), and troubleshoot connections (wrong slot, incompatible interface).
- Address bus example: A 32-bit address bus can address 2^32 = 4,294,967,296 bytes (4 GB). So a 32-bit address space maps up to 4 GB of memory addresses.
- Data transfer rate example: A 64-bit data bus running at 100 MHz has theoretical bandwidth = (64 bits * 100,000,000 cycles)/8 = 800,000,000 bytes/s = ~762.9 MB/s.
- USB vs SATA real-life: A USB 2.0 flash drive (480 Mbps theoretical) can reach up to ~60 MB/s in bits-to-bytes terms, while SATA III (6 Gbps) has a theoretical 600 MB/s (practical ~500–550 MB/s).
- Installing an NVMe SSD in an M.2 slot uses PCIe lanes directly for very high speed compared with a SATA SSD connected to a SATA port.
- GPU in PCIe x16 slot: A modern graphics card installed in a PCIe x16 slot uses 16 lanes to provide maximum throughput; putting it in an x8 or x4 slot halves or quarters lane count and bandwidth respectively.
- \[Maximum addressable memory = 2^(number of address lines) bytes\]\[Example: 2^32 = 4,294,967,296 bytes (4 GB).\]
- \[Bus bandwidth (bytes/s) = (bus width in bits) × (bus frequency in Hz) / 8\]\[Example: 64-bit × 100 MHz → (64 × 100,000,000)/8 = 800,000,000 bytes/s (~762.9 MB/s).\]
- \[Convert bits to bytes: bytes = bits / 8\]\[Example: 5 Gbps (USB 3.0) = 5,000,000,000 bits/s → 625,000,000 bytes/s = ~596.0 MB/s (decimal/si vs binary units vary).\]
- \[PCIe throughput (per lane) approximate: Gen3 ≈ 8 GT/s ≈ 985 MB/s per lane\]\[so x16 ≈ 15.76 GB/s aggregate (approximate practical values vary).\]
Software: Types and Concepts
Software: Types and Concepts
Key Point: Lines of Code (LOC) — a simple size metric: LOC = total number of source code lines (approximate measure of program size).
What is software? Software is a collection of programs, procedures and associated documentation and data that tells the computer how to perform tasks. Unlike hardware (the physical parts), software is intangible — it consists of code and instructions.
Major types of software
- System software: Provides a platform for running application software and manages hardware. Includes:
- Operating systems (e.g., Windows, Linux, macOS)
- Device drivers (printer, graphics drivers)
- Utilities (disk cleanup, antivirus)
- Application software: Programs that perform specific user-oriented tasks. Categories:
- General-purpose (word processors, spreadsheets — MS Word, Excel)
- Specialized/domain-specific (accounting software, hospital management)
- Web & mobile apps (Google Chrome, WhatsApp)
- Programming software: Tools to create other software. Includes:
- Compilers, interpreters (GCC, Python interpreter)
- IDEs (Visual Studio, Eclipse)
- Linkers, debuggers
- Middleware: Software that connects different applications or services (database middleware, message brokers).
Other classification aspects
- By license and distribution: Proprietary (paid, closed-source), Open-source (free to inspect and modify — e.g., Linux), Freeware (free to use, may be closed-source), Shareware (trial versions), SaaS/Cloud (software accessed online — e.g., Google Docs).
- By deployment: Installed software (desktop apps), web-based apps, mobile apps.
Key software concepts
- Installation & configuration: Process to set up software and make it ready to use on a system.
- Updates, patches and versions: Fixes and new features are delivered as patches or versioned releases (major.minor.patch).
- Maintenance types: Corrective (fix bugs), Adaptive (support new platforms), Perfective (improve features), Preventive (improve future maintainability).
- Software quality attributes: Reliability, availability, usability, efficiency, portability, maintainability, security.
- Software development lifecycle (SDLC): Typical phases — Requirements → Design → Implementation (coding) → Testing → Deployment → Maintenance.
Why software matters (short)
Software is what makes hardware useful: from running school applications and browsing the web to controlling cars and hospitals. Good software is reliable, secure, and easy to use.
- System software: Windows 10 (OS), Ubuntu Linux (OS), printer driver
- Application software: Microsoft Word (word processor), LibreOffice Calc (spreadsheet), Adobe Photoshop (image editor), WhatsApp (messaging app)
- Programming software: Python interpreter, GCC compiler, Visual Studio Code (IDE)
- Middleware / cloud: MySQL Connector (middleware), Google Docs (SaaS)
- \[Lines of Code (LOC) — a simple size metric: LOC = total number of source code lines (approximate measure of program size).\]
- \[Productivity (basic) = LOC / Person-month (a very rough measure of coding speed).\]
- \[Availability = MTBF / (MTBF + MTTR) where MTBF = Mean Time Between Failures\]\[MTTR = Mean Time To Repair.\]
- \[Reliability (simple) = 1 - (Number of failures / Number of operations) — intuitive\]\[not formal for complex systems.\]
- \[COCOMO basic effort estimation (introductory view): Effort (person-months) ≈ a * (KLOC)^b (constants a\]\[b depend on project type) — used in higher-level planning.\]
Operating System (OS)
Operating System (OS)
Key Point: Turnaround Time = Completion Time - Arrival Time
Definition: An Operating System (OS) is system software that manages computer hardware and provides services to application programs and users. It acts as an intermediary between users/applications and the physical machine.
Primary Objectives
- Provide a convenient and efficient environment to run programs.
- Manage hardware resources fairly and safely (CPU, memory, storage, I/O).
- Ensure security, reliability and smooth multitasking.
Key Components
- Kernel: Core part that controls hardware, process scheduling, memory and device drivers. Runs in kernel mode.
- Shell/User Interface: Command-line or graphical interface that lets users interact with the OS.
- System Libraries & Calls: APIs that applications use to request OS services.
Main Functions
- Process Management: Create, schedule and terminate processes; context switching; process synchronization and basic deadlock handling.
- Memory Management: Allocate/deallocate RAM, manage virtual memory, paging and segmentation to allow programs to run even if physical memory is limited.
- File System Management: Create, read, write, organize and secure files and directories on secondary storage.
- Device Management: Device drivers and I/O scheduling for peripherals (printers, disks, network cards).
- Security & Access Control: User accounts, authentication, permissions and protection against unauthorized access.
- Resource Allocation: Fair sharing of CPU, memory and I/O among competing programs.
Types of Operating Systems
- Batch: Jobs executed in batches (early systems).
- Time-Sharing / Multi-user: Multiple users share CPU time (e.g., servers).
- Real-Time: Strict timing requirements (industrial controllers, pacemakers).
- Embedded: Built into devices (smart TVs, washing machines, IoT).
- Distributed: Manage resources across multiple networked computers.
- Mobile: Optimized for phones/tablets (Android, iOS).
Simple Analogies
- OS as a traffic controller: directs data and program execution so everything runs smoothly.
- OS as a manager: assigns tasks to workers (CPU), allocates workspace (memory), organizes storage (files).
Booting Process (brief)
When a computer powers on: BIOS/UEFI runs -> loads bootloader -> bootloader loads kernel -> kernel initializes hardware and starts system services and the login shell.
Important Concepts to Remember
- Multitasking: Running multiple programs by rapidly switching CPU among them (time sharing).
- Virtual Memory: Uses disk space to extend apparent RAM using paging; each process appears to have contiguous memory.
- Process States: New, Ready, Running, Waiting (Blocked), Terminated.
- System Calls: Standard interfaces programs use to request services (e.g., open file, create process).
The OS is foundational software: without it, applications cannot use hardware or communicate with users effectively.
- Windows 10/11: Desktop operating system for personal computers with GUI and multi-user support.
- macOS: Apple's desktop OS optimized for Mac hardware, with Unix-based kernel.
- Linux (Ubuntu, Fedora): Open-source OS used on servers, desktops and embedded devices.
- Android: Mobile OS based on Linux kernel used in smartphones and tablets.
- iOS: Mobile OS for Apple iPhones — optimized for touch and energy efficiency.
- RTOS (e.g., FreeRTOS): Real-time operating systems used in embedded systems like pacemakers, automotive controllers.
- \[Turnaround Time = Completion Time - Arrival Time\]
- \[Waiting Time = Turnaround Time - Burst Time\]
- \[Response Time = Time of First Response - Arrival Time\]
- \[Throughput = Number of Processes Completed / Total Time\]
- \[CPU Utilization (%) = (Busy Time / Total Time) × 100\]
Programming Languages and Translators
Programming Languages and Translators
Key Point: Translation + Execution model: T_total = T_translate + N * T_exec (where N is number of runs). Used to compare compiler vs interpreter.
What is a Programming Language?
A programming language is a formal set of instructions and rules used to write programs that tell a computer what to do. Languages vary by level of abstraction from the hardware:
- Machine language — binary instructions directly executed by the CPU.
- Assembly language — mnemonic codes representing machine instructions; needs an assembler.
- High-level languages (HLL) — human-readable languages (C, Java, Python) that provide abstractions (variables, functions, objects).
- Very-high-level / Domain-specific languages — SQL, HTML (markup), shell scripts for specific tasks.
Types of Languages (by paradigm): Procedural (C), Object‑oriented (Java, C++), Functional (Haskell), Scripting/Interpreted (Python, JavaScript), Declarative (SQL).
What are Translators?
Translators are programs that convert source code written in one language to another form so that it can be executed. Main kinds:
- Assembler — converts assembly language to machine code.
- Compiler — translates whole high-level source code into object/machine code before execution (e.g., C, C++).
- Interpreter — reads and executes source code line-by-line at runtime (e.g., CPython for Python, some JavaScript engines).
- Linker and Loader — combine object files and libraries (linker) and load executables into memory for running (loader).
- JIT (Just-In-Time) compiler — compiles parts of code at runtime to improve performance (used by JVM, .NET, modern JS engines).
- Transpiler (source-to-source) — converts code from one high-level language to another (TypeScript -> JavaScript, Babel for modern JS).
Compiler Phases (brief) — typical stages a compiler performs:
- Lexical analysis — breaks source into tokens.
- Syntax analysis (parsing) — checks grammar, builds parse tree / AST.
- Semantic analysis — type checking, scope resolution.
- Intermediate code generation — produces an intermediate representation (IR).
- Optimization — improves IR or machine code for speed/size.
- Code generation — produces target machine code or object code.
- Assembly and linking — produce executable by combining object modules and libraries.
Compiler vs Interpreter — key differences
- Compilation: entire program translated before execution; usually faster execution, slower startup (one-time translation cost).
- Interpretation: program translated/executed line-by-line; good for rapid development and portability, usually slower execution.
- Hybrid: languages like Java or C# use compilation to an intermediate form (bytecode/IL) and then run on a virtual machine with interpretation and JIT compilation.
Practical considerations & trade-offs: Choice depends on development speed, execution speed, portability, platform constraints (embedded systems often need compiled code), and ecosystem (libraries, tooling).
Summary of typical translation flows:
- Source (C) --> Compiler --> Object code --> Linker --> Executable
- Source (Python) --> Interpreter (CPython) --> Execution (sometimes bytecode cached)
- Source (Java) --> javac --> Bytecode (.class) --> JVM (interpreter + JIT) --> Native execution
Common real-life examples (short): C for system software, Python for scripting and data science, Java for cross-platform applications, JavaScript for web browsers, Assembly for low-level embedded code.
Important concept to compare interpreter vs compiler mathematically: Total time to get results when running a program many times:
T_total = T_translate + N_runs * T_exec_per_run
Where for an interpreter T_translate ≈ 0 (or very small), for a compiler T_translate = compilation time. If N_runs is large, compilation tends to pay off because T_exec_per_run (compiled) < T_exec_per_run (interpreted).
Use this chapter to understand how programs become executable instructions, what translators do, and why different languages and translators are chosen for different tasks.
- C program: source.c --(gcc)--> object.o --(ld linker)--> executable. Compiled once; fast runtime.
- Python script: script.py --(CPython interpreter)--> run line-by-line. Good for quick testing and scripting.
- Java program: Hello.java --(javac)--> Hello.class (bytecode) --(JVM)--> executed on any OS with JVM. JVM uses JIT to improve performance.
- Assembly for microcontroller: program.asm --(assembler)--> machine code burned to device memory for real-time control.
- TypeScript project: app.ts --(tsc transpiler)--> app.js --(browser JS engine)--> executes in user browser.
- \[Translation + Execution model: T_total = T_translate + N * T_exec (where N is number of runs)\]\[Used to compare compiler vs interpreter.\]
- \[Compilation flow (conceptual): Source_code --(Compiler)--> Object_code --(Linker)--> Executable\]
- \[Interpretation flow (conceptual): Source_code --(Interpreter)--> Execution (no separate object file)\]
- \[Java flow (conceptual): Java_source --(javac)--> Bytecode (.class) --(JVM/JIT)--> Native execution\]
Data Representation and Units
Data Representation and Units
Key Point: 1 byte = 8 bits
Overview
Data in computers is represented using binary (two symbols: 0 and 1). The smallest unit is a bit. Groups of bits form larger units (bytes, kilobytes, megabytes, ...). Different types of information (numbers, text, images, audio) use specific encoding schemes built on binary.
Basic units
- Bit (b): single binary digit, value 0 or 1.
- Byte (B): typically 8 bits. A byte often represents one character (in ASCII).
- Higher units (binary convention): 1 KB (kibibyte) = 1024 B, 1 MB (mebibyte) = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB.
- Decimal (SI) convention used by some drives: 1 kB = 1000 B, 1 MB = 1000 kB. This causes reported capacity differences.
Binary number representation
A binary number is evaluated as the sum of bit_i × 2^i (i = 0 for least significant bit). For signed integers, two's complement is commonly used: an n-bit two's-complement number has range -2^(n-1) to 2^(n-1)-1.
Text encoding
Characters are encoded into bytes: ASCII uses 7/8 bits per character (128/256 symbols). Unicode (UTF-8, UTF-16) supports many more characters and may use multiple bytes per character.
Images
Digital images are grids of pixels. Each pixel stores color using a color depth (bits per pixel). For example, 24-bit color uses 8 bits per channel (RGB), total 24 bits per pixel. Uncompressed image size ≈ width × height × color_depth (bits) / 8.
Audio
Digital audio is sampled in time. File size (uncompressed) ≈ sampling_rate × bit_depth × channels × duration (in seconds) / 8. Example: CD audio uses 44.1 kHz, 16-bit, stereo (2 channels).
Compression
To reduce storage/transmission size, lossless (ZIP, PNG) or lossy (JPEG, MP3) compression is used. Compressed size depends on content and algorithm.
Common concepts
- Capacity vs rate: storage measured in bytes (B), transfer speeds often in bits per second (bps).
- Overflow: when a value exceeds the representable range for given bits.
- Error detection: parity bits, checksums, and CRCs add bits to detect/correct errors.
- A text file with 1000 ASCII characters ≈ 1000 bytes (about 1 KB).
- An 8 GB RAM module actually contains about 8 × 1024^3 bytes = 8,589,934,592 bytes (binary convention).
- A 3-minute MP3 at 128 kbps: size ≈ 128,000 bits/s × 180 s / 8 ≈ 2,880,000 bytes ≈ 2.88 MB.
- An uncompressed 1920×1080 image at 24-bit color: size ≈ 1920 × 1080 × 24 / 8 ≈ 6,220,800 bytes ≈ 6.22 MB.
- CD-quality audio (44.1 kHz, 16-bit, stereo) for 5 minutes: size ≈ 44,100 × 16 × 2 × 300 / 8 ≈ 529,200,000 bytes ≈ 504.7 MB.
- IPv4 address uses 32 bits; IPv6 uses 128 bits (much larger address space).
- \[1 byte = 8 bits\]
- \[Binary place-value: value = Σ (bit_i × 2^i) for i = 0..n-1\]
- \[Binary unit conversions (binary convention): 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB\]
- \[Decimal (SI) conversions: 1 kB = 1000 B, 1 MB = 1000 kB, 1 GB = 1000 MB\]
- \[Range of n-bit unsigned integer: 0 to 2^n − 1\]
- \[Range of n-bit two's-complement signed integer: −2^(n−1) to 2^(n−1) − 1\]
Performance and Factors Affecting Performance
Performance and Factors Affecting Performance
Key Point: CPU Clock Cycles = Instruction Count × CPI
What is Performance?
Performance of a computer system describes how quickly and efficiently it completes tasks. Two common performance metrics are response time (time to complete a single task) and throughput (number of tasks completed per unit time).
Key performance measures
- Execution (CPU) time: time the CPU spends to execute a program.
- Response time / Latency: time from request to the first (or complete) response.
- Throughput: jobs processed per second/minute/hour.
- Utilisation: fraction of time a resource (CPU, disk) is busy.
How CPU execution time is determined
Execution time depends on three main components: number of instructions executed (Instruction Count, IC), average clock cycles per instruction (CPI), and clock rate (frequency). These relate as:
- CPU Clock Cycles = Instruction Count × CPI
- CPU Time = Clock Cycles × Clock Cycle Time = (Instruction Count × CPI) / Clock Rate
Factors affecting performance
- Processor (CPU): clock frequency, number of cores, microarchitecture (pipeline depth, superscalar execution), CPI and support for SIMD/parallelism.
- Memory: RAM size, memory speed, bus width, and cache (levels, size, associativity). Cache hit rate strongly affects effective memory access time.
- Storage: HDD vs SSD differences in latency and throughput; access time and transfer rates affect I/O-bound tasks.
- Input/Output devices and buses: bus speeds, controller efficiency, and device latencies impact I/O performance.
- Software: algorithm efficiency, compiled code quality, interpreter/virtual machine overhead and background processes.
- Operating system and resource management: scheduling, context-switch overhead, and I/O handling affect perceived and actual performance.
- Parallelism and concurrency: multithreading and multicore usage can increase throughput but may face synchronization and contention limitations.
- Thermal and power constraints: thermal throttling reduces clock speed; battery-saving modes reduce performance on mobile devices.
- Network: bandwidth and latency are critical for distributed applications (web, streaming, cloud).
Principles and trade-offs
Improving one resource may shift the bottleneck to another (e.g., faster CPU reveals slow disk). Also, adding parallel resources yields diminishing returns due to coordination overhead (see Amdahl's Law).
Practical tips to improve performance
- Use efficient algorithms and data structures.
- Increase RAM and use faster storage (SSD) for I/O-heavy tasks.
- Make effective use of caches and locality (optimize code for cache friendliness).
- Use multicore/parallelism appropriately; avoid excessive locking/contention.
- Keep software updated; use compilers and interpreters that produce optimized code.
- Web server: Throughput measured as requests per second. Adding more CPU cores increases throughput up to a limit; if disk I/O is slow, throughput won't improve unless storage is upgraded.
- Gaming: Frame rate (FPS) depends on GPU and CPU. A bottlenecked CPU or slow memory causes low FPS despite a powerful GPU.
- Smartphone: Thermal throttling reduces clock speed when the device gets hot, lowering performance to protect hardware and battery life.
- Database query: Poorly written queries or no indexes increase instruction count and I/O, greatly increasing response time even on a fast CPU.
- Video rendering: Parallelism on many CPU cores or GPU accelerators reduces total render time, but speedup is limited by non-parallel parts of the task.
- \[CPU Clock Cycles = Instruction Count × CPI\]
- \[CPU Time = Clock Cycles × Clock Cycle Time = (Instruction Count × CPI) / Clock Rate\]
- \[Clock Cycle Time = 1 / Clock Rate\]
- \[Performance ∝ 1 / Execution Time (higher performance → lower execution time)\]
- \[Speedup = Performance_new / Performance_old = Time_old / Time_new\]
- \[Effective Access Time (memory with cache) = (Hit Ratio × Hit Time) + (Miss Ratio × Miss Penalty)\]
Basic Computer Operations and Maintenance
Basic Computer Operations and Maintenance
Key Point: Uptime (%) = (Total Time - Downtime) / Total Time × 100
Overview
Basic computer operations and maintenance cover the everyday tasks required to operate a computer safely and keep it working reliably. This includes how to start and shut down a system, manage files and peripherals, perform routine software and hardware maintenance, and take steps to prevent failures and data loss.
Basic Operations
- Booting & BIOS/UEFI: Power-on self test (POST), BIOS/UEFI initialization, choosing boot device, and loading the operating system kernel.
- Login & User Accounts: Authentication (username/password), user profiles, permissions and user roles to protect data and resources.
- File Management: Creating, saving, moving, renaming, deleting, compressing files and organizing folders. Use of file extensions and backups for important documents.
- Peripheral Operations: Installing and configuring printers, scanners, external drives and USB devices; using device drivers and troubleshooting common device errors.
- Network Basics: Connecting to LAN/Wi‑Fi, understanding IP addressing briefly, mapping network drives and basic internet connectivity checks.
- Software Management: Installing/uninstalling applications, applying software updates and patches, and understanding system restore points.
Maintenance (Purpose & Types)
Maintenance aims to prevent failures, secure data and keep performance optimal. It is usually classified into:
- Preventive Maintenance: Scheduled tasks to prevent problems (cleaning, updates, backups).
- Corrective Maintenance: Fixing faults after they occur (hardware replacement, OS repair, reinstalling drivers).
- Predictive/Monitoring: Using logs and monitoring tools to detect signs of impending failure (disk SMART status, CPU temperature).
Common Maintenance Tasks
- Physical cleaning: Remove dust from fans, vents, keyboard and behind monitors. Keep airflow clear to avoid overheating.
- Update OS & Applications: Install security patches and updates regularly to fix vulnerabilities.
- Antivirus & Malware Scans: Keep definitions up to date and run scheduled scans.
- Disk Maintenance: Disk cleanup (remove temporary files), defragmentation for HDDs (not needed for SSDs), and checking disk health (CHKDSK / SMART).
- Backups: Regularly back up important files to external drives or cloud and test restore procedures.
- Driver & Firmware Updates: Update hardware drivers and device firmware to fix compatibility/performance issues.
- UPS & Power Protection: Use a UPS or surge protector and maintain their batteries to protect against power surges and outages.
Safety & Best Practices
- Always power off and unplug before opening a case. Use anti-static precautions (ESD wrist strap).
- Keep software licenses, serial numbers and documentation organized.
- Create restore points before major changes and keep an off-site backup for critical data.
- Limit administrative privileges; use standard user accounts for daily tasks to reduce malware risk.
Troubleshooting Workflow (Simple)
- Identify problem & collect symptoms (error messages, LEDs, sounds).
- Isolate the cause (hardware vs software vs network).
- Try simple fixes (reboot, reconnect cables, update drivers).
- Escalate: run diagnostics, replace suspect hardware, restore from backup or reinstall OS if needed.
- Document the fix and preventive steps to avoid recurrence.
When to Call a Technician
Persistent hardware failures (strange noises from HDD, repeated blue screens, burnt smells), inability to boot after simple fixes, or complex network/server issues should be handled by trained technicians.
Summary
Regular basic operations combined with preventive maintenance — cleaning, updates, backups, monitoring and safe handling — keep computers reliable and secure. Simple, regular tasks performed by users and scheduled maintenance by IT staff form the backbone of a healthy computer system.
- School computer lab: Weekly disk cleanup, monthly antivirus scan, quarterly physical cleaning of CPUs and peripherals, and nightly backup of student work to a network drive.
- Home PC: Before exams, a student defragments an HDD, clears temporary files, and backs up important documents to a USB drive and cloud storage.
- Office printer issue: Reinstalling the printer driver fixes printing errors; checking printer queue and restarting spooler service resolves stuck jobs.
- Power outage protection: A small office uses a UPS to allow safe shutdowns during short power cuts and replace UPS battery annually.
- Recovering from malware: Isolate the infected machine from network, run full antivirus and malware removers, restore from clean backup if needed.
- \[Uptime (%) = (Total Time - Downtime) / Total Time × 100\]
- \[CPU Utilization (%) = (CPU Busy Time / Total Observation Time) × 100\]
- \[Mean Time Between Failures (MTBF) = Total Operating Time / Number of Failures\]
- \[Mean Time To Repair (MTTR) = Total Repair Time / Number of Repairs\]
- \[Backup Time (seconds) = Backup Size (bytes) / Transfer Rate (bytes/second)\]
- \[Power (W) = Voltage (V) × Current (A)\]\[Energy (Wh) = Power (W) × Time (h)\]
Emerging Trends (Introductory)
Emerging Trends (Introductory)
Key Point: Moore's law (doubling model): N(t) = N0 * 2^(t/T) — N(t): transistor count at time t, T ≈ 2 years
What are Emerging Trends? Emerging trends are new or rapidly developing technologies and practices that are changing how computers are used, how data is processed, and how people interact with digital systems. These trends are driven by increases in computing power, ubiquitous connectivity, vast amounts of data, and advances in algorithms.
Key trends (introductory overview)
- Artificial Intelligence (AI) and Machine Learning (ML): Systems that learn from data to recognize patterns, make predictions, and automate tasks (e.g., recommendation systems, image recognition). Benefits include automation and personalization; challenges include bias, explainability and ethics.
- Internet of Things (IoT): Network of physical devices (sensors, appliances, wearables) that collect and exchange data. Enables smart homes, industrial monitoring and agriculture automation; challenges include interoperability and security.
- Big Data and Analytics: Handling and analyzing extremely large, varied datasets to extract insights. Techniques include data mining, statistical analysis and visualization. Challenges: storage, processing and privacy.
- Cloud Computing: On-demand delivery of computing resources (storage, processing, platforms) over the internet. Models: IaaS, PaaS, SaaS. Advantages: scalability, pay-as-you-go; challenges: data governance and dependency on providers.
- Edge Computing: Processing data close to its source (on devices or edge servers) to reduce latency and bandwidth use—important for real-time IoT and AR/VR applications.
- 5G and Next-generation Networks: Higher bandwidth and lower latency mobile networks enabling applications like real-time streaming, autonomous vehicles and remote surgery.
- Cybersecurity and Privacy: Techniques and practices to protect systems and data (encryption, authentication, secure design). As technologies spread, attack surfaces grow—security is central to adoption.
- Blockchain and Distributed Ledger: Decentralized, tamper-evident records useful for transparent transactions, supply-chain tracking, and digital identity. Trade-offs: performance and energy use for some implementations.
- Augmented Reality (AR) / Virtual Reality (VR): Immersive or overlayed digital experiences with applications in education, training, gaming and design.
- Quantum Computing (introductory): Uses quantum bits to solve certain types of problems (e.g., optimization, factoring) much faster than classical computers for specific tasks. Largely experimental but promising.
Drivers and Impacts: Faster processors, cheap storage, abundant data, better algorithms and improved connectivity (5G) are accelerating adoption. Impacts include new jobs and skills demand, automation of routine work, smarter services, and increased ethical & privacy concerns.
Challenges to watch: privacy and data protection, cybersecurity risks, digital divide (unequal access), ethical concerns (bias, transparency), regulatory and legal issues, and environmental impacts (energy use).
How to think about adoption: Many technologies follow an adoption curve—from research and early experiments, through rapid growth, to maturity. Evaluate a trend by its maturity, use-cases, ecosystem (tools, standards), and real-world deployments.
Simple formulas useful in this topic (examples shown below):
Moore's law (approximate): N(t) = N0 * 2^(t/T)
(where N(t) = transistor count at time t, N0 = initial count, T ≈ 2 years)
Exponential data growth: D(t) = D0 * e^(k t)
Data transfer time: Time (s) = Size (bits) / Bandwidth (bits/s)
Latency approximation: Latency ≈ Distance / (speed of signal)
(For fiber, speed ≈ 2/3 * speed of light)
These formulas are simplified but help estimate growth, transfer times and latency considerations when designing systems.
- Smart home: IoT devices (thermostats, lights, cameras) send sensor data to the cloud; AI analyzes usage patterns to automate temperature and lighting.
- Streaming services: Cloud infrastructure + ML-based recommendation engines (e.g., Netflix recommendations) personalize content for users.
- Wearables and health monitoring: Smartwatches collect heart-rate data; analytics detect anomalies and alert users or doctors.
- Supply chain tracking with blockchain: Recording product provenance on a distributed ledger to improve transparency and reduce fraud.
- Edge computing for autonomous vehicles: On-vehicle processors make split-second driving decisions while noncritical data is uploaded to the cloud.
- Telemedicine and remote surgery: High-bandwidth, low-latency 5G connections enable near real-time video, remote sensing and robotic control (emerging use cases).
- \[Moore's law (doubling model): N(t) = N0 * 2^(t/T) — N(t): transistor count at time t\]\[T ≈ 2 years\]
- \[Exponential growth (data): D(t) = D0 * e^(k t) — D0: initial data amount\]\[k: growth rate\]
- \[Data transfer time: Time = Size / Bandwidth — Size in bits\]\[Bandwidth in bits/second\]
- \[Latency (approx.): Latency ≈ Distance / SignalSpeed — SignalSpeed in medium (fiber ≈ 2/3 c)\]
- \[Storage conversion: 1 byte = 8 bits\]\[common units: KB (10^3) or KiB (2^10 = 1024) depending on context\]
Key Concepts
- Computer System
- An integrated set of hardware, software and users that processes data into information.
- Hardware
- The physical, tangible components of a computer system.
- Software
- Programs and instructions that tell the hardware what to do.
- Input Device
- A device that allows users to enter data and commands into a computer.
- Output Device
- A device that presents processed data from the computer to the user.
- Central Processing Unit (CPU)
- The primary component that executes instructions; often called the brain of the computer.
- Motherboard
- The main printed circuit board that connects and allows communication between components.
- Primary Memory (RAM)
- Volatile memory used to store data and programs currently in use for fast access.
- ROM
- Read-only memory that stores permanent instructions; non-volatile and typically not user-writable.
- Secondary Storage
- Non-volatile storage used for long-term data retention.
- Cache Memory
- A small, very fast memory between CPU and RAM that stores frequently used data and instructions.
- Operating System
- System software that manages hardware resources and provides services for applications.
- Application Software
- Programs designed to perform specific tasks for users.
- Firmware
- Low-level software stored in non-volatile memory that controls hardware behavior.
- Bus
- A communication pathway that transfers data and signals between components inside a computer.
- Arithmetic Logic Unit (ALU)
- Part of the CPU that performs arithmetic and logical operations.
- Control Unit (CU)
- CPU component that directs the sequence of operations by fetching, decoding and executing instructions.
- BIOS
- Basic Input/Output System (or UEFI): firmware that initializes hardware and boots the operating system.
- Peripheral Device
- External devices connected to the computer that provide input, output or additional functions.
- Byte
- A unit of digital information consisting of 8 bits, commonly used to represent a character.
Practice Questions
-
Define a computer system and name its three main components. / कंप्यूटर सिस्टम को परिभाषित कीजिए और इसके तीन मुख्य घटकों के नाम लिखिए।
Show answer
A computer system is an integrated set of hardware and software that accepts input, processes it to produce output, and stores results; its three main components are hardware, software and users. / कंप्यूटर सिस्टम हार्डवेयर और सॉफ़्टवेयर का एकीकृत समूह है जो इनपुट स्वीकार करता है, आउटपुट उत्पन्न करने के लिए उसे संसाधित करता है, और परिणाम संग्रहीत करता है; इसके तीन मुख्य घटक हैं हार्डवेयर, सॉफ़्टवेयर और उपयोगकर्ता।
-
Differentiate between system software and application software with one example each. / सिस्टम सॉफ़्टवेयर और एप्लिकेशन सॉफ़्टवेयर में एक-एक उदाहरण सहित अंतर बताइए।
Show answer
System software manages hardware and provides services (e.g., an operating system), whereas application software performs user-oriented tasks (e.g., a word processor or web browser). / सिस्टम सॉफ़्टवेयर हार्डवेयर का प्रबंधन करता है और सेवाएँ प्रदान करता है (जैसे ऑपरेटिंग सिस्टम), जबकि एप्लिकेशन सॉफ़्टवेयर उपयोगकर्ता-केंद्रित कार्य करता है (जैसे वर्ड प्रोसेसर या वेब ब्राउज़र)।
-
Explain the three stages of the fetch-decode-execute cycle in the CPU. / सीपीयू में फ़ेच-डिकोड-एग्ज़ीक्यूट चक्र के तीन चरणों को समझाइए।
Show answer
In Fetch, the control unit reads the next instruction from memory into the Instruction Register; in Decode, the control unit interprets it; in Execute, the ALU performs the operation and results are stored in registers or memory. / फ़ेच में, कंट्रोल यूनिट अगली अनुदेश को मेमोरी से इंस्ट्रक्शन रजिस्टर में पढ़ती है; डिकोड में, कंट्रोल यूनिट उसकी व्याख्या करती है; एग्ज़ीक्यूट में, ALU संक्रिया करता है और परिणाम रजिस्टर या मेमोरी में संग्रहीत होते हैं।
-
A CPU executes 2,000,000 instructions with an average CPI of 4 at a clock rate of 2 GHz. Calculate the CPU execution time. / एक सीपीयू 2 GHz की क्लॉक दर पर औसत CPI 4 के साथ 20,00,000 अनुदेश निष्पादित करता है। सीपीयू निष्पादन समय की गणना कीजिए।
Show answer
Using CPU time = (Instruction count x CPI) / Clock rate = (2,000,000 x 4) / (2 x 10^9) = 8,000,000 / 2,000,000,000 = 0.004 s = 4 ms. / सूत्र CPU time = (अनुदेश संख्या x CPI) / क्लॉक दर = (20,00,000 x 4) / (2 x 10^9) = 80,00,000 / 2,00,00,00,000 = 0.004 सेकंड = 4 मिलीसेकंड।
-
Compare primary and secondary memory with respect to volatility and speed. / प्राथमिक और द्वितीयक मेमोरी की तुलना अस्थिरता (वोलैटिलिटी) और गति के संदर्भ में कीजिए।
Show answer
Primary memory like RAM is volatile and very fast, losing data when power is off, while secondary storage like HDD/SSD is non-volatile and slower, retaining data without power. / RAM जैसी प्राथमिक मेमोरी अस्थिर और बहुत तेज़ होती है तथा बिजली बंद होने पर डेटा खो देती है, जबकि HDD/SSD जैसी द्वितीयक मेमोरी अस्थिर-रहित और धीमी होती है और बिना बिजली के डेटा बनाए रखती है।
-
Draw/describe the block diagram of a computer system showing data flow. / डेटा प्रवाह दर्शाते हुए कंप्यूटर सिस्टम का ब्लॉक आरेख बनाइए/वर्णन कीजिए।
Show answer
Input devices send data to the CPU (containing Control Unit, ALU and Registers), which exchanges data with Memory (RAM) and Storage, and finally sends results to Output devices, with arrows showing the direction of data flow. / इनपुट डिवाइस डेटा को सीपीयू (जिसमें कंट्रोल यूनिट, ALU और रजिस्टर होते हैं) को भेजते हैं, जो मेमोरी (RAM) और स्टोरेज के साथ डेटा का आदान-प्रदान करता है, और अंत में परिणाम आउटपुट डिवाइस को भेजता है, तथा तीर डेटा प्रवाह की दिशा दर्शाते हैं।
-
Classify computers by size and give one typical use of a supercomputer and a microcomputer. / कंप्यूटरों को आकार के अनुसार वर्गीकृत कीजिए और सुपरकंप्यूटर तथा माइक्रोकंप्यूटर का एक-एक विशिष्ट उपयोग बताइए।
Show answer
By size, computers are microcomputers, minicomputers, mainframes and supercomputers; a supercomputer is used for weather forecasting and scientific simulations, while a microcomputer (laptop) is used for personal study and browsing. / आकार के अनुसार कंप्यूटर माइक्रो, मिनी, मेनफ़्रेम और सुपरकंप्यूटर होते हैं; सुपरकंप्यूटर मौसम पूर्वानुमान और वैज्ञानिक सिमुलेशन के लिए प्रयोग होता है, जबकि माइक्रोकंप्यूटर (लैपटॉप) व्यक्तिगत अध्ययन और ब्राउज़िंग के लिए।
-
Why is an ATM considered a complete computer system? Identify its input, process, output and storage. / ATM को पूर्ण कंप्यूटर सिस्टम क्यों माना जाता है? इसके इनपुट, प्रोसेस, आउटपुट और स्टोरेज पहचानिए।
Show answer
An ATM has all functional units: input (card and PIN), processing (authenticating and updating balance), output (cash and receipt) and storage (the bank database), so it qualifies as a complete computer system. / ATM में सभी कार्यात्मक इकाइयाँ होती हैं: इनपुट (कार्ड और PIN), प्रोसेसिंग (प्रमाणीकरण और बैलेंस अद्यतन), आउटपुट (नकद और रसीद) और स्टोरेज (बैंक डेटाबेस), इसलिए यह पूर्ण कंप्यूटर सिस्टम माना जाता है।
Related Laws & Principles
Explore allFoundational laws & principles connected to this chapter — tap to open in the Laws Explorer.