About Computers
Computers are everywhere!
Phones, tablets, TVs, cars, pianos, pacemakers, ... Computers are all around us. Computers can do amazing things, but even very different computers are all very similar to each other on the inside.
Computers are just machines. They cannot do anything by themselves; they can only follow instructions. Sometimes computers seem like more than just a machine, but that's just because the computer is following its instructions really fast. These "instructions" that a computer obeys are called programs.
As a programmer, you give the computer programs, and the computer obeys those instructions.
Most computers have the same basic structure: CPU, transient storage, and persistent storage.
- The CPU (Central Processing Unit) is the brain of the computer. It does the actual executing (obeying) of the instructions.
- Transient storage (commonly called memory or RAM, short for Random Access Memory) is the temporary storage space that the CPU normally uses to store its data. RAM is very fast, but it has a drawback: the data is all erased whenever the computer turns off.
- Persistent storage (usually a hard drive or flash drive) is the storage space where long-term data is kept. It is much slower than RAM, but the data in persistent storage is not erased when the computer turns off.
You have probably heard that computers are all about zeroes and ones. This is completely true.
You've probably also seen TV shows and movies where the nerd stares at a string of zeroes and ones and sees some meaning in it. This is completely ridiculous.
It is true that computers only understand zeroes and ones. All storage on the hard drive is a series of zeroes and ones. All storage in the memory is a series of zeroes and ones. And when the CPU executes its instructions, those instructions are encoded as a series of zeroes and ones. It is perfectly true that computers only understand zeroes and ones.
However, people do not work well with just zeroes and ones. If programmers had to give the computer a bunch of zeroes and ones, they would all quit. That would just be too hard to do!