Computer Basics - Von Neumann Architecture. Centr..
Computer Basics - Von Neumann Architecture. Centr..
Computer Basics:
1. Von Neumann Architecture
The Von Neumann architecture, also known as the Princeton architecture, is a fundamental
design for electronic digital computers. It was conceived by mathematician John von Neumann
in 1945.
Key Features:
● Stored Program Concept: Both instructions (program) and data are stored in the same
memory space. This allows the computer to easily modify its own programs, a powerful
concept that enables general-purpose computing.
● Sequential Execution: Instructions are typically fetched and executed one after another
from memory.
● Single Address Space: A single bus is used for both data and instructions. This means
that at any given time, the CPU can either fetch an instruction or fetch/store data, but not
both simultaneously. This can lead to a bottleneck, known as the "Von Neumann
bottleneck."
Components:
● Central Processing Unit (CPU): The "brain" of the computer that executes instructions.
○ Arithmetic Logic Unit (ALU): Performs arithmetic operations (addition,
subtraction, etc.) and logical operations (AND, OR, NOT).
○ Control Unit (CU): Directs and coordinates the operations of the computer,
fetching instructions from memory, decoding them, and then executing them.
○ Registers: Small, high-speed storage locations within the CPU used to temporarily
hold data and instructions during processing.
● Memory Unit: Stores both data and instructions.
● Input/Output (I/O) Unit: Facilitates communication between the computer and the
outside world (e.g., keyboard, mouse, monitor, printer).
3. Memory Hierarchy
Memory hierarchy is a way to organize and manage computer memory based on speed, cost,
and capacity. The goal is to provide the CPU with fast access to data while keeping the overall
cost down.
Levels (typically from fastest/most expensive/smallest to slowest/cheapest/largest):
● Registers: Smallest, fastest, most expensive. Directly inside the CPU.
● Cache Memory (L1, L2, L3): Faster than main memory, smaller capacity, more
expensive. Acts as a high-speed buffer between the CPU and main memory. Stores
frequently accessed data and instructions.
○ L1 Cache: Smallest and fastest cache, often integrated directly into the CPU chip.
○ L2 Cache: Larger and slightly slower than L1, can be on-chip or a separate chip.
○ L3 Cache: Largest and slowest cache, typically shared by multiple CPU cores.
● Main Memory (RAM): The primary working memory of the computer. Larger capacity
than cache, slower than cache, less expensive. Volatile (data is lost when power is off).
● Secondary Storage (Hard Drives, SSDs, Optical Discs): Non-volatile (data persists
even when power is off). Largest capacity, slowest, cheapest per unit of storage. Used for
long-term storage of programs and data.
Principle of Locality: The memory hierarchy works efficiently due to the principle of locality,
which states that: * Temporal Locality: If an item is referenced, it will tend to be referenced
again soon. * Spatial Locality: If an item is referenced, items whose addresses are close by will
tend to be referenced soon.
5. Types of RAM
● SRAM (Static RAM):
○ Uses latches (flip-flops) to store data.
○ Does not need to be refreshed periodically.
○ Faster than DRAM.
○ More expensive and consumes more power than DRAM.
○ Typically used for cache memory (L1, L2, L3).
● DRAM (Dynamic RAM):
○ Uses capacitors to store data.
○ Needs to be refreshed periodically (thousands of times per second) to retain data,
as capacitors slowly discharge.
○ Slower than SRAM.
○ Less expensive and consumes less power than SRAM.
○ Typically used for main memory (system RAM).
○ Sub-types of DRAM:
■ SDRAM (Synchronous DRAM): Synchronized with the CPU clock,
improving performance.
■ DDR SDRAM (Double Data Rate SDRAM): Transfers data on both the rising
and falling edges of the clock signal, effectively doubling the data transfer
rate compared to SDRAM. Subsequent versions (DDR2, DDR3, DDR4,
DDR5) offer increased speeds and reduced power consumption.
7. Types of ROM
● Mask ROM (MROM):
○ Programmed during the manufacturing process.
○ Data is permanently "etched" into the chip.
○ Cannot be changed after manufacturing.
○ Used for large production runs where the content is fixed (e.g., embedded
systems).
● PROM (Programmable ROM):
○ Blank chips that can be programmed once by the user using a special device called
a PROM programmer.
○ Once programmed, the data cannot be changed.
● EPROM (Erasable Programmable ROM):
○ Can be erased by exposing the chip to strong ultraviolet (UV) light.
○ Once erased, it can be reprogrammed.
○ Identifiable by a small quartz window on top of the chip.
● EEPROM (Electrically Erasable Programmable ROM):
○ Can be erased electrically (byte by byte or in blocks) and reprogrammed without
removing it from the circuit.
○ Slower to write than RAM.
○ Used for storing BIOS/UEFI settings, firmware for microcontrollers, and flash
memory.
● Flash Memory:
○ A type of EEPROM that can be erased and reprogrammed in blocks, rather than
byte by byte.
○ Much faster for erasing and writing than traditional EEPROM.
○ Widely used in solid-state drives (SSDs), USB flash drives, memory cards, and
smartphones.
8. Characteristics of Computers
Computers possess several key characteristics that make them powerful and versatile tools:
● Speed: Computers can perform calculations and process data at incredibly high speeds
(millions or billions of operations per second).
● Accuracy: They are highly accurate and can perform computations without errors,
provided the input data and programs are correct.
● Diligence: Unlike humans, computers do not suffer from boredom, fatigue, or lack of
concentration. They can perform repetitive tasks tirelessly and consistently.
● Versatility: Computers are capable of performing a wide range of tasks, from complex
scientific calculations to word processing, gaming, and multimedia. They can be adapted
to various applications.
● Reliability: Modern computers are generally highly reliable and can operate for long
periods without failure.
● Automation: Once programmed, computers can perform tasks automatically without
human intervention.
● Storage Capability: Computers can store vast amounts of data for long periods, which
can be retrieved quickly when needed.
9. Evolution of Computers
The evolution of computers can be traced through significant breakthroughs and technological
advancements:
● Early Mechanical Calculators:
○ Abacus: Ancient calculating tool.
○ Pascaline (1642): Blaise Pascal's mechanical calculator for addition and
subtraction.
○ Leibniz Calculator (1671): Gottfried von Leibniz improved on Pascaline, adding
multiplication and division.
○ Jacquard Loom (1801): Joseph Marie Jacquard used punched cards to control
patterns in weaving, a precursor to programmable machines.
○ Difference Engine & Analytical Engine (1820s-1830s): Charles Babbage's
designs for mechanical general-purpose computers. Ada Lovelace worked on
algorithms for the Analytical Engine.
● Electromechanical Computers (Pre-1940s):
○ Mark I (1944): Howard Aiken and IBM developed the first large-scale automatic
digital computer in the US, using electromechanical relays.
● Electronic Computers (Post-1940s): The invention of the electronic vacuum tube
marked a significant shift.
10. Generation of Computers
Computer evolution is often categorized into "generations," each defined by a major
technological advancement in their core components:
● First Generation (1940s-1950s): Vacuum Tubes
○ Technology: Vacuum tubes for circuitry and magnetic drums for memory.
○ Characteristics: Enormous size, generated a lot of heat, consumed a lot of power,
slow processing speed, limited programming capabilities (machine language),
expensive.
○ Examples: ENIAC, UNIVAC I.
● Second Generation (1950s-1960s): Transistors
○ Technology: Transistors replaced vacuum tubes.
○ Characteristics: Smaller, faster, more reliable, less heat, lower power
consumption, programmed using assembly language and early high-level
languages (FORTRAN, COBOL). Magnetic core memory.
○ Examples: IBM 7000 series, CDC 1604.
● Third Generation (1960s-1970s): Integrated Circuits (ICs)
○ Technology: Integrated Circuits (ICs) combined multiple transistors on a single
silicon chip.
○ Characteristics: Much smaller, faster, more powerful, multi-programming
capabilities, introduction of operating systems, development of more high-level
languages.
○ Examples: IBM System/360, DEC PDP-8.
● Fourth Generation (1970s-Present): Microprocessors (VLSI)
○ Technology: Microprocessors, using Very Large Scale Integration (VLSI)
technology, packed millions of transistors onto a single chip.
○ Characteristics: Personal computers (PCs) became widely available, graphical
user interfaces (GUIs), networking, internet, increased processing power, smaller
size, affordability.
○ Examples: Apple Macintosh, IBM PC.
● Fifth Generation (Present and Beyond): Artificial Intelligence (AI) / Parallel
Processing
○ Technology: Focus on parallel processing, super conductors, artificial intelligence
(AI), natural language processing, quantum computing.
○ Characteristics: Aim for intelligent systems that can learn, reason, and understand
natural language. Development of more powerful and intuitive user interfaces.
○ Examples: AI-powered systems, quantum computers (in development).
22. Software
Software is a set of instructions, data, or programs used to operate computers and execute
specific tasks. It is the intangible component of a computer system.
Categories:
● System Software: Designed to manage and control the computer hardware and provide
a platform for application software.
○ Operating System (OS): The most crucial system software (explained next).
○ Device Drivers: Programs that enable the OS to communicate with specific
hardware devices (e.g., printer drivers, graphics card drivers).
○ Utilities: Programs that assist in maintaining and optimizing computer performance
(e.g., antivirus software, disk defragmenters, file compression tools).
○ Firmware: Software permanently stored on a hardware device (e.g., BIOS, router
firmware).
● Application Software: Designed to perform specific tasks for the user.
○ Word Processors: Microsoft Word, Google Docs.
○ Spreadsheets: Microsoft Excel, Google Sheets.
○ Web Browsers: Chrome, Firefox, Edge.
○ Media Players: VLC, Windows Media Player.
○ Games: All video games.
○ Graphic Design Software: Adobe Photoshop, GIMP.
○ Business Applications: CRM, ERP systems.
23. Hardware
Hardware refers to the physical components of a computer system that you can touch and see.
It's the tangible part of the computer.
Main Categories:
● Input Devices: Allow users to enter data and commands into the computer.
○ Examples: Keyboard, mouse, microphone, scanner, webcam, touch screen.
● Output Devices: Display or present information from the computer to the user.
○ Examples: Monitor, printer, speakers, projector.
● Processing Devices (CPU): The "brain" of the computer that executes instructions.
○ Examples: CPU (Processor).
● Memory Devices: Store data and instructions temporarily or permanently.
○ Examples: RAM, ROM.
● Storage Devices (Secondary Storage): Store data permanently for long-term use.
○ Examples: Hard Disk Drives (HDDs), Solid State Drives (SSDs), USB flash drives,
optical drives (CD/DVD/Blu-ray).
● Motherboard: The main circuit board that connects all the other hardware components
and allows them to communicate.
● Power Supply Unit (PSU): Supplies electrical power to all components of the computer.
● Expansion Cards: Circuit boards that add extra functionality to the computer (e.g.,
graphics card, network card, sound card).