Skip to main content

Section 1.3 Computer Hardware Architecture

Before we start learning the language we speak to give instructions to computers, we need to learn a small amount about how computers are built. If you were to take apart your computer or cell phone and look deep inside, you would find the following parts:
Figure 1.3.1.
The high-level definitions of these parts are as follows:
  • The Central Processing Unit (or CPU) is the part of the computer that carries out the instructions in your programs. If your computer is rated at 3.0 Gigahertz, it means that the CPU will fetch and execute instructions three billion times per second.
  • Main Memory is used to store information that the CPU needs in a hurry. Main memory is nearly as fast as the CPU. But the information stored in main memory vanishes when the computer is turned off.
  • Secondary Memory is also used to store information, but it is much slower than main memory. The advantage of secondary memory is that it can store information even when there is no power to the computer. Examples of secondary memory are disk drives or flash memory (typically found in USB sticks and portable music players).
  • The Input and Output Devices are our screen, keyboard, mouse, microphone, speaker, touchpad, etc. They are all of the ways we interact with the computer.
  • These days, most computers also have a Network Connection to retrieve information over a network.

Checkpoint 1.3.2.

    Which of the following will keep information stored without a power source?
  • Main Memory
  • Information stored in main memory vanishes when the computer is turned off.
  • Secondary Memory
  • Correct! The secondary memory will hold information without power.
  • Central Processing Unit
  • Try again! The CPU is what does the computing.
  • Input Devices
  • Try again! Input devices get information into the CPU.
While most of the detail of how these components work is best left to computer builders, it helps to have some terminology so we can talk about these different parts as we write our programs.
As a programmer, your job is to use and orchestrate each of these resources to solve the problem that you need to solve and analyze the data you get from the solution. As a programmer you will mostly be “talking” to the CPU and telling it what to do. Sometimes you will tell the CPU to use the main memory, secondary memory, input/output devices, or the network.
When you write down your instructions that tell the CPU what to do, we call those stored instructions a program and the act of writing these instructions down and getting the instructions to be correct programming.

Checkpoint 1.3.3.