Computers ยท Lesson 2

Hardware, Memory & Storage

Open up the computer! Meet the devices that take information in and send it out, the CPU that thinks with lightning speed, and the memories that remember โ€” some only for a moment, some for years.

~40 min read6 quick checksTest: 20 questions

1Input, output โ€” or both?

A computer talks to the world through devices (also called peripherals). Ask one question about each device: does it send information into the computer, or bring it out?

INPUT KeyboardMouseScannerMicrophoneWebcamBarcode reader CPUprocesses OUTPUT MonitorPrinterSpeakersHeadphonesProjectorPlotter BOTH: Touch screen
Information flows in through input devices and out through output devices.

2Input devices & the keyboard

Keyboard
Used to type letters, numbers and commands. Most keyboards are QWERTY keyboards โ€” named after the first six letters on the top letter row.
Mouse
A pointing device. Move it to move the pointer; click, double-click, right-click, drag and scroll. Invented by Douglas Engelbart in 1964.
Scanner
Copies a paper page or photo into the computer as a picture.
Barcode reader
Reads the black-and-white stripes (barcode) on a product, so the price appears at once โ€” used at supermarket counters.
Microphone
Takes in sound, such as your voice.
Webcam / digital camera
Take in pictures and videos, for example in a video call.
Joystick
A stick used to play games and control movement.
Light pen
A pen-shaped device used to point or draw directly on the screen.
Touchpad
The flat pad on a laptop that works like a mouse.
Biometric (fingerprint) scanner
Reads your fingerprint to check who you are.
MICR
Magnetic Ink Character Recognition โ€” banks use it to read the special numbers printed at the bottom of cheques.
Underside of a replica of Engelbart's wooden mouse, showing two metal wheels
A replica of Engelbart's first mouse, seen from below โ€” a wooden box with two metal wheels.Photo: Science Museum Group, CC BY 4.0 via Wikimedia Commons
A handheld barcode scanner reading the barcode on a package
A barcode reader scanning a package.Photo: IAEA Imagebank, CC BY-SA 2.0 via Wikimedia Commons

Special keys on the keyboard

Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 ` 1 2 3 4 5 6 7 8 9 0 - = Bksp Tab Q W E R T Y U I O P [ ] \ Caps Lock A S D F G H J K L ; ' Enter Shift Z X C V B N M , . / Shift Ctrl โŠž Alt Spacebar Alt Fn Ctrl
Purple = function keys ยท pink = toggle key ยท orange = modifier keys ยท green = editing keys.
Kind of keyKeysWhat they do
Function keysF1 to F12Special jobs in each program. F1 = Help, F2 = Rename, F5 = Refresh.
Toggle keysCaps Lock, Num Lock, Scroll LockPress once to turn ON, press again to turn OFF โ€” like a light switch. Caps Lock ON types CAPITAL letters.
Modifier (combination) keysShift, Ctrl, Alt, โŠž WinWork only while held down with another key: Shift + a = A; Ctrl + C = Copy.
Editing keysBackspace, Delete, InsertBackspace erases the character to the left of the cursor; Delete erases the character to the right.
Other important keysEnter, Spacebar, Tab, EscEnter starts a new line or says "OK"; Spacebar (the longest key) gives a space; Tab jumps forward; Esc cancels.
Navigation keysArrow keys, Home, End, Page Up, Page DownMove the cursor around the screen and page.
Numeric keypadKeys 0โ€“9 on the rightType numbers quickly, like a calculator โ€” works when Num Lock is ON.
โš ๏ธ Olympiad trap

Shift also gives capital letters โ€” but only while you hold it down, so it is a modifier key, not a toggle key. The toggle keys are Caps Lock, Num Lock and Scroll Lock.

At a shop, the cashier points a device at the stripes on a biscuit packet and the price appears. Which input device is it?

  1. Scanner
  2. Barcode reader
  3. Light pen
  4. Plotter
A barcode reader reads the pattern of stripes. A scanner copies a whole page as a picture, and a plotter is an output device.

3Output devices & printers

Monitor (VDU)
Shows text, pictures and videos โ€” the soft copy. Old monitors were bulky CRT ones; today's are thin, flat LCD and LED screens.
Printer
Prints output on paper โ€” the hard copy.
Plotter
Prints very large, detailed drawings like building plans, maps and charts.
Speakers & headphones
Give sound output. Headphones let only you hear it.
Projector
Shows the computer screen as a big picture on a wall or white screen.

Impact and non-impact printers

PrinterTypeHow it printsGood to know
Dot-matrixImpact (it hits the paper)Tiny pins strike an ink ribbon against the paper, making letters out of dots.Noisy, slow, cheap to run; can print carbon copies. Used for bills and bank passbooks.
InkjetNon-impactSprays tiny drops of liquid ink onto the paper.Quiet; good for colour photos at home.
LaserNon-impactA laser beam and dry toner powder, like a photocopier.Very fast, quiet and sharp โ€” used in offices and for desktop publishing (DTP).
An Epson dot-matrix printer with continuous paper
A dot-matrix printer โ€” an impact printer.Photo: Jud McCranie, CC BY-SA 4.0 via Wikimedia Commons
Remember: Dot-matrix = Dots hammered through a ribbon (noisy). Inkjet = Ink spray. Laser = Lightning fast with toner.
โš ๏ธ Olympiad trap

A scanner and a printer look alike but are opposites: the scanner is input (paper โ†’ computer), the printer is output (computer โ†’ paper). A keyboard with little lights on it is still only an input device.

Which printer uses dry toner powder and is the fastest of the three?

  1. Dot-matrix printer
  2. Inkjet printer
  3. Plotter
  4. Laser printer
Laser printers use toner powder and print very fast. Inkjets spray liquid ink; dot-matrix printers strike a ribbon with pins.

4The CPU โ€” the brain of the computer

The CPU (Central Processing Unit), also called the processor, does all the processing and controls every other part โ€” just like your brain controls your body. It is a small chip fixed on the main circuit board, the motherboard, inside the CPU cabinet. The CPU has three units:

CPU Control Unit (CU) directs everything ALU + โˆ’ ร— รทcompares 8 > 5? Memory Unit holds data &results for now Input Output
The three units of the CPU.
UnitJobThink of it asโ€ฆ
ALU โ€” Arithmetic Logic UnitDoes all calculations (+, โˆ’, ร—, รท) and comparisons (Is 8 greater than 5? Are they equal?).The calculator
CU โ€” Control UnitControls and directs the flow of data and instructions between all parts. It does no calculating itself.A traffic policeman
MU โ€” Memory UnitHolds the data, instructions and results that are being worked on right now.A notepad on the desk
โš ๏ธ Olympiad trap

"Which unit controls all the operations?" โ†’ Control Unit. "Which unit calculates or compares?" โ†’ ALU. The CU is the boss who gives orders, but it never does the sums!

An Intel Core 2 Duo processor chip held between two fingers
A laptop processor chip โ€” the whole CPU fits on your fingertip.Photo: Vitaly Zdanevich, CC0 via Wikimedia Commons

Which unit of the CPU checks whether 15 is greater than 12?

  1. Arithmetic Logic Unit
  2. Control Unit
  3. Input Unit
  4. Output Unit
Comparing is a logic job, so the ALU does it. The CU only directs the work.

5Bits, bytes and memory units

A computer stores everything โ€” words, pictures, songs โ€” as 0s and 1s. 0 stands for the OFF state and 1 for the ON state of electric signals. These two digits are called binary digits, or bits.

BitNibbleByte KBMBGBTB PBEBZBYB 4 bits8 bits ร—1024ร—1024ร—1024ร—1024 ร—1024ร—1024ร—1024ร—1024 smallest โ†’ largest
From the tiny bit to the giant yottabyte.
UnitEqual to
1 Nibble4 bits
1 Byte (B)8 bits
1 Kilobyte (KB)1024 bytes
1 Megabyte (MB)1024 KB
1 Gigabyte (GB)1024 MB
1 Terabyte (TB)1024 GB
1 Petabyte (PB)1024 TB
1 Exabyte (EB)1024 PB
1 Zettabyte (ZB)1024 EB
1 Yottabyte (YB)1024 ZB
Remember the big units: "Kind Monkeys Give Tasty Peanuts Every Zoo Year" โ†’ KB, MB, GB, TB, PB, EB, ZB, YB.
โœ๏ธ Worked examples
  1. 5 bytes = ? bits. 1 byte = 8 bits, so 5 ร— 8 = 40 bits.
  2. 3 GB = ? MB. Going to a smaller unit โ†’ multiply: 3 ร— 1024 = 3072 MB.
  3. 4096 KB = ? MB. Going to a bigger unit โ†’ divide: 4096 รท 1024 = 4 MB.
  4. 16 bits = ? nibbles = ? bytes. 16 รท 4 = 4 nibbles; 16 รท 8 = 2 bytes.
  5. Half a kilobyte = ? bytes. 1024 รท 2 = 512 bytes.
โš ๏ธ Olympiad trap

In computer memory, 1 KB = 1024 bytes, not 1000. If an option says "1 MB = 1000 KB", it is the everyday metric idea, not the computer rule. And watch the direction: bigger unit โ†’ smaller unit means multiply by 1024.

How many bits are there in 4 bytes?

  1. 16
  2. 24
  3. 32
  4. 4096
1 byte = 8 bits, so 4 bytes = 4 ร— 8 = 32 bits. (16 bits would be 4 nibbles.)

6Primary memory: RAM, ROM & cache

Computer memory is the place where a computer holds data and instructions. It is of two types: internal (primary) and external (secondary).

Internal memory โ€” also called primary or main memory โ€” is built from silicon chips fixed on the motherboard inside the CPU cabinet. The CPU uses it directly while working. It is of two types: RAM and ROM.

RAM โ€” Random Access Memory

Holds the programs and work you are using right now. When you start the computer, Windows is loaded into RAM; any program you open is loaded into RAM too.

It is volatile: everything in it is lost when the power goes off. The CPU can read and write it. Like a blackboard that is wiped and rewritten again and again. Common sizes: 2 GB, 4 GB, 8 GB and more.

ROM โ€” Read Only Memory

Holds the start-up instructions that prepare the computer for use and check that all parts are working when you switch it on.

It is non-volatile: it keeps its data even without power. Its instructions can only be read, not changed by the user. Like a traffic signal โ€” it always gives the same instructions.

RAMROM
Full formRandom Access MemoryRead Only Memory
Power off?Data is lost (volatile)Data stays (non-volatile)
Can we change it?Yes โ€” read and writeNo โ€” read only
What it holdsPrograms and files being used nowStart-up instructions (BIOS)
A green RAM stick with black memory chips and gold contacts
A RAM stick โ€” it plugs into the motherboard.Photo: An-d, CC BY-SA 3.0 via Wikimedia Commons
โœ๏ธ Real life

Priya was typing a story when the power went off. She had not saved it, so the story was lost. Why? Unsaved work lives in RAM, which is volatile. When you save, the work is copied to the hard disk, which keeps it. Save often! (Ctrl + S)

Cache memory

Cache memory is a very small, very fast memory placed between the CPU and RAM. It keeps the data and instructions the CPU uses most often, so the CPU does not have to wait. Fastest of all are the tiny registers inside the CPU itself.

Types of ROM you may meet: PROM (Programmable ROM โ€” written once), EPROM (Erasable PROM โ€” erased with ultraviolet light) and EEPROM (Electrically Erasable PROM).

Remember: RAM Runs Away Memory when power goes. ROM Remains On Memory.

Which memory keeps the computer's start-up instructions even when the power is switched off?

  1. RAM
  2. ROM
  3. Cache
  4. Registers
ROM is non-volatile and holds the start-up instructions. RAM, cache and registers are temporary.

7Secondary storage devices

External memory โ€” also called secondary or auxiliary memory โ€” stores data permanently. Data is not lost when the computer is switched off. We need it because internal memory is volatile and small. It is slower than RAM: when you run a program, it is first copied from secondary storage into RAM.

Memory Internal (Primary)temporary / start-up External (Secondary)permanent storage RAMROM Hard diskCD / DVD / Blu-ray Pen driveMemory card
Types of computer memory (as in your textbook).
โš ๏ธ Olympiad trap

The hard disk sits inside the CPU cabinet, yet it is external (secondary) memory! "External" here means secondary storage, not "outside the box". Internal memory means only RAM and ROM.

DeviceKindStores aboutGood to know
Hard disk (HDD)Magnetic512 GB, 1 TB, 5 TBโ€ฆMain storage, fixed inside the CPU cabinet. Spinning disks record data on both sides. Portable (external) hard disks are used for backups.
SSD (Solid-State Drive)Flash memory256 GB, 512 GB, 1 TBโ€ฆNo moving parts โ€” much faster than a hard disk; now used in most laptops.
CD (Compact Disc)Optical700 MBThin shiny disc, 4.7 inches (12 cm) across. Stores text, pictures, sound and video. Read in a CD drive.
DVD (Digital Versatile / Video Disc)Optical4.7 GB to 17 GBSame size as a CD but stores about 6 times more โ€” used for movies.
Blu-ray discOptical25 GB (single layer), 50 GB (dual layer)Named after the blue-violet laser that reads and writes it. For high-quality video and games.
Pen drive (flash drive)Flash memoryUp to 1 TBSmall, light, removable, plug and play. Fits the USB port. Used to carry files between computers. Faster and more reliable than CDs.
Memory card (SD card)Flash memory32 GB to 512 GBUsed in mobiles and cameras. A memory card reader connects it to a computer through a USB port.
Cloud storageOnlineAs much as you rentFiles are kept on faraway servers on the Internet (e.g. Google Drive, OneDrive) โ€” open them from any device with an Internet connection. Cloud storage is not AI, though AI can use data stored there.
Inside a hard disk: a shiny round platter and the arm that reads it
Inside a hard disk: the shiny spinning disk (platter) and the reading arm.Photo: Eric Gaba, CC BY-SA 3.0 via Wikimedia Commons
A small black and red USB pen drive
A pen drive plugs into a USB port.Photo: Evan-Amos, public domain via Wikimedia Commons
Remember the discs, small to big: CD (700 MB) โ†’ DVD (4.7 GB) โ†’ Blu-ray (25 GB). "Cats Dance Beautifully."

Rhea wants to take her project from the school lab to her home computer. Which device should she use?

  1. RAM
  2. ROM
  3. Pen drive
  4. Monitor
A pen drive is small, removable and plug-and-play through the USB port โ€” perfect for carrying files.

Watch & explore

8Quick recap

Flip cards

QuestionBrain of the computer?
AnswerCPU (Central Processing Unit)
QuestionWhich CPU unit is like a traffic policeman?
AnswerControl Unit (CU)
Question1 MB = ?
Answer1024 KB
Question4 bits make aโ€ฆ?
AnswerNibble (8 bits = 1 byte)
QuestionWhy is RAM called volatile?
AnswerIts data is lost when the power goes off.
QuestionHow much can a CD store?
AnswerUp to 700 MB
QuestionWhere does Blu-ray get its name?
AnswerFrom the blue-violet laser that reads and writes it
QuestionPrinter for big building plans?
AnswerPlotter
QuestionName a device that is both input and output.
AnswerTouch screen