introduction to computer science
What Computers Actually Do
A simple mental model for how computers work: input, processing, storage, and output.
Most people use computers every day but rarely stop to ask a simple question:
What is a computer actually doing?
When you send a message, open a game, watch a video, or run a program, a lot is happening behind the scenes. But surprisingly, almost everything a computer does can be explained with a very simple model.
Understanding this model will make everything else in computer science easier to understand.
What a Computer Really Is
At its core, a computer is just a machine that processes information.
That’s it.
It receives information, performs operations on that information, stores some of it, and produces results.
This applies to nearly every digital device you can think of.
| Device | What it Processes |
|---|---|
| Laptop | Documents, programs, web pages |
| Smartphone | Messages, apps, photos |
| ATM | Banking transactions |
| Game console | Game logic, graphics |
| Smart thermostat | Temperature data |
Even massive systems like search engines or social networks are just very large computers processing huge amounts of information.
The Four Things Every Computer Does
No matter how simple or complex the system is, computers always perform four fundamental tasks.
graph LR
A[Input] --> B[Processing]
B --> C[Storage]
B --> D[Output]
Let’s break these down.
Input — Getting Information Into the System
Before a computer can do anything, it needs input.
Input is simply data entering the system.
Examples of input include:
| Input Source | Example |
|---|---|
| Keyboard | Typing a message |
| Mouse | Clicking a button |
| Camera | Taking a photo |
| Microphone | Recording voice |
| Network | Receiving data from the internet |
For example, when you search for something online:
- You type a query.
- Your browser sends that text to a server.
That text is input to the system.
Processing — Doing the Work
Once the computer receives input, it needs to do something with it.
This is called processing.
Processing is performed by the CPU (Central Processing Unit), which executes instructions from programs.
Examples of processing include:
- Adding numbers
- Sorting data
- Rendering images
- Running game physics
- Deciding which video to recommend next
Programs are essentially lists of instructions that tell the computer how to process information.
graph TD
A[Program Instructions] --> B[CPU Executes]
B --> C[Results Produced]
You’ll learn much more about programs and instructions later in the Programming guide.
Storage — Remembering Information
Computers also need to store data.
Without storage, a computer would forget everything the moment it finished processing.
There are two main kinds of storage:
| Type | Example | Purpose |
|---|---|---|
| RAM | Memory used while programs run | Temporary storage |
| Disk | SSD or HDD | Long-term storage |
For example, when you open a game:
- The game files are stored on your disk.
- They are loaded into RAM.
- The CPU processes them while the game runs.
Storage allows computers to remember things between operations.
Output — Showing the Result
Finally, the computer produces output.
Output is how the computer communicates results back to the user or another system.
Examples include:
| Output | Example |
|---|---|
| Display | Text, images, videos |
| Speakers | Music or sound effects |
| Printer | Printed documents |
| Network | Data sent to another computer |
If you type a message and press send:
- The keyboard provides input
- The program processes the message
- The message is stored
- The message appears on the screen
That last step is output.
A Real Example: Watching a Video
Let’s see how these four steps work in a real situation.
Imagine you open a video on a streaming platform.
graph TD
A[Click Video] --> B[Request Sent to Server]
B --> C[Server Processes Request]
C --> D[Video Data Retrieved]
D --> E[Video Sent to Your Device]
E --> F[Video Displayed on Screen]
Behind the scenes:
| Step | What Happens |
|---|---|
| Input | You click the video |
| Processing | Servers locate the video |
| Storage | Video file retrieved from storage |
| Output | Video appears on your screen |
Even extremely large systems still follow the same simple pattern.
Programs: The Instructions Behind Everything
So who tells the computer what to do?
Programs do.
A program is simply a set of instructions written by a programmer.
For example, a very simple calculator program might do something like this:
read number A
read number B
add A and B
display result
These instructions are written in programming languages like:
- C
- Python
- JavaScript
- Java
Programming languages exist because writing raw machine instructions would be extremely difficult for humans.
You’ll explore this in depth in the Programming Guide.
Why This Model Matters
You might be wondering why this simple model is important.
It turns out that nearly every concept in computer science builds on this idea.
When you later study:
- Operating Systems → they manage how programs use CPU, memory, and storage
- Databases → they organize stored information efficiently
- Networking → they move input and output across machines
- Programming → it defines how processing should happen
Understanding how computers input, process, store, and output information gives you a mental framework for understanding all of these systems.
What Comes Next
Now that you understand what computers fundamentally do, the next step is understanding what computers are made of.
In the next chapter we will explore the difference between hardware and software, and how they work together to run modern computer systems.