Back to homeAP® Computer Science Principles · AP Computer Science Principles · Change subject
Start for free
AP CSP · AP® Computer Science Principles
Digital devices · Inside the computer

Computer architecture

You close a document without saving it and switch off the computer: the text you had written is gone. Maybe it happened to you before a big English essay was due. Why? The answer lies in how the parts inside the case share out the work.

The four main parts

Motherboard seen from above, with the CPU in its socket, three RAM modules and a data connector from which a cable runs to a storage drive; arrows show the exchange of data between CPU and RAM and the saving from RAM to the drive. motherboard CPU RAM (temporary) save drive (permanent)

Reading a spec sheet

A store listing says something like "3.0 GHz CPU, 8 GB RAM, 512 GB SSD". Each number tells you something different:

  • GHz (gigahertz) is the CPU's clock speed: billions of steps per second. Higher is usually faster, but the number of cores and the design matter too.

  • GB of RAM is how much working space you have for open programs.

  • GB or TB of storage is how much you can keep. $1\text{ TB} = 1{,}000\text{ GB}$.

Storage math

Storage questions are division. Convert units first, then divide.

Practice★☆☆Not started
Match each computer component with the task it performs: (a) CPU, (b) RAM, (c) hard drive or SSD, (d) motherboard. Tasks: 1. stores files in the long term, even when the…

Match each computer component with the task it performs: (a) CPU, (b) RAM, (c) hard drive or SSD, (d) motherboard. Tasks: 1. stores files in the long term, even when the computer is turned off; 2. executes program instructions, acting as the "brain" of the computer; 3. connects all the other components to each other; 4. temporarily stores the data being worked on at any given moment.

Solve
Practice★☆☆Not started
True or false? Justify each answer with a sentence: (a) RAM saves your photos even if you turn off the computer; (b) the CPU executes program instructions; (c) the…

True or false? Justify each answer with a sentence: (a) RAM saves your photos even if you turn off the computer; (b) the CPU executes program instructions; (c) the motherboard connects all the components together; (d) the hard drive loses all its contents every time the computer is turned off.

Solve
Practice★☆☆Not started
You close the document without saving and turn off the computer: the text you had written disappears. Explain what RAM has to do with this loss and what the "save"…

You close the document without saving and turn off the computer: the text you had written disappears. Explain what RAM has to do with this loss and what the "save" button actually does to prevent it.

Solve
Practice★☆☆Not started
Look up the specifications of a real computer (the one at home, in your classroom, or from an online store) and write down its CPU, RAM and storage. Explain in your own…

Look up the specifications of a real computer (the one at home, in your classroom, or from an online store) and write down its CPU, RAM and storage. Explain in your own words what each of these three pieces of information means.

Solve
Practice★★☆Not started
A computer has $16\ \text{GB}$ of RAM. Between the operating system ($4\ \text{GB}$), the browser ($3\ \text{GB}$) and a game ($6\ \text{GB}$), calculate how much RAM is…

A computer has $16\ \text{GB}$ of RAM. Between the operating system ($4\ \text{GB}$), the browser ($3\ \text{GB}$) and a game ($6\ \text{GB}$), calculate how much RAM is left free using the subtraction $16 - (4 + 3 + 6)$ and explain what might happen if you then open a program that requires $5\ \text{GB}$.

Solve
Practice★★☆Not started
A cell phone displays "storage almost full," and yet it has $8\ \text{GB}$ of free RAM. Explain why deleting apps and videos frees up storage but not RAM, and reason…

A cell phone displays "storage almost full," and yet it has $8\ \text{GB}$ of free RAM. Explain why deleting apps and videos frees up storage but not RAM, and reason which type of memory is filled by photos and videos.

Solve
Practice★★★Not started
A new cell phone has $128\ \text{GB}$ of total internal storage, but the operating system and basic apps already take up $28\ \text{GB}$. You want to use the remaining…

A new cell phone has $128\ \text{GB}$ of total internal storage, but the operating system and basic apps already take up $28\ \text{GB}$. You want to use the remaining free space exclusively to store high-quality photos, which take up an average of $4\ \text{MB}$ each.

  1. a) Knowing that $1\ \text{GB} = 1\,000\ \text{MB}$, calculate the theoretical maximum number of full photos you can store in the available free space. Show all calculations with their units.
  2. b) Your classmate claims that as long as you do not install any more apps, you will be able to store exactly that calculated amount. Technically refute their claim by explaining at least two real reasons why the usable capacity for photos will be lower.
Solve
Practice★★★Not started
The Technology department wants to record a school documentary using a camera that records video in 4K quality, generating approximately $375\ \text{MB}$ of data for…

The Technology department wants to record a school documentary using a camera that records video in 4K quality, generating approximately $375\ \text{MB}$ of data for each minute of recording. For this purpose, you have an empty $256\ \text{GB}$ memory card.

  1. a) Knowing that $1\ \text{GB} = 1\,000\ \text{MB}$, calculate how many hours and minutes of continuous recording theoretically fit on that card (show the development of the calculation with the decimal point).
  2. b) If the complete shoot requires recording $12$ hours of footage in total, how many $256\ \text{GB}$ cards will you need at a minimum? Justify your answer taking into account unforeseen events and the space required for formatting the cards.
Solve

The journey of data

When you double-click an icon, the data follows a specific path between the four parts.

Animation of the journey of data: a packet follows the arrows in order. Each box lights up when the packet arrives: click on the icon, drive to RAM, the CPU processes and it is displayed. 1. click onthe icon 2. drive →RAM 3. the CPUprocesses 4. it isdisplayed

The operating system

Something has to decide which program gets how much RAM and CPU time, and how data moves to the screen and storage. That is the operating system (OS), such as Windows, macOS, ChromeOS, Android or iOS. It is software that manages the hardware (CPU, memory, storage) and the other software running on it. Your Chromebook's OS is what lets a browser tab and a music app share the same RAM without crashing into each other.

Practice★☆☆Not started
The diagram shows the main blocks of a computer, but one of the components connected to the CPU is covered with a question mark, as shown in the figure. The hidden…

The diagram shows the main blocks of a computer, but one of the components connected to the CPU is covered with a question mark, as shown in the figure.

Keyboard and mouse INPUT MOTHERBOARD CPU ? Hard drive or SSD Monitor OUTPUT

The hidden component temporarily stores the data that the CPU is working with at any given moment and is erased when the computer is turned off. Which component is it? Explain what would happen if the computer did not have it.

Solve
Practice★☆☆Not started
When you play with a controller, the button command goes to a component that calculates what should happen in the game and sends the result to the monitor. Which…

When you play with a controller, the button command goes to a component that calculates what should happen in the game and sends the result to the monitor. Which component is that? Explain what you would notice in the game if that component were very slow.

Solve
Practice★★☆Not started
When you double-click a document, data travels between the computer components. Put these steps in order and explain what role RAM plays in the process: (a) the CPU…

When you double-click a document, data travels between the computer components. Put these steps in order and explain what role RAM plays in the process: (a) the CPU processes the document data, (b) the document is copied from storage to RAM, (c) you double-click the file icon, (d) the document is displayed on the screen.

Solve
Practice★★☆Not started
When you open a game, data travels between four computer components. The figure shows these components connected by arrows, but the order indicated by the numbers on the…

When you open a game, data travels between four computer components. The figure shows these components connected by arrows, but the order indicated by the numbers on the cards is incorrect, as shown in the diagram.

SSD drive RAM CPU Monitor 3 1 2 4

Write the correct order of the data's journey, from 1 to 4, and explain what happens in each of the four stages.

Solve

Which part to upgrade

Four computer components drawn as they really look, with the symptom that gives each one away: the CPU (slow calculations), a RAM module (slows down), an almost full mechanical hard drive (no space) and an SSD with no moving parts (slow start-up). slow calculations → CPU slows down → RAM no space → drive slow to start up no moving parts → SSD
Practice★☆☆Not started
Which component would you think of first in each case? Give reasons for your answers: (a) you want to store many more movies on the computer; (b) you want the computer…

Which component would you think of first in each case? Give reasons for your answers: (a) you want to store many more movies on the computer; (b) you want the computer to calculate and "think" faster; (c) you want to work with many programs open at the same time without it slowing down.

Solve
Practice★★☆Not started
A classroom computer runs very slowly when many browser tabs are opened at the same time, even though its CPU is powerful and the drive has free space. Which component…

A classroom computer runs very slowly when many browser tabs are opened at the same time, even though its CPU is powerful and the drive has free space. Which component do you think is reaching its limit? Explain why and what hardware upgrade would solve it.

Solve
Practice★★☆Not started
In a store you compare two computers: Computer A has a CPU of $3.2\ \text{GHz}$, $8\ \text{GB}$ of RAM and an SSD of $256\ \text{GB}$; Computer B has a CPU of…

In a store you compare two computers: Computer A has a CPU of $3.2\ \text{GHz}$, $8\ \text{GB}$ of RAM and an SSD of $256\ \text{GB}$; Computer B has a CPU of $2.8\ \text{GHz}$, $16\ \text{GB}$ of RAM and a hard drive of $1\ \text{TB}$. Explain what each piece of data means and reason which computer is best suited to a student who edits video with several programs open at the same time.

Solve
Practice★★☆Not started
A computer takes three minutes to turn on because its hard drive is an older type with moving parts (HDD). Explain why replacing it with an SSD speeds up startup and the…

A computer takes three minutes to turn on because its hard drive is an older type with moving parts (HDD). Explain why replacing it with an SSD speeds up startup and the opening of programs, even if the CPU and RAM remain exactly the same.

Solve
Practice★★☆Not started
An old computer has $4\ \text{GB}$ of RAM and an HDD hard drive, and there is only enough money for one upgrade: expanding to $16\ \text{GB}$ of RAM or switching to an…

An old computer has $4\ \text{GB}$ of RAM and an HDD hard drive, and there is only enough money for one upgrade: expanding to $16\ \text{GB}$ of RAM or switching to an SSD. Reason which one you would choose so that the computer "runs faster" in daily use (starting up, opening programs, switching between windows) and explain what each option would and would not improve.

Solve
Practice★★★Not started
Imagine that you work in the school's technical support service and you receive three computers with performance issues: Computer A: It takes nearly ten minutes to boot…

Imagine that you work in the school's technical support service and you receive three computers with performance issues:

  • Computer A: It takes nearly ten minutes to boot up and open any program, but once the application is open it runs completely smoothly.

  • Computer B: When having multiple browser tabs open along with a word processor and background music, the computer periodically freezes and stutters when switching windows.

  • Computer C: During the final export of a high-definition video project, the process suddenly stops indicating that it is not possible to save the resulting file.

For each case, diagnose in a reasoned manner which hardware component (secondary storage, RAM, or processor/graphics card) is causing the bottleneck and propose an appropriate technical upgrade.

Solve
Practice★★★Not started
The technology classroom needs a new computer suitable for programming, video editing and educational games. Decide how much importance you would give to each component…

The technology classroom needs a new computer suitable for programming, video editing and educational games. Decide how much importance you would give to each component (CPU, RAM, graphics card and storage), justify your decisions and indicate which component you would save money on if the budget were tight.

Solve
Practice★★★Not started
An online store's server serves thousands of people at the same time, all requesting pages and placing orders. Compare that server with your home computer: reason which…

An online store's server serves thousands of people at the same time, all requesting pages and placing orders. Compare that server with your home computer: reason which components would need to be upgraded (CPU, RAM, storage, network connection) and why a "very powerful" desktop computer would not be enough.

Solve
Practice★★★Not started
In a store's advertising flyer, you read the following claim about a cell phone: "Unbeatable performance! Features $12\ \text{GB}$ of memory, twice as much as your…

In a store's advertising flyer, you read the following claim about a cell phone:

"Unbeatable performance! Features $12\ \text{GB}$ of memory, twice as much as your current phone: it will run twice as fast and you will be able to store twice as many photos and games".

  1. a) Critically analyze the claim and explain with reasoning the two fundamental technical errors made by the advertisement when using the word "memory" and relating it to "speed".
  2. b) Write a corrected, technically honest version of the advertisement that maintains an appealing tone for the buyer without resorting to misleading claims.
Solve

Back to the start: The text disappeared because while you were typing it was only loaded in the RAM, which is emptied when the computer is switched off; to keep it you had to click "Save" and copy it to permanent storage. Now you know why that essay vanished.

Summary

See all the exercises in this section