💻

Computer Hardware and Data Representation

Jul 25, 2025

Overview

This lecture covers how computers use binary (0s and 1s) to represent numbers, letters, and data, the main hardware components inside a computer, and how software (operating systems) interacts with this hardware.

Binary Numbers & Representation

  • Computers use the binary system (base 2), consisting of only 0s and 1s.
  • Each binary digit (bit) represents a power of 2, with columns like 1's, 2's, 4's, 8's, etc.
  • Decimal numbers are represented in binary by summing relevant powers of 2 with 1s in those columns.
  • A group of 8 bits is called a byte; a byte can represent values from 0 to 255.

Mapping Data: Numbers to Letters (ASCII & Unicode)

  • Computers map numbers to letters using standard codes like ASCII (American Standard Code for Information Interchange).
  • In ASCII, decimal 65 maps to 'A', 66 to 'B', 97 to 'a', etc.
  • ASCII uses 7 or 8 bits; Unicode is a more comprehensive standard supporting more characters and symbols (including emojis).

Computer Components: CPU, Memory, Storage

  • The CPU (Central Processing Unit) is the "brain" of the computer, executing instructions and performing calculations.
  • Modern CPUs may have multiple cores, allowing parallel processing.
  • RAM (Random Access Memory) is volatile memory that stores programs/data currently in use; it's fast but loses data when powered off.
  • Nonvolatile storage like hard drives (HDDs), solid state drives (SSDs), and flash drives retain data even when powered off.
  • HDDs use spinning platters and magnetic storage; SSDs and flash use electronic storage with no moving parts (faster but can wear out).
  • Hybrid drives combine SSD and HDD to balance speed and capacity.
  • Data is transferred from storage to RAM, then through cache (L3, L2, L1) before reaching the CPU for processing.
  • Registers are tiny, high-speed memory locations within the CPU for immediate data operations.

Connectivity: Ports and Peripherals

  • Common ports: VGA, HDMI, DisplayPort, USB (Type A/B/C), and audio jacks.
  • USB ports are used for various devices (printers, mice, external drives) and have evolved in speed and connector design.
  • Wireless connections use Wi-Fi (for networking) and Bluetooth (for personal devices like keyboards and headphones).

Operating Systems & Device Drivers

  • The operating system (OS) is software loaded from storage into RAM at boot, managing hardware and providing the user interface.
  • Device drivers are specialized programs that allow the OS to communicate with hardware components and peripherals.
  • OS examples include Windows, Mac OS, and Linux.

Hardware Demonstrations and Internal Tour

  • Laptops and desktops contain a motherboard (main circuit board), CPU (often under a heat sink/fan), RAM sticks, power supply, and storage drives.
  • Optical drives (CD/DVD) are less common now due to flash media.
  • Internal connections include SATA cables (for storage devices) and PCI slots (for expansion cards).

Key Terms & Definitions

  • Binary — A numbering system using only 0s and 1s (base 2).
  • Bit — The smallest unit of data, representing 0 or 1.
  • Byte — A group of eight bits.
  • ASCII — A code mapping numbers to letters/symbols.
  • Unicode — An extended character encoding supporting global scripts and emojis.
  • CPU (Central Processing Unit) — The main processor performing all computations.
  • Core — An independent processing unit within a CPU.
  • RAM (Random Access Memory) — Fast, volatile memory for active data and programs.
  • Nonvolatile Storage — Memory that retains data without power (e.g. HDD, SSD).
  • Cache — Small, fast memory (L1, L2, L3) closer to the CPU for temporary storage.
  • Register — The smallest, fastest memory inside the CPU for immediate operations.
  • Motherboard — The main circuit board connecting all components.
  • Device Driver — Software enabling OS to communicate with hardware.
  • Operating System (OS) — Software managing computer hardware and user interface.
  • USB (Universal Serial Bus) — Standard for data and power connections.
  • SATA — Cable/interface connecting storage devices to the motherboard.

Action Items / Next Steps

  • Review diagrams of computer hardware components and memory hierarchies.
  • Familiarize yourself with the binary-to-decimal conversion process.
  • Explore your computer's system information to see CPU, RAM, and storage details.