Home Main How Work Last Next

Day IV – CPU & Cache
(Day 4, possibly a short quiz of first three days, plus 15 - 19)
(Not much time for getting off track…)

Another Crash Course video is appropriate at this time, as the concept of working memory and switches comes more into focus, rather than storage.

15. So RAM & various storage media hold data, but where is data changed?

Sometimes we only want to store data, but often we will want to change it somehow, i.e. process it.  Any data which is changed in some way on a computer has these changes happen in the central processing unit (CPU).  The CPU is thus often referred to as the “brain” of the computer.  The most common make of CPU the Intel, with its Core i7, and Core i5 (used in your Macbook Airs).  Like all other microprocessing chips on a computer, CPUs are made of the mineral silicon, and have millions of circuits etched onto their surface. 

Link to the Global Foundaries video. (Downloaded in case it gets lost on YouTube.)

16. But the CPU must also hold memory in order to process it, right?

Yes, in fact the fastest memory of all is actually right on the CPU – it’s a tiny amount of memory, but really, really fast.  The CPU’s memory locations are called registers. The registers hold each bunch of bytes being processed for incredibly short periods of time, but they shuffle them in and out, millions or billions of times every second.  Most modern personal computers have a single CPU, whose registers are 64-bit, meaning that each register works with 8 bytes at a time (though you'll note that many older devices still have only 32-bit processing capabilities).  Many modern computers now actually have two or more processors working together. Further, many processors are “multi-core”, meaning one CPU acts like it is actually two. Your Macbook Air i5 CPUs are dual-core.

 (Analogy: cafeteria with 4 versus 8 staff for serving, or even using additional cafeterias with 4 or 8 additional staff each.)


17. And what about the memory called “cache” memory?

Cache memory is in-between the CPU registers and RAM memory in terms of speed at processing data.  It is also physically in-between the two on the motherboard of the computer.  Like the CPU and RAM, it is made of microprocessing chips.  Cache chips are much more fast, but much more expensive than RAM, and thus limited in size (usually somewhere between one to twelve Megabytes, versus RAM which is usually 2 - 16 Gigabytes).  In fact you can think of cache memory as super fast RAM.  The cache functions by keeping track of all the commands that are passed to the central processing unit, and storing the most frequently used ones.  For example, a game might use commands, which assist the creation of 3D images again and again, so a copy of these commands gets left in the cache.  Since these commands are kept “at the ready”, right next to the CPU, the application functions faster.  Level 1 cache is right within the CPU, and level 2 and level 3 cache further away from the core of the CPU, but usually still close.

(Analogy: Santa’s Elves workshop with small workspace, but a shelf for common tools.)


18. What determines how fast a CPU operates?

As mentioned above, the more registers the CPU has, the more data it can work with at one fraction of a second.  But the other factor which affects how powerful it is, is the speed with which it moves those bytes in and out of the registers.  The maximum number of simple actions, or cycles, a CPU can do per second, is referred to as its clock speed.  Clock speed is determined by a very small quartz crystal, which vibrates at an exact, constant rate when electricity is applied to it.  Clock speeds of computes are now up around 2 or 3 Giga Hertz, i.e. they can perform around 2 or 3 billion cycles per second.   


19. Is CPU speed the only thing which determines how fast a computer is?

Some people believe the only thing that determines a computer’s speed is the CPU’s clock speed.  Though it is one factor, there are many others.  Two other factors have already been mentioned: the register size of the CPU (32 vs. 64 bit processing), and the size of the cache.  Four other major factors affecting overall computer performance and speed are the, the amount of RAM, the amount of hard drive free space, the quality/size/speed of the graphics card (& GPU), and the speed of the system bus.