---
title: "What Is a Computer?"
book: "Primary & Middle School Computer Science"
subject: computer-science
language: en
chapter: 1
exercises: 11
source: https://one-course.com/books/computer-science/1/en/chapter/1-what-is-a-computer
license: CC-BY-NC-SA-4.0
credit: "One Computer Science Book, One Course (one-course.com)"
---

# Chapter 1 — What Is a Computer?

It is Saturday morning, and Mia is counting the [computers](#def-g1-what-is-a-computer-computer) in her kitchen. There is the laptop on the table: one. There is her father’s phone next to it: two. “That’s all,” says Mia.

“Not at all,” says her father. “There is a [computer](#def-g1-what-is-a-computer-computer) inside the washing machine. There is one in the oven, which knows when to stop. And there is one inside the car key in that bowl.” Mia looks again. She cannot see these [computers](#def-g1-what-is-a-computer-computer), but they are there. What is a [computer](#def-g1-what-is-a-computer-computer), if it can hide inside a washing machine?

![A family kitchen. How many computers can you find? Some of them are hidden inside other machines.](https://one-course.com/images/onecourse/chapters/computer-science-1/g1-what-is-a-computer/img-bbce145a1426.jpg)

*A family kitchen. How many [computers](#def-g1-what-is-a-computer-computer) can you find? Some of them are hidden inside other machines.*

## 1.1 Computers around us

Some [computers](#def-g1-what-is-a-computer-computer) are easy to see. A *desktop [computer](#def-g1-what-is-a-computer-computer)* stays on a desk, with a big screen, a keyboard and a mouse. A *laptop* folds shut and can be carried in a bag. A tablet is a flat screen you touch with your fingers. A phone is a small [computer](#def-g1-what-is-a-computer-computer) that also makes calls.

**Definition 1.1 (Computer).**

A *computer* is a machine that follows instructions to work on information: it takes information in, changes it, keeps it, and gives information back out.

Many [computers](#def-g1-what-is-a-computer-computer) are hidden. They are small, and they live inside other machines: a washing machine, an oven, a car, a lift, a toy that talks, a traffic light. You never see their screen, because most of them have none. They are still [computers](#def-g1-what-is-a-computer-computer): each one follows its instructions.

**Example 1.2 (Computers in Mia’s kitchen).**

In Mia’s kitchen there are at least five [computers](#def-g1-what-is-a-computer-computer): the laptop, the phone, the washing machine’s [computer](#def-g1-what-is-a-computer-computer), the oven’s [computer](#def-g1-what-is-a-computer-computer) and the car key’s [computer](#def-g1-what-is-a-computer-computer). Only two of them have a screen. The bowl, the table and the chairs are not [computers](#def-g1-what-is-a-computer-computer): they follow no instructions at all.

![Two computers that are easy to see: a desktop computer, with its screen, keyboard and mouse, and a laptop, which folds shut.](https://one-course.com/images/onecourse/chapters/computer-science-1/g1-what-is-a-computer/fig-2caa450761c7.svg)

*Two [computers](#def-g1-what-is-a-computer-computer) that are easy to see: a desktop [computer](#def-g1-what-is-a-computer-computer), with its screen, keyboard and mouse, and a laptop, which folds shut.*

## 1.2 A machine that follows instructions

What do all these [computers](#def-g1-what-is-a-computer-computer) have in common? Each of them follows instructions. People write the instructions, and the [computer](#def-g1-what-is-a-computer-computer) carries them out exactly, one after the other.

A [computer](#def-g1-what-is-a-computer-computer) is very fast: it can carry out many millions of instructions in one second. It never gets tired and never gets bored. But it does nothing else than what its instructions say. If the instructions say “stop the drum after one hour”, the washing machine’s [computer](#def-g1-what-is-a-computer-computer) stops the drum after one hour, even if the clothes are still dirty.

**Remark 1.3 (A computer does not think for us).**

When a [computer](#def-g1-what-is-a-computer-computer) does something surprising, it is still following its instructions. Somebody wrote them, and maybe made a mistake. Finding and fixing such mistakes is part of the work of the people who write instructions for [computers](#def-g1-what-is-a-computer-computer).

**History — The first computers filled a room.**

One of the first electronic [computers](#def-g1-what-is-a-computer-computer) was shown to the public in 1946. It was called ENIAC. It filled a whole room, about 9 metres by 15 metres, and weighed about 27 tonnes. It had 18 000 glass valves that lit up and grew warm. To give it new instructions, its operators plugged cables in and set switches by hand. Today a phone is millions of times faster and fits in a pocket.

![ENIAC, one of the first electronic computers. Two of its operators, Glen Beck and Betty Snyder, are giving it new instructions. U.S. Army photograph, public domain.](https://one-course.com/images/onecourse/chapters/computer-science-1/g1-what-is-a-computer/img-6b5d8e0ad308.jpg)

*ENIAC, one of the first electronic [computers](#def-g1-what-is-a-computer-computer). Two of its operators, Glen Beck and Betty Snyder, are giving it new instructions. U.S. Army photograph, public domain.*

## 1.3 What goes in and what comes out

A [computer](#def-g1-what-is-a-computer-computer) works on information. Information goes in, the [computer](#def-g1-what-is-a-computer-computer) works on it, and information comes out.

**Definition 1.4 (Input and output).**

The *input* of a [computer](#def-g1-what-is-a-computer-computer) is the information that goes into it: a key pressed, a click, a word spoken, a photo taken. The *output* of a [computer](#def-g1-what-is-a-computer-computer) is the information that comes out of it: letters on a screen, a sound, a picture, a printed page, a motor that turns.

![Information goes in, the computer works on it, and information comes out. Three examples.](https://one-course.com/images/onecourse/chapters/computer-science-1/g1-what-is-a-computer/fig-de9632d07364.svg)

*Information goes in, the [computer](#def-g1-what-is-a-computer-computer) works on it, and information comes out. Three examples.*

**Example 1.5 (The washing machine).**

The washing machine’s [computer](#def-g1-what-is-a-computer-computer) has several [inputs](#def-g1-what-is-a-computer-input). One is the turn of the dial that chooses the kind of wash. Another is the level of the water in the drum, which the machine measures by itself. Its [outputs](#def-g1-what-is-a-computer-input) are the motor that turns the drum, the tap that lets water in, and a little beep at the end.

## 1.4 The parts we can see and touch

A [computer](#def-g1-what-is-a-computer-computer) is connected to the things we use to talk to it and to the things it uses to answer us.

**Definition 1.6 (Input device and output device).**

An *input device* is a part that brings [input](#def-g1-what-is-a-computer-input) into a [computer](#def-g1-what-is-a-computer-computer): a keyboard, a mouse, a touchpad, a microphone, a camera. An *output device* is a part that takes [output](#def-g1-what-is-a-computer-input) out of a [computer](#def-g1-what-is-a-computer-computer): a screen, a speaker, headphones, a printer.

Some parts do both jobs. A touch screen shows pictures, so it is an [output device](#def-g1-what-is-a-computer-device); when you touch it, it tells the [computer](#def-g1-what-is-a-computer-computer) where your finger is, so it is also an [input device](#def-g1-what-is-a-computer-device). A headset with a microphone is the same: the speakers are [output](#def-g1-what-is-a-computer-input), the microphone is [input](#def-g1-what-is-a-computer-input).

![Sorting the parts of a computer: input devices, output devices, and devices that do both.](https://one-course.com/images/onecourse/chapters/computer-science-1/g1-what-is-a-computer/fig-334e6fb46c74.svg)

*Sorting the parts of a [computer](#def-g1-what-is-a-computer-computer): [input devices](#def-g1-what-is-a-computer-device), [output devices](#def-g1-what-is-a-computer-device), and devices that do both.*

![A desk with a tablet, headphones and a mouse. Which ones are input devices, and which are output devices?](https://one-course.com/images/onecourse/chapters/computer-science-1/g1-what-is-a-computer/img-f9042240ba2b.jpg)

*A desk with a tablet, headphones and a mouse. Which ones are [input devices](#def-g1-what-is-a-computer-device), and which are [output devices](#def-g1-what-is-a-computer-device)?*

## 1.5 Exercises

**Exercise 1.1 ★.**

Which of these objects contain a [computer](#def-g1-what-is-a-computer-computer)? A lamp with a plain switch, a phone, an oven that stops by itself after the cooking time, a wooden chair, a car.

**Solution of Exercise 1.1.**

The phone, the oven that stops by itself and the car contain a [computer](#def-g1-what-is-a-computer-computer). The lamp with a plain switch and the wooden chair follow no instructions: no [computer](#def-g1-what-is-a-computer-computer).

**Exercise 1.2 ★.**

[Input device](#def-g1-what-is-a-computer-device) or [output device](#def-g1-what-is-a-computer-device)? A keyboard, a screen, a mouse, a printer, a microphone, a speaker, a camera, headphones.

**Solution of Exercise 1.2.**

[Input devices](#def-g1-what-is-a-computer-device): the keyboard, the mouse, the microphone, the camera. [Output devices](#def-g1-what-is-a-computer-device): the screen, the printer, the speaker, the headphones.

**Exercise 1.3 ★.**

Lina takes a photo with a tablet, and the photo appears on its screen. What is the [input](#def-g1-what-is-a-computer-input)? What is the [output](#def-g1-what-is-a-computer-input)?

**Solution of Exercise 1.3.**

[Input](#def-g1-what-is-a-computer-input): the picture that the camera takes (and Lina’s touch on the button). [Output](#def-g1-what-is-a-computer-input): the photo shown on the screen.

**Exercise 1.4 ★.**

Why is a touch screen both an [input device](#def-g1-what-is-a-computer-device) and an [output device](#def-g1-what-is-a-computer-device)?

**Solution of Exercise 1.4.**

It shows pictures to us ([output](#def-g1-what-is-a-computer-input)), and it tells the [computer](#def-g1-what-is-a-computer-computer) where our finger touches it ([input](#def-g1-what-is-a-computer-input)).

**Exercise 1.5 ★.**

Look at the drawing of the desktop [computer](#def-g1-what-is-a-computer-computer) and the laptop. Name three parts of the desktop [computer](#def-g1-what-is-a-computer-computer) and two parts of the laptop.

**Solution of Exercise 1.5.**

Desktop [computer](#def-g1-what-is-a-computer-computer): the screen, the keyboard, the mouse. Laptop: two of the screen, the camera, the touchpad (and its keyboard).

**Exercise 1.6 ★.**

Name three [computers](#def-g1-what-is-a-computer-computer) you could find in a school.

**Solution of Exercise 1.6.**

For example: the [computers](#def-g1-what-is-a-computer-computer) of the [computer](#def-g1-what-is-a-computer-computer) room, the teacher’s laptop, the tablets of the class, the photocopier, the [computer](#def-g1-what-is-a-computer-computer) inside the school bell or the heating.

**Exercise 1.7 ★.**

Tom says: “A [computer](#def-g1-what-is-a-computer-computer) always has a screen.” Is he right? Give an example.

**Solution of Exercise 1.7.**

No. Many [computers](#def-g1-what-is-a-computer-computer) have no screen: the [computer](#def-g1-what-is-a-computer-computer) inside a washing machine, a car key or a toy.

**Exercise 1.8 ★.**

Sami speaks to a phone: “Play my favourite song.” The song plays. What is the [input](#def-g1-what-is-a-computer-input), what is the [output](#def-g1-what-is-a-computer-input), and which devices are used?

**Solution of Exercise 1.8.**

[Input](#def-g1-what-is-a-computer-input): Sami’s spoken words, through the microphone (an [input device](#def-g1-what-is-a-computer-device)). [Output](#def-g1-what-is-a-computer-input): the song, through the speaker (an [output device](#def-g1-what-is-a-computer-device)).

**Exercise 1.9 ★★.**

A pocket calculator: you press keys and the answer appears on a small screen. Is it a [computer](#def-g1-what-is-a-computer-computer)? Explain with the words “follows instructions”, “[input](#def-g1-what-is-a-computer-input)” and “[output](#def-g1-what-is-a-computer-input)”.

**Solution of Exercise 1.9.**

Yes. Its [input](#def-g1-what-is-a-computer-input) is the keys you press; it follows instructions to work out the answer; its [output](#def-g1-what-is-a-computer-input) is the answer on its screen.

**Exercise 1.10 ★★.**

Name two [inputs](#def-g1-what-is-a-computer-input) and two [outputs](#def-g1-what-is-a-computer-input) of a washing machine’s [computer](#def-g1-what-is-a-computer-computer).

**Solution of Exercise 1.10.**

[Inputs](#def-g1-what-is-a-computer-input): the turn of the dial, the level of the water in the drum. [Outputs](#def-g1-what-is-a-computer-input): the motor that turns the drum, the tap that lets water in, the beep at the end.

**Exercise 1.11 ★★.**

Invent a toy robot that rolls on the floor and stops when it touches a wall. What goes into its [computer](#def-g1-what-is-a-computer-computer)? What comes out?

**Solution of Exercise 1.11.**

In: “the robot touches a wall” (and the button that starts it). Out: the motors that turn its wheels, which stop when it touches the wall.
