Learning Objectives
By the end of this lesson, you will be able to:
- Show understanding of the need for primary memory and secondary storage (including removable storage)
- Describe the principal operations of hardware devices including: hard disk, solid state (flash) memory, and optical disc reader/writer
- Explain differences between RAM and ROM, including their use in a range of devices
- Explain differences between SRAM and DRAM, including reasons for using one instead of the other
- Explain differences between PROM, EPROM, and EEPROM
- Show understanding of embedded systems, including their benefits and drawbacks
- Show understanding of the use of buffers in computer systems
Key Terms
Primary Memory
Memory that can be accessed directly by the CPU (RAM, ROM, Cache)
Secondary Storage
Non-volatile storage not directly accessible by CPU (HDD, SSD, optical discs)
RAM (Random Access Memory)
Volatile read-write memory used to hold data and programs currently in use
ROM (Read Only Memory)
Non-volatile permanent memory used to store BIOS and startup programs
DRAM (Dynamic RAM)
RAM that needs constant refreshing, uses capacitors to store bits
SRAM (Static RAM)
Faster RAM that doesn't need refreshing, uses flip-flops to store bits
PROM
Programmable ROM that can be programmed once by burning fuses
EPROM
Erasable PROM that can be rewritten using ultraviolet light
EEPROM
Electrically Erasable PROM that can be rewritten using electricity
Embedded System
A microprocessor installed in devices to control operations efficiently
Buffer
Temporary storage that functions as a queue for data transmission
SSD (Solid State Drive)
Storage with no moving parts that uses NAND or NOR based flash memory
Computer System Hardware Functionality
A computer system has to support three major areas of operational capability:
Storage of Data
Keeping data for future use
Processing of Data
Carried out by the CPU
Input and Output
Getting data in and out of the system
Data Output Options
- Screen Display
- Hardcopy using printer/plotter
- Virtual headset display
- Speaker
- Writing to any data storage devices
Data Input Options
- Keyboard
- User interaction with a screen (pointing device or touch screen)
- Game controller
- Scanner
- Microphone
- Reading from any storage devices
Real-Life Example: Smartphone System
Input
- Touch screen taps
- Microphone for voice
- Camera for photos
Processing
- CPU processes app commands
- GPU renders graphics
- AI chip for facial recognition
Output
- Screen shows images
- Speaker plays sounds
- Storage saves photos
Storage Devices Overview
A storage device is a piece of computer equipment that stores information and data. It is an integral part of computer hardware—without which a computer would not be able to run or even boot up.
Key Characteristics of Storage Devices
- Can hold information both temporarily and permanently
- Can be internal or external to a computer
- Storage needs to be larger than internal memory since users may wish to store large files
- Can be removable to allow data to be transferred between computers
- Allow users to store important data for backup in different locations
Examples of Storage Devices
Hard Disk
Solid State
Optical Disc
Flash Drive
Types of Computer Memory
Primary (Main) Memory
- Part of computer memory which can be accessed directly from CPU
- Used to store data, files, part of an application or part of operating system currently in use
- Examples: Random Access Memory (RAM), Read-Only Memory (ROM), Cache Memory
- Cache Memory: External to processor, used to store data which processor will probably need to use again
- Cache memory has faster access speed than main memory and is built using SRAM technology
Secondary Memory
- Storage devices that are not directly accessible by CPU
- Non-volatile devices which allow data to be stored as long as required by user
- Without secondary storage, all programs and data would be lost when computer is switched off
- Much larger than primary memory but data access time is considerably slower
- Stores all applications, operating system, device drivers and general files
Real-Life Analogy: School Desk System
Primary Memory (Desk Top)
- Books you're currently using
- Fast access but limited space
- Cleared at end of day (volatile)
Cache (Hand)
- Pen you're currently writing with
- Extremely fast access
- Very limited capacity
Secondary Storage (School Locker)
- All your textbooks and notebooks
- Slow to access but huge capacity
- Contents remain over time (non-volatile)
Random Access Memory (RAM)
Key Features of RAM
- Read-Write Memory: Can be read from or written to any number of times
- Direct Access: Any byte of data stored can be accessed without affecting other bytes
- Volatile: Contents are lost when computer is switched off
- Current Use: Used to hold data and programs that are currently in use
- Performance: Larger RAM = faster computer operation
- RAM never runs out of memory but becomes slower as more data is stored
Real-Life RAM Example
Think of RAM like a whiteboard in a classroom:
- Teacher writes information during class (data loaded into RAM)
- Students can quickly read the information (CPU accesses RAM)
- Information can be erased and rewritten (RAM is read-write)
- At the end of the day, the whiteboard is wiped clean (RAM is volatile)
- A bigger whiteboard allows more information at once (more RAM = better performance)
DRAM vs SRAM
Dynamic RAM (DRAM)
- Consists of millions of transistors and capacitors
- Capacitors hold bits of information (0 or 1)
- Needs to be constantly refreshed because capacitors lose charge
- If not refreshed, capacitor's charge leaks away quickly, leaving value 0
- Common type of RAM used in computers
- Less expensive to manufacture than SRAM
Static RAM (SRAM)
- Does not need to be constantly refreshed
- Uses flip-flops which hold each bit of memory
- Much faster than DRAM for data access
- Used where absolute speed is essential (processor's memory cache)
- More complex circuitry than DRAM
- Consumes less power unless accessed at high frequency
| DRAM (Dynamic RAM) | SRAM (Static RAM) |
|---|---|
| Uses transistors and capacitors | Uses flip-flops to hold each bit |
| Needs constant refreshing | Does not need refreshing |
| Less complex circuitry | More complex circuitry |
| Consumes more power (needs refreshing) | Consumes less power (unless accessed frequently) |
| Less expensive to manufacture | More expensive to manufacture |
| Slower data access time | Faster data access time |
| Higher memory capacity | Lower memory capacity |
| Used in main system memory | Used in processor cache memory |
Activity 1: RAM vs ROM Comparison
Complete the comparison table between RAM and ROM:
| Feature | RAM | ROM |
|---|---|---|
| Type of memory | Permanent memory device | |
| Volatility | Non-volatile | |
| Read/Write capability | Allows both read and write | |
| Typical use | Stores BIOS and startup data |
Also explain why a computer needs both RAM and ROM to function properly.
Solution:
| Feature | RAM | ROM |
|---|---|---|
| Type of memory | Temporary memory device | Permanent memory device |
| Volatility | Volatile memory | Non-volatile |
| Read/Write capability | Allows both read and write | Read-only (cannot write to it) |
| Typical use | Stores data, files, programs currently in use | Stores BIOS and startup data |
Why both are needed: ROM stores permanent instructions needed to start the computer (BIOS), while RAM provides temporary workspace for running programs. Without ROM, the computer wouldn't know how to start up. Without RAM, there would be no space to run programs efficiently.
Check Your Understanding: RAM
1. Why is RAM called "volatile" memory? [2 marks]
Answer
- [1 mark] RAM is volatile because its contents are lost when power is removed
- [1 mark] When the computer system is switched off, all data stored in RAM is erased
- [Additional] This contrasts with non-volatile memory like ROM or SSDs which retain data without power
2. What is the main difference between DRAM and SRAM? [3 marks]
Answer
- [1 mark] DRAM needs to be constantly refreshed to maintain data, while SRAM does not
- [1 mark] DRAM uses capacitors to store bits, while SRAM uses flip-flops
- [1 mark] SRAM is faster but more expensive than DRAM
- [Additional] SRAM is used in cache memory, while DRAM is used in main system memory
3. Why does DRAM need to be constantly refreshed? [2 marks]
Answer
- [1 mark] DRAM uses capacitors to store bits of information (0 or 1)
- [1 mark] Capacitors gradually lose their charge over time, so they need to be recharged (refreshed) to maintain data
- [Additional] If not refreshed, the capacitor's charge leaks away, changing bit values from 1 to 0
Read Only Memory (ROM)
Key Features of ROM
- Non-volatile: Contents are not lost after powering off computer
- Permanent memory: Contents cannot be changed (read-only)
- Startup storage: Used to store data needed when computer powers up
- BIOS storage: Stores Basic Input/Output System (BIOS)
- Bootstrap program: Stores program that runs immediately when system is switched on
Real-Life ROM Example
Think of ROM like a printed instruction manual:
- The manual comes with the product (ROM comes with computer)
- You can read it but not change it (read-only)
- It contains essential startup instructions (BIOS)
- It doesn't disappear when you turn off the lights (non-volatile)
- You need it to know how to start using the product
Types of ROM
1. Mask ROM
- Programs/data installed during manufacturing
- If different contents needed, chip must be replaced
- Cannot be altered after production
2. PROM
- Programmable ROM - can be altered once
- Uses matrix of fuses
- Programming requires PROM writer (burns fuses)
- Used in mobile phones, RFID tags
3. EPROM
- Erasable Programmable ROM
- Can be rewritten using ultraviolet light
- Must be removed from device to erase/rewrite
- Must be entirely erased before rewriting
- Used in applications under development
4. EEPROM
- Electrically Erasable Programmable ROM
- Can be rewritten and erased using electricity voltage
- Major advantage: chip can remain in circuit while contents changed
- Still used as read-only in normal operation
- Used in embedded systems for firmware updates
ROM Applications
- Computer BIOS (Basic Input/Output System)
- Bootstrap loader program
- Firmware in embedded systems
- Mobile phone system software
- Game console firmware
- Industrial control systems
Activity 2: ROM Types Comparison
Match each ROM type with its correct description:
ROM Types:
- PROM
- EPROM
- EEPROM
- Mask ROM
Descriptions:
- Can be erased and rewritten using ultraviolet light
- Programmed during manufacturing, cannot be changed
- Can be programmed once by burning fuses
- Can be erased and rewritten electrically while in circuit
Also explain which type would be most suitable for: a) A mobile phone that needs occasional software updates b) A simple electronic toy with fixed functionality
Solution:
Matching:
- PROM - Can be programmed once by burning fuses
- EPROM - Can be erased and rewritten using ultraviolet light
- EEPROM - Can be erased and rewritten electrically while in circuit
- Mask ROM - Programmed during manufacturing, cannot be changed
Suitability:
a) Mobile phone: EEPROM - allows firmware updates without removing the chip
b) Electronic toy: Mask ROM - fixed functionality, no updates needed, cheapest option
Secondary Storage Devices
Characteristics of Secondary Storage
- Not directly accessible by CPU - data must be loaded into RAM first
- Non-volatile - data remains when power is off
- Essential for permanent storage - without it, all data would be lost at shutdown
- Much larger capacity than primary memory
- Slower access time than RAM and ROM
- Stores applications, OS, device drivers, and general files
Categories of Secondary Storage
Magnetic Storage
Internal/External Hard Disk Drives
Solid State Storage
SSD, USB flash drives, memory cards
Optical Storage
CD, DVD, Blu-ray discs
Hard Disk Drives (HDD)
HDD Components
- Platters: Magnetic surfaces that store data in digital format
- Read-Write Heads: Access all surfaces in disk drive
- Actuator Arms: Move heads over platter surfaces
- Cushion of Air: Prevents head from touching platter surface
- Tracks: Concentric circular paths on platters
- Sectors: Smaller areas within tracks containing fixed bytes
HDD Performance Factors
- Latency: Time for sector to rotate to read-write head
- Fragmentation: When sectors allocated to a file are not adjacent
- Defragmentation: Software that "tidies up" disk sectors
- Direct Access Device: Can access any sector directly
- Data in given sector is read sequentially
HDD Structure Visualization
This visualization shows how data is organized on a hard disk drive:
Tracks are concentric circles, sectors are segments within tracks. Fragmentation occurs when file parts are scattered across different sectors.
Solid State Drives (SSD)
SSD Characteristics
- No moving parts - all data retrieved at same rate
- Non-volatile rewritable memory
- Data stored as 0s and 1s in millions of tiny transistors
- Does not rely on magnetic properties
- NAND-based memory chips: Read/erase blocks of data
- NOR-based memory chips: Access data at bit/byte level
SSD Benefits vs HDD
- More reliable (no moving parts)
- Considerably lighter (suitable for laptops)
- Lower power consumption
- Run much cooler than HDDs
- Very thin (no moving parts)
- Access data considerably faster
SSD Drawbacks
- Longevity limitations: Most rated at only 20GB write operations per day over 3 years
- SSD endurance: Limited number of write cycles
- Not suitable for servers with huge daily write operations
- More expensive per GB than HDDs
Optical Storage Media
CDs
- Red laser (780nm wavelength)
- Single spiral track from center to edge
- Data stored in pits and lands
- Lands reflect = binary 1, pits scatter = binary 0
- ~700MB capacity
DVDs
- Red laser (650nm wavelength)
- Dual layering increases capacity
- Smaller pits and track width than CDs
- Single layer: 4.7GB, Dual layer: 8.5GB
- Two layers joined with polycarbonate spacer
Blu-ray
- Blue laser (405nm wavelength)
- Much smaller pits and lands
- Stores up to 5x more data than DVD
- Secure encryption system prevents piracy
- 25GB (single layer) to 128GB (quad layer)
Check Your Understanding: Secondary Storage
1. Why is secondary storage necessary in a computer system? [2 marks]
Answer
- [1 mark] Secondary storage provides non-volatile storage that retains data when power is off
- [1 mark] Without secondary storage, all programs and data would be lost when the computer is switched off
- [Additional] It has much larger capacity than primary memory for storing applications, OS, and files
2. What is disk fragmentation and how does it affect performance? [3 marks]
Answer
- [1 mark] Fragmentation occurs when sectors allocated to a file are not adjacent to each other
- [1 mark] It happens over time through numerous deletions and editing operations
- [1 mark] It causes gradual decline in HDD performance as it takes longer to access scattered data
- [Additional] Defragmentation software can improve performance by reorganizing data
3. What are the main advantages of SSDs over HDDs? [3 marks]
Answer
- [1 mark] SSDs have no moving parts, making them more reliable
- [1 mark] They access data considerably faster than HDDs
- [1 mark] They are lighter, consume less power, and run cooler than HDDs
- [Additional] They are thinner and better suited for portable devices like laptops
4. How does a Blu-ray disc store more data than a DVD? [2 marks]
Answer
- [1 mark] Blu-ray uses a blue laser with shorter wavelength (405nm vs 650nm for DVD)
- [1 mark] The shorter wavelength allows much smaller pits and lands, increasing storage capacity
- [Additional] Blu-ray can store up to 5 times more data than a DVD
Embedded Systems
What are Embedded Systems?
- Involve installing microprocessors into devices
- Enable operations to be controlled more efficiently
- Devices can be activated by web-enabled devices (mobile phones)
- Examples: Cookers, refrigerators, central heating systems
- Can be controlled remotely via apps
Features of Embedded Systems
- Dedicated to a single task / limited number of functions
- Built into a larger system / integrated into larger system
- Must contain a processor, memory, and I/O capability
- Usually dedicated to one task with no requirement for OS
- Consume very little power
| Pros of Embedded Systems | Cons of Embedded Systems |
|---|---|
| Small in size, easy to fit into devices | Difficult to upgrade devices to take advantage of new technology |
| Relatively low cost to make | Troubleshooting faults becomes a specialist task |
| Usually dedicated to one task, no OS requirement | Devices accessible over internet are open to hackers and viruses |
| Consume very little power | Often thrown away rather than repaired due to upgrade/fault difficulties |
Real-Life Embedded System: Smart Home
Smart Thermostat
- Controls heating/cooling
- Learns your schedule
- Can be controlled via phone
- Uses EEPROM for settings
Smart Refrigerator
- Monitors food inventory
- Suggests recipes
- Controls temperature zones
- Can reorder groceries
Smart TV
- Integrated computer system
- Runs streaming apps
- Voice control capability
- Example of embedded system
Buffers
What are Buffers?
- Temporary storage created for data transmitted between system parts
- Functions as a queue
- Solves problem when data can be sent more quickly than received
- Data enters buffer before being transmitted to destination
- Data emerges in order it entered buffer
- Typically created in computer memory
Real-Life Buffer Example
Think of a buffer like a conveyor belt at a supermarket checkout:
- Items are placed on the belt (data enters buffer)
- The belt holds items temporarily (buffer stores data)
- Items move in the order they were placed (FIFO - First In First Out)
- The cashier processes items at their own speed (receiver processes data)
- Prevents items from piling up at the cashier (prevents data loss)
Check Your Understanding: Embedded Systems
1. Why are modern televisions considered embedded systems? [3 marks]
Answer
- [1 mark] An embedded system is integrated into the TV hardware
- [1 mark] It is a combination of hardware and software designed for specific TV functions
- [1 mark] The system is not easily changed/updated by the TV owner
- [Additional] Contains microprocessor, memory, and I/O capabilities dedicated to TV operations
2. What is one benefit of using EEPROM in embedded systems? [2 marks]
Answer
- [1 mark] EEPROM can be erased and reprogrammed several times, allowing firmware updates
- [1 mark] It can be reprogrammed/updated without removing it from the device
- [Additional] No additional equipment is needed to change contents, enabling updates by non-technical users
3. What is the purpose of a buffer in a computer system? [2 marks]
Answer
- [1 mark] A buffer provides temporary storage for data being transmitted between system components
- [1 mark] It solves the problem when data can be sent more quickly than it can be received
- [Additional] It functions as a queue, ensuring data emerges in the order it entered
Key Takeaways
- Primary memory (RAM, ROM, Cache) is directly accessible by CPU and stores currently used data and programs
- Secondary storage (HDD, SSD, optical) is non-volatile, has larger capacity but slower access than primary memory
- RAM is volatile read-write memory that loses data when power is off, while ROM is non-volatile read-only memory that retains data
- DRAM needs constant refreshing and is used in main memory, while SRAM is faster, doesn't need refreshing and is used in cache
- PROM can be programmed once, EPROM can be erased with UV light, EEPROM can be erased electrically while in circuit
- HDDs use magnetic platters with read-write heads, suffer from fragmentation, and have moving parts
- SSDs have no moving parts, are faster and more reliable than HDDs, but have limited write endurance
- Optical storage (CD, DVD, Blu-ray) uses lasers to read pits and lands, with shorter wavelengths allowing higher capacity
- Embedded systems are dedicated computer systems built into devices, with pros (small, low power) and cons (hard to upgrade)
- Buffers are temporary storage areas that help manage data flow between system components operating at different speeds
Question Bank
1. Explain the differences between RAM and ROM. [4 marks]
Marking Scheme & Answer
- [1 mark] RAM is temporary/volatile memory, while ROM is permanent/non-volatile memory
- [1 mark] RAM allows both read and write operations, while ROM is read-only
- [1 mark] RAM loses contents when power is off, ROM retains contents without power
- [1 mark] RAM stores data/programs currently in use, ROM stores BIOS/startup programs
- [Additional] RAM can be increased to improve speed, ROM size is fixed
2. Compare and contrast DRAM and SRAM. [6 marks]
Marking Scheme & Answer
DRAM:
- Uses transistors and capacitors
- Needs constant refreshing
- Less complex circuitry
- Consumes more power
- Less expensive
- Slower access time
- Higher capacity
- Used in main memory
SRAM:
- Uses flip-flops
- Doesn't need refreshing
- More complex circuitry
- Consumes less power
- More expensive
- Faster access time
- Lower capacity
- Used in cache memory
3. Describe how data is stored on a hard disk drive. [5 marks]
Marking Scheme & Answer
- [1 mark] Data is stored in digital format on magnetic surfaces of platters
- [1 mark] Bits are arranged in concentric circular paths called tracks
- [1 mark] Each track is broken into smaller areas called sectors
- [1 mark] Read-write heads access surfaces, attached to actuator arms
- [1 mark] A cushion of air prevents heads from touching platter surfaces
- [Additional] Hard drive stores map of used/free sectors for data allocation
4. What are the advantages and disadvantages of SSDs compared to HDDs? [6 marks]
Marking Scheme & Answer
SSD Advantages:
- More reliable (no moving parts)
- Considerably lighter
- Lower power consumption
- Run much cooler
- Very thin
- Access data faster
SSD Disadvantages:
- Longevity limitations (SSD endurance)
- Limited write operations per day
- Not suitable for servers with huge writes
- More expensive per GB
5. Explain the differences between PROM, EPROM, and EEPROM. [6 marks]
Marking Scheme & Answer
PROM:
- Programmable ROM
- Can be altered once
- Uses matrix of fuses
- Programmed by burning fuses
- Used in mobile phones, RFID
EPROM:
- Erasable PROM
- Can be rewritten using UV light
- Must be removed to erase
- Must be entirely erased first
- Used in development applications
EEPROM:
- Electrically Erasable PROM
- Can be rewritten using electricity
- Can remain in circuit
- Still used as read-only
- Used in embedded systems
6. What are embedded systems and what are their main characteristics? [5 marks]
Marking Scheme & Answer
- [1 mark] Embedded systems involve installing microprocessors into devices for efficient control
- [1 mark] Dedicated to a single task or limited number of functions
- [1 mark] Built into a larger system / integrated into larger system
- [1 mark] Must contain a processor, memory, and I/O capability
- [1 mark] Usually dedicated to one task with no operating system requirement
- [Additional] Examples: smart TVs, smart home devices, industrial controllers
7. What is the purpose of a buffer in a computer system? [3 marks]
Marking Scheme & Answer
- [1 mark] A buffer is temporary storage for data transmitted between system parts
- [1 mark] It functions as a queue, ensuring data emerges in the order it entered
- [1 mark] It solves the problem when data can be sent more quickly than received
- [Additional] Typically created in computer memory to manage data flow between components
8. How do optical storage devices like CDs and DVDs store and read data? [4 marks]
Marking Scheme & Answer
- [1 mark] Red laser light reads/writes data from/to disk surface
- [1 mark] Data stored in pits and lands on a single spiral track
- [1 mark] Lands reflect light back (binary 1), pits scatter laser beam (binary 0)
- [1 mark] Sensor detects reflected light to read data
- [Additional] DVDs use dual layering and smaller pits for increased capacity