Memory (ROM, RAM and Secondary Storage)

Learning Objectives

  • Understand the differences between primary and secondary memory
  • Understand how primary memory is addressed
  • Understand how a CPU reads or writes to primary memory
  • Understand why secondary storage is important

Learning Outcomes

All must complete most of the activities on the worksheet.  Be able to give good descriptions in verbal discussions. (Grade D/E)

Most should complete all of the activities on the worksheet.  Be able to give good explanations in verbal discussions. (Grade B/C)

Some could complete all of the activities on the worksheet.  Be able to give good explanations and justifications in verbal discussions. (Grade A*/A)

Keywords

Words to learn: primary, secondary, memory, storage

Starter

All instructions and data in a digital computer are stored as bits (1 or 0). Remember also that a computer has three buses:

  • Data bus – Transfers binary data (on/off pulses) from place to place
  • Control bus – Sends and receives control messages that tell the CPU and hardware devices when to send data on the data bus
  • Address bus – When the CPU wants to store or read information in a specific location in RAM it will set the address bus to that location number

The amount of information that a storage device can hold is measured in bytes (where 8 bits = 1 byte). How many bytes do each of the following represent?

  • kilobyte
  • megabyte
  • gigabyte
  • terabyte

Volatile memory only retains data while it is receiving electrical power while non-volatile memory retains data even without power.

Main

Main memory

Main memory (also known as Random Access Memory (RAM)) is volatile and is used to store instructions and data while programs and applications are running. All programs and applications that are running will have data and instructions loaded into RAM.

Memory addressing

It is helpful to think of memory locations as adjacent ‘slots’ which can hold a piece of data or instructions. The memory is split up into 8 bit (or 1 byte) storage locations. Each storage location is given a unique address.

Have a go at Activity 1 on this worksheet.

The size of the address bus determines the maximum number of unique memory addresses that can be used.

Have a go at Activity 2 on the same worksheet above.  The width of the address bus can increase the size of memory that the processor can address.

Find out how much memory (or RAM) is in the computers you use (desktop computer, laptop, tablet, mobile phone, Raspberry Pi). (For Windows use Control Panel/System; the Raspberry Pi has 512MB of RAM; an iPhone 5C has 1GB of RAM.) Complete Activity 3 on the same worksheet above.  The computer may not contain the maximum amount of addressable memory.

Memory read

Stage 1 Processor places the address of the required memory location on the address bus
Stage 2 Processor sets the read line on the control bus
Stage 3 Contents of the memory location are conveyed along the data bus into the processor

Memory write

Stage 1 Processor places the address of the required memory location on the address bus
Stage 2 Processor places the data to be written to memory on the data bus
Stage 3 Processor sets the write line on the control bus
Stage 4 The data is conveyed along the data bus to the memory location

Have a go at Activity 4 on the same worksheet above.

Secondary storage

Secondary storage is non-volatile and allows programs and data to be stored permanently in between uses in the CPU. As a class, brainstorm why some permanent storage is necessary. Hard disk drives, SD cards and solid state memory are all examples of secondary storage devices.

You will be looking at how data is stored on these secondary storage devices in a later lesson.

Give pupils the opportunity to investigate the type and size of secondary storage in the computers they use. Have a go at Activity 5 on the same worksheet above.

Plenary

Search online for companies that sell memory (such as http://www.crucial.com/). Find three further facts about memory that you can share with the class and fill in Activity 6 on the same worksheet above.