Fundamentals of Hardware and Computer Science

Apr 8, 2025

Lecture Notes: Hardware and Computer Science Fundamentals

Memory and Storage

Memory Cache

  • High-speed memory external to the processor.
  • Stores data that the processor will need again.

Primary Memory

  • Directly accessed by the CPU.
  • Contains RAM and ROM.
  • Allows temporary storage of applications and services.

RAM (Random Access Memory)

  • Faster access time compared to secondary devices.
  • Volatile memory; data can be changed by the user/computer.
  • Stores data or part of an application/OS temporarily.
  • Larger RAM = faster computer operation.

ROM (Read Only Memory)

  • Permanent, non-volatile memory.
  • Cannot be written to or changed.
  • Stores data needed when the computer is turned on, like BIOS.

Embedded Systems

  • Miniature computer systems within a larger system.
  • Perform specific functions, unlike general-purpose computers.

Secondary Storage Devices

  • Not directly accessible by the CPU.
  • Non-volatile memory, larger than primary memory.
  • Slower data access time compared to primary memory.

Principle Operations of Hardware Devices

Laser Printer

  • Uses a laser beam to draw an image on a photosensitive drum.
  • Toner sticks to the drum image, transferred to paper, and fused with heat.

3D Printer

  • Builds objects from a digital file by adding layers of material.

Microphone & Speaker

  • Microphone: Converts sound waves into electrical signals.
  • Speaker: Converts electrical signals into sound waves.

Storage Devices

  • Magnetic Hard Disk: Data encoded as magnetic patterns on platters.
  • Solid State Memory: Uses NAND-based flash memory.
  • Optical Disc Reader/Writer: Uses lasers to read/write data on discs.

Touchscreen

  • Input and output device with capacitive and resistive types.
    • Capacitive: Good visibility, multi-touch capability.
    • Resistive: Inexpensive, allows gloved/stylus input.

Virtual Reality Headset

  • Simulates a 3D environment, allowing movement via head/controller.

Buffers

  • Temporary storage to balance input/output speeds.

Sensors

  • Input devices that measure physical properties.
  • Convert analogue data to digital using ADCs.

Processor Fundamentals

von Neumann Architecture

  • CPU accesses memory directly.
  • Programs stored in memory can be executed sequentially.

CPU Components

  • Control Unit (CU): Manages data flow within the CPU.
  • Arithmetic Logic Unit (ALU): Performs calculations and logical operations.
  • Registers: High-speed storage within the CPU.
  • Cache: Stores frequently used instructions.

System Bus

  • Transfers data between computer components.
  • Types: Address bus, data bus, control bus.

Factors Affecting CPU Performance

  • Number of cores, bus width, clock speed, cache size.

Overclocking

  • Increasing CPU clock speed to enhance performance.
  • Risks include overheating and instruction execution issues.

Assembly Language

  • Machine code is the only language a CPU can understand.
  • Assembly language uses mnemonics for easier programming.

Addressing Modes

  • Absolute, direct, indirect, indexed, immediate, relative, symbolic.

Bit Manipulation

  • Shift operations: logical, arithmetic, cyclic shifts.
  • Used in monitoring and control systems for flag management.

Ethics and Ownership

Computer Ethics

  • Intellectual property rights, privacy issues, effect on society.

Software Copyright and Licensing

  • Software is copyright-protected; unauthorized copying is illegal.
  • DRM and software licenses control software usage and distribution.

Artificial Intelligence (AI)

  • AI impacts public perception, transport, criminal justice, advertising.

Databases

Relational Database Modelling

  • Use of tables, tuples, attributes, primary and foreign keys.

Normalization

  • 1NF, 2NF, 3NF: Ensures data integrity and reduces redundancy.

SQL Commands

  • DDL and DML for database creation, querying, and maintenance.

Networks and Communication

Networking Models and Topologies

  • Client-server and peer-to-peer models.
  • Bus, star, mesh, and hybrid topologies.

Networking Hardware

  • Switches, routers, NICs, WAPs, repeaters.

Internet and WWW

  • Difference between internet and WWW.
  • Use of IP addresses and DNS.

Security, Privacy, and Data Integrity

  • Importance of data security and measures such as encryption, firewalls.

Threats to Security

  • Malware, spyware, phishing, hacking, and their prevention.

System Software

Operating Systems

  • Provide user interfaces and manage resources.

Language Translators

  • Convert high-level languages to machine code.
  • Types: Assemblers, compilers, interpreters.

Security Tools

  • Use of firewalls, anti-malware, digital signatures to protect data.