Lesson 1.1: Hardware vs Software
Duration: 45 minutes
Learning Objectives
After completing this lesson, you will be able to:
- Explain what hardware is and identify common hardware components
- Explain what software is and how it differs from hardware
- Understand how hardware and software work together
- Identify the basic components inside a computer
Introduction
When you use your computer, phone, or tablet, you're actually interacting with two very different things at the same time: hardware and software. Understanding this distinction is your first step toward understanding how computers work and, eventually, how to program them.
Think of it this way: hardware is what you can touch, software is what you can't.
Main Content
What is Hardware?
Hardware refers to the physical parts of a computer — the things you can see, touch, and hold. If you dropped it on your foot, it would hurt. That's hardware.
Common hardware components include:
| Component | What It Does | Analogy |
|---|---|---|
| CPU (Central Processing Unit) | The "brain" that performs calculations | A very fast calculator |
| RAM (Random Access Memory) | Short-term memory for active tasks | Your desk where you work |
| Storage (SSD/HDD) | Long-term memory for files | A filing cabinet |
| Motherboard | Connects all components together | The nervous system |
| Power Supply | Provides electricity to components | The heart |
| Monitor | Displays information | The window to see inside |
| Keyboard/Mouse | Input devices | Your hands and voice |
Inside Your Computer
┌─────────────────────────────────────────────────────────────┐
│ COMPUTER CASE │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ CPU │ │ RAM │ │ Storage │ │
│ │ (Brain) │ │ (Desk) │ │ (Cabinet) │ │
│ └──────┬──────┘ └──────┬──────┘ └──────┬──────┘ │
│ │ │ │ │
│ └──────────────────┼──────────────────┘ │
│ │ │
│ ┌────────┴────────┐ │
│ │ MOTHERBOARD │ │
│ │ (Nervous System)│ │
│ └────────┬────────┘ │
│ │ │
│ ┌────────┴────────┐ │
│ │ POWER SUPPLY │ │
│ │ (Heart) │ │
│ └─────────────────┘ │
└─────────────────────────────────────────────────────────────┘
↕ ↕ ↕
[Monitor] [Keyboard] [Mouse]
(Output) (Input) (Input)
What is Software?
Software is the set of instructions that tells the hardware what to do. You can't touch software — it exists as code, patterns of ones and zeros stored in your computer's memory.
Types of software:
- Operating Systems (Windows, macOS, Linux) — Manage the hardware and provide a platform for other software
- Applications (Chrome, Word, Spotify) — Programs that help you accomplish tasks
- Drivers — Translators that help the operating system communicate with specific hardware
The Kitchen Analogy
Imagine your computer is a kitchen:
| Kitchen | Computer |
|---|---|
| Appliances (oven, fridge, blender) | Hardware |
| Recipes | Software |
| Chef (you) | The user |
| The act of cooking | Processing |
The hardware (appliances) can do nothing useful on its own. You need recipes (software) to create something meaningful. And the recipes are worthless without the appliances to execute them.
How They Work Together
When you click on an app icon:
- Input → Your mouse (hardware) sends a signal
- Processing → The CPU (hardware) reads the software instructions
- Memory → RAM (hardware) holds the app while it runs
- Storage → The app's code is loaded from your SSD/HDD (hardware)
- Output → The monitor (hardware) displays the result
User Action → Hardware Input → Software Instructions → Hardware Processing → Hardware Output
(click) (mouse) (app code) (CPU + RAM) (monitor)
Why Does This Matter for Programming?
When you write code, you're writing software. Your code will tell the hardware what to do. Understanding this relationship helps you:
- Write more efficient programs
- Debug problems (is it a hardware issue or a software issue?)
- Understand error messages
- Make better decisions about what your program needs
Practice Exercise
Task
Look around at the devices near you. For each one, try to identify:
- What hardware components it has
- What software might be running on it
Example:
| Device | Hardware | Software |
|---|---|---|
| Smartphone | Screen, battery, processor, camera, speakers | iOS/Android, apps like Instagram, Safari |
| Smart TV | Screen, speakers, processor, remote receiver | TV operating system, Netflix app, YouTube app |
Your Turn
Fill in this table for 3 devices you can see right now:
| Device | Hardware Components | Software Running |
|---|---|---|
| 1. | ||
| 2. | ||
| 3. |
Hint
Think about: What can you physically touch? What needs electricity to work? What parts do the job of input (receiving information), processing, and output (showing results)?Key Takeaways
- Hardware is the physical equipment — the parts you can touch
- Software is the instructions that tell hardware what to do
- The CPU is the brain that processes instructions
- RAM is fast, temporary memory; Storage is slower, permanent memory
- Hardware and software are useless without each other — they work as a team
- When you write code, you're writing software that controls hardware
Resources
| Resource | Type | Difficulty |
|---|---|---|
| How Computers Work - Code.org | Video Series | Beginner |
| Inside Your Computer - TED-Ed | Video | Beginner |
| Computer Hardware Basics - GCFGlobal | Tutorial | Beginner |