Skip to content

Inside a Computer

Run the Inside a Computer MicroSim Fullscreen
Edit in the p5.js Editor

About This MicroSim

This MicroSim shows the five main components inside every computer: CPU, RAM, Storage, Input Devices, and Output Devices. Each component is color-coded and connected by arrows that show how data flows between them. It's a great way to build a mental map of what's happening inside the box on your desk.

How to Use

  1. Hover over any component to see a description and a real-world analogy.
  2. Click a component to select it — its connecting arrows turn red so you can trace the data path.
  3. Press the Show Data Flow button to watch animated dots travel along the arrows, showing how data moves between components in real time.
  4. Click the button again to hide the animation.

Iframe Embed Code

1
2
3
4
<iframe src="https://dmccreary.github.io/computer-science/sims/inside-a-computer/main.html"
        height="510px"
        width="100%"
        scrolling="no"></iframe>

Lesson Plan

Grade Level

9-12 (High School Computer Science)

Duration

10-15 minutes

Prerequisites

  • No prior computer science experience needed.

Activities

  1. Exploration (5 min): Hover over each component and read the descriptions. Try to explain each analogy in your own words.
  2. Guided Practice (5 min): Turn on Data Flow and trace the path data takes from an input device to the CPU, then to an output device. Discuss why RAM and Storage both have two-way arrows with the CPU.
  3. Assessment (5 min): Without looking at the tooltips, name all five components and describe what each one does in one sentence.

Assessment

  • Can the student name all five components from memory?
  • Can the student describe the role of each component using their own words?
  • Can the student explain why data flows in both directions between the CPU and RAM/Storage, but only one direction for Input and Output?

References

  1. Wikipedia: Computer hardware
  2. Wikipedia: Central processing unit
  3. Wikipedia: Random-access memory