Online Book Reader

Home Category

CompTIA A_ Certification All-In-One Exam Guide, Seventh Edition - Michael Meyers [66]

By Root 1516 0
each line of this memory a way for the CPU to say to the memory, “Give me the next line of code” or “Give me line 6.” Addressing memory takes care of another problem: the memory must not only store programs but also store the result of the programs. If the CPU adds 2 + 3 and gets 5, the memory needs to store that 5 in such a way that other programs may later read that 5, or possibly even store that on a hard drive. By addressing each line of memory, other programs will know where to find the data.

Memory and RAM


Memory must store not only programs but also data. The CPU needs to be able to read and write to this storage medium. Additionally, this system must enable the CPU to jump to any line of stored code as easily as to any other line of code. All of this must be done at or at least near the clock speed of the CPU. Fortunately, this magical device has existed for many years: random access memory (RAM).

In Chapter 6, “RAM,” the concept of RAM is developed in detail, so for now let’s look at RAM as an electronic spreadsheet, like one you can generate in Microsoft Excel (Figure 5-14). Each cell in this spreadsheet can store only a one or a zero. Each cell is called a bit. Each row in the spreadsheet is eight bits across to match the external data bus of the 8088. Each row of eight bits is called a byte. In the PC world, RAM transfers and stores data to and from the CPU in byte-sized chunks. RAM is, therefore, arranged in byte-sized rows. Here are the terms used to talk about quantities of bits:

Figure 5-14 RAM as a spreadsheet

Any individual 1 or 0 = a bit

4 bits = a nibble

8 bits = a byte

16 bits = a word

32 bits = a double word

64 bits = a paragraph or quad word

The number of bytes of RAM varies from PC to PC. In earlier PCs, from around 1980 to 1990, the typical system would have only a few hundred thousand bytes of RAM. Today’s systems often have billions of bytes of RAM.

Let’s stop here for a quick reality check. Electronically, RAM looks like a spreadsheet, but real RAM is made of groups of semiconductor chips soldered onto small cards that snap into your computer (Figure 5-15). In Chapter 6, “RAM,” you’ll see how these groups of chips actually make themselves look like a spreadsheet. For now, don’t worry about real RAM and just stick with the spreadsheet idea.

Figure 5-15 Typical RAM

The CPU accesses any one row of RAM as easily and as fast as any other row, which explains the “random access” part of RAM. Not only is RAM randomly accessible, it’s also fast. By storing programs on RAM, the CPU can access and run them very quickly. RAM also stores any data that the CPU actively uses.

Computers use dynamic RAM (DRAM) for the main system memory. DRAM needs both a constant electrical charge and a periodic refresh of the circuits; otherwise, it loses data—that’s what makes it dynamic rather than static in content. The refresh can cause some delays, because the CPU has to wait for the refresh to happen, but modern CPU manufacturers have clever ways to get by this issue, as you’ll see when you read about the generations of processors later in this chapter.

Don’t confuse RAM with mass storage devices such as hard drives and flash drives. You use hard drives and flash drives to store programs and data permanently. Chapter 11, “Hard Drive Technologies,” Chapter 12, “Implementing Hard Drives,” and Chapter 13, “Removable Media,” discuss permanent storage in intimate detail.

Address Bus


So far, the entire PC consists of only a CPU and RAM. But the CPU and the RAM need some connection so they can talk to each other. To do so, extend the external data bus from the CPU so it can talk to the RAM (Figure 5-16).

Wait a minute. This is not a matter of just plugging the RAM into the external data bus wires! RAM is a spreadsheet with thousands and thousands of discrete rows, and you only need to look at the contents of one row of the spreadsheet at a time, right? So how do you connect the RAM to the external data bus in such a way that the CPU can see any one given row, but still give the CPU

Return Main Page Previous Page Next Page

®Online Book Reader