How Computers Work - Hardware

IntroComputing.org

Computer Hardware

The computer is an amazingly useful general-purpose technology, to the point that now cameras, phones, thermostats .. these are all now little computers. This section will cover a lot of ground, introducing major parts and themes of how computer hardware works. "Hardware" refers the physical parts of the computer, and "software" refers to the code that runs on the computer. These are deep and complicated topics, but many of the basic principles make perfect sense and will give you an insight about what's going on behind the scenes.

Chips and Transistors

Modern computers use tiny electronic components which can be etched onto the surface of a silicon chip. By far the most common electronic component is the "transistor" which works as a sort of valve for a flow of electrons. The transistor is a "solid state" device with no moving parts; it is a basic building block used to construct more complex components. In particular, a "bit" (below) can be built with an arrangement of 5 transistors. The transistor was invented in the early 1950's, replacing the vacuum tube. Since then, transistors have been made smaller and smaller, allowing more and more of them to be etched onto a silicon chip.

Moore's Law

Moore's law states that the density of transistors on a chip doubles about every 18 months. It is not a scientific law, just a broad prediction that seems to keep working. More broadly, it captures the idea that per dollar, computer technology (not just transistors) gets exponentially better as time goes along. This is quite clear if you look at the cost or capability of computers/cameras etc. you have owned. It might mean that each new generation of computer is faster. OR it could mean that keeping capability constant, computers get cheaper and cheaper .. showing up in more in more contexts as it becomes cost effective (e.g. in your car, your thermostat, ..).

Computer Hardware

Pictures of Hardware

Below images of a low-end Shuttle computer with a 1.8ghz CPU, 512MB of memory and a 160GB hard drive. It cost about $200 retail in around 2008.

Here is the flat "motherboard", a little smaller than a 8.5 x 11 piece of paper, that the various components plug in to. At the center is the CPU. At the far is the RAM memory. Just to the right of the CPU are a couple support chips. Prominently, one of the chips is covered with a copper "heatsink" .. this presses tightly against the chip, dissipating the heat from the chip into the surrounding air. The CPU also had a very large heatsink, but it was removed to make the CPU visible.

The CPU is held tightly against the motherboard by a little lever mechanism. Here the mechanism is released so the CPU can be picked up. The fingernail sized CPU is packaged underneath this metal cover which helps conduct the heat from the CPU up to its heatsink. The gray stuff on the metal chip cover is "thermal paste", a material which helps conduct heat from the chip housing to its (not shown) heatsink.

Flipping the CPU over shows the little gold pads on the bottom of the CPU. Each pad is connected by a very fine wire to a spot on the silicon chip.

Here is a picture of another chip, but with the top packaging removed. You see the pinky-fingernail silicon chip at the center with the tiny transistor details etched onto it. At the chip edge, see the very fine wires connecting parts of the chip to outside pads (linking to wikipedia image).

Now looking from the side, the heatsink and the RAM memory card can be seen more clearly, sticking up from the motherboard.

RAM is built with a few chips packaged together onto a little card known as a DIMM that plugs into the motherboard (dual inline memory module). Here we see the RAM DIMM removed from its motherboard socket. This is a 512MB DIMM built with 4 chips. A few years earlier, this DIMM might have required 8 chips in order to store 512MB .. Moore's law in action.

This is a hard drive that connects to the motherboard with the visible standard SATA connector. This is a 160GB, "3.5 inch" drive referring to the diameter of the spinning disk inside; the whole drive is about the size of small paperback book. This is a standard disk size to use inside a desktop computer. Laptop computers use 2.5 inch drives which are a bit smaller.

Bits Bytes Megabytes Gigabytes Gigahertz

Like most fields, Computer Science has its own jargon. However, there is a basic level of vocabulary that you should know.

Alternate Terminology: Kibibyte Mebibyte Gibibyte Tebibyte

There's this problem with the word "megabyte" .. does it mean 1024 * 1024 bytes, i.e. 2^20 which is 1,048,576, or does it mean exactly 1 million. It's just a 5% difference, but marketers tend to prefer the 1 million, interpretation, since it makes their hard drives etc. appear to hold a little bit more. Also, the difference grows larger and larger for the gigabyte and terabyte sizes. In an attempt to fix this, the terms "kibibyte" "mebibyte" "gibibyte" "tebibyte" have been introduced to specifically mean the 1024 based units (see wikipedia kibibyte article). These terms do not seem to have caught on very strongly thus far. If nothing else, remember that terms like "megabyte" have this little wiggle room in them between the 1024 and 1000 based meanings. We will never grade off for this distinction .. "about a million" will be our close-enough interpretation for "megabyte". The "error" at the megabyte level is about 5%. At the terabyte level the error is about 10%.