Foundations Of Computing-Module 1

Foundations Of Computing: From Hardware Essentials To Web Design

Module 1: Computer Architecture

Overview of Computer Architecture

  • Based on the Von Neumann architecture

  • Key components include:

    • Central Processing Unit (CPU)

    • Memory

    • Input/Output devices

    • Interconnections

1. Central Processing Unit (CPU)

CPU Functionality

  • The brain of the computer, responsible for executing instructions.

  • Composed of three main subcomponents:

    • Arithmetic Logic Unit (ALU):

      • Performs arithmetic (addition, subtraction, multiplication, division) and logical operations (AND, OR, NOT, XOR).

      • Works with data from registers/memory.

    • Control Unit (CU):

      • Directs activities, decodes instructions and manages execution order.

      • Sends control signals to ALU, memory, and I/O devices.

  • Registers:

    • High-speed storage inside the CPU for temporary data holding.

    • Common registers include:

      • Accumulator (ACC)

      • Instruction Register (IR)

      • Program Counter (PC)

2. Memory

Memory Types

  • Primary Memory (RAM):

    • Temporary, volatile storage for tasks in execution.

  • Secondary Memory:

    • Non-volatile storage (e.g., HDDs, SSDs) for long-term retention.

  • Cache Memory:

    • Small, fast memory that stores frequently accessed data to speed processing.

3. Input/Output (I/O) Devices

  • Input Devices: Facilitate user interaction (e.g., keyboard, mouse).

  • Output Devices: Display computed results (e.g., monitor, printer).

  • I/O devices communicate via controllers and buses.

4. System Bus

Bus Functionality

  • Buses are data transfer pathways for communication between components:

    • Data Bus: Transfers actual data.

    • Address Bus: Transfers memory addresses.

    • Control Bus: Transfers control signals from CU.

5. Interaction Flow

  • Steps:

    1. Fetch: CPU fetches instructions from memory using the PC.

    2. Decode: CU decodes the instruction and prepares execution.

    3. Execute: ALU performs the operation; results stored in registers/memory.

    4. I/O: Data is sent/received from I/O devices.

6. Memory Hierarchy

Memory Levels

  • Organized based on speed, cost, and capacity in a hierarchical structure:

    1. Registers: Fastest, extremely small, very expensive.

    2. Cache Memory: Very fast (L1, L2, L3), small, high cost.

    3. Main Memory (RAM): Moderate speed and size, volatile, moderate cost.

    4. Secondary Storage: Large storage (HDDs, SSDs), slower, low cost.

    5. Tertiary Storage: Very large storage, slowest, very low cost.

    6. Virtual Memory: Uses disk space as an extension of RAM.

Important Concepts

  • Performance Optimization: Faster memory proximity to the CPU speeds up data access.

  • Cost Efficiency: High-speed memory usage is limited to manage costs.

  • Data Prioritization: Frequently used data is kept in faster memory.

Registers in CPU Architecture

  • Definition: Small storage areas within the CPU for holding data and instructions.

  • Importance: Registers facilitate fast access, enhancing performance.

  • Types of Registers:

    • General-Purpose Registers (GPRs): Versatile use in tasks.

    • Special-Purpose Registers include:

      • Instruction Register (IR)

      • Program Counter (PC)

      • Memory Address Register (MAR)

      • Memory Data Register (MDR)

      • Status Register (PSR)

  • Usage in Computation:

    1. Data fetched from memory stored in registers.

    2. Operations performed, results stored in registers or memory.

Cache Memory

Overview

  • Definition: Fast memory for operational data; reduces CPU wait times for data.

  • Levels: L1, L2, L3 caches organized hierarchically based on proximity and speed.

  • Process:

    • Check cache before accessing RAM; optimize access via LRU/FIFO strategies.

RAM (Random Access Memory)

Functionality

  • Definition: Volatile memory for actively used data.

  • Importance: Affects performance during multitasking and application usage.

  • Types:

    • Dynamic RAM (DRAM): E.g., SDRAM, DDR SDRAM.

    • Static RAM (SRAM): Used in CPU cache due to speed.

Virtual Memory

Concept

  • Definition: Technique using secondary storage as extended RAM.

  • How It Works: Utilizes paging and swapping to manage limited RAM usage.

  • Advantages: Improves multitasking performance with cost-effective memory utilization.

Motherboard

Role

  • Definition: Central hub connecting all components.

  • Key Components:

    • CPU socket

    • RAM slots

    • Chipset managing data flow

    • Storage and expansion connectors

  • Types: Variations include ATX, Micro-ATX, Mini-ITX depending on form factor and layout.

Input and Output Devices

Explanation

  • Input Devices: Gather user input (e.g., keyboard, mouse).

  • Output Devices: Present results (e.g., monitors, printers).

Storage Devices

  • Types:

    1. HDD: Traditional, affordable with large capacity; slower speed.

    2. SSD: Faster with no moving parts; more expensive.

    3. Optical Storage: Media like CDs/DVDs for archival purpose.

Interface Cards

Definition

  • Function: Hardware components enhancing functionality; connects to motherboard.

  • Examples: NIC for networking, graphics card, sound card.

Buses

Overview

  • Definition: Communication pathways connecting components.

  • Types:

    • Data Bus: Data transfer

    • Address Bus: Memory addressing

    • Control Bus: Control signals coordination

Firmware

Explanation

  • Definition: Permanent software controlling hardware; enables interface with the operating system.

  • Characteristics: Device-specific, low-level operations, updatable in modern devices.

Boot Process

Steps

  1. POST: Hardware self-check at startup.

  2. BIOS/UEFI Initialization: Prepares the system components.

  3. Locating Bootloader: Loads operating system start.

  4. Kernel Initialization: Loads core operating system components.

  5. OS Initialization: Sets up user interface for interaction.

I/O Communication and Device Management

Communication Methods

  1. I/O Ports: Facilitates data transfer.

  2. Device Controllers: Manage specific I/O device operations.

  3. Communication Methods:

  • Programmed I/O

  • Interrupt-Driven I/O

  • Direct Memory Access (DMA)

Device Management Objectives

  • Ensures device efficiency, error handling, and uniform communication across devices.