How does a computer work? Let us look inside a computer, one part at a time, to find out. A computer can have a monitor, a keyboard and a mouse. Inside, it is built from a few main parts, and two of them are a CPU and memory. A program is a list of instructions for a computer.
How does a CPU do its work? Let us find out. Here is how it works. It repeats a cycle over and over. First it fetches an instruction. Then it executes it. A programmer writes the list, and the CPU follows it. It can add two numbers too. This is a simple picture, because a real computer has more parts and steps.
Now let us look at bits, one small piece at a time, to see how a computer keeps things. A bit is the smallest piece of computer storage. It holds a 0 or a 1. Binary is a number system that uses only 0 and 1. A byte is a group of 8 bits. It can store one letter, such as A. Each extra bit doubles the number of different patterns that bits can make.
Now let us see where a computer keeps the things it uses and the things it saves. RAM is fast memory that holds the programs and files a computer is using right now. When the power is turned off, RAM loses what it holds. A hard drive stores bits as magnetic patterns on a spinning disk. Files that have been saved on the drive are still there when the power goes off.
Now let us see how a picture works, one small piece at a time. A picture on a computer screen is made of many tiny squares, which are called pixels. Inside the computer, a picture is stored as a long list of numbers. Things such as pictures are stored with only 0s and 1s.
Words to know
- fetches: goes and gets
- executes: carries out
- pixels: tiny squares
- binary: zeros and ones
The short version
A computer is built from a few main parts, including a CPU and memory. The CPU runs a program by repeating a cycle: fetch an instruction, then execute it. Inside a computer, things such as pictures are stored with only 0s and 1s, and a bit is the smallest piece of computer storage.
Quick facts
- A program is a list of instructions for a computer.
- A bit is the smallest piece of computer storage, and it holds a 0 or a 1.
- A byte is a group of 8 bits.
- RAM loses what it holds when the power is turned off, but files saved on a drive are still there.
How does a computer run a program?
The CPU runs a program by repeating a cycle: fetch an instruction, then execute it. The instructions are written by a programmer, and the CPU can add two numbers.
How are RAM and a hard drive different?
RAM is fast memory that holds the programs and files a computer is using right now, and it loses what it holds when the power is turned off. A hard drive stores bits as magnetic patterns on a spinning disk, and saved files are still there when the power goes off.