Memory

Abstract

Understand different types of computer memory such as: RAM (random-access memory), ROM (read-only memory) and distinguish between them.

As mentioned in the first chapter RAM is used to store the current data and programs whereas ROM is used to store the routines that enable a computer to boot up.

The following table compares RAM and ROM.

 

RAM

ROM

Function

Store the currently active programs and their data.

Stores certain fixed routines such as the boot-up routines.

Volatility

RAM is volatile: When the computer is switched off, the contents are lost.

ROM is non-volatile: When the computer is switched off, the contents are not lost.

Changeable

The contents of RAM can be changed or deleted.

The contents of ROM cannot be changed or deleted.

Memory Measurements

Abstract

Know how computer memory is measured: bit, byte, KB, MB, GB, TB. Relate computer memory measurements to characters, files and directories/folders.

Bits

In all the components of a computer, data and instructions are stored as patters of ones and zeros. These individual ones and zeros are called bits.

In electronic components the one is stored by switching an electronic switch on and a zero by switching it off. On a magnetic material, such as the surface of a hard disk, the one may be stored with a clockwise magnetic field and a zero with a counter-clockwise field.

The reason for the use of only ones and zeros stems directly from the fact that modern circuitry makes use of electronic switches and these can only be on or off. The term for circuitry based on switches is digital. Arithmetic based on the use of only ones and zeros is called binary arithmetic.

Bytes

Bits are grouped together into sets of eight. A set of eight bits is called a byte.

ASCII or American Standard Code for Information Interchange was a system of representing all the characters of the western alphabet and certain special characters in a single byte. You can think of the byte as the amount of memory required to store a single character.

As there are only 256 possible variations within eight bits, this is not sufficient to represent other alphabets. As a result a new system, called uni-code, has been developed to represent all the alphabets of the world. This makes use of two bytes or sixteen bits. With two bytes, 65536 different characters and symbols can be represented.

Units of memory

Abstract

Understand how computer memory measurement is expressed using the metric system.

Because we use very large numbers of bytes for storage, abbreviations are used for large numbers. These are based on powers of two and are set out in the following table.

kB

kilobyte

210 = 1 024 bytes

approx. 1 000 bytes

Mb

Megabyte

220 = 1 048 576 bytes

approx. 1 000 000 bytes

Gb

Gigabyte

230 bytes

approx. 1000 000 000 bytes

Tb

Terabyte

240 bytes

approx. 1000 000 000 000 bytes

The capacity of hard drives is measured in bytes. A modern hard drive has a capacity of 40 Gb or more.

When files are stored on disk, the amount of space they occupy is measured in bytes. The following screen shows a partial listing of files in a directory. Notice the fourth column which contains the size of the file in bytes. (Don't be concerned with the detail of this screen – it is shown purely for illustrative purposes.)

Figure 2.1. Directory Listing

Directory Listing

When we work with files and directories, we often need to know how large the files are or how much space a directory and its files occupies.

  • One byte is one character which is a number, letter or symbol. It consists of eight bits (binary digits) and is the smallest unit of information a computer can process.

  • One kilobyte is 1,024 characters and is approximately equal to one page of text in double-spacing.

  • One megabyte is 1,048,576 characters and is approximately equal to one book.

  • One gigabyte is 1,073,741,824 characters and is approximately equal to 1000 books.

  • One terabyte is 1,099,511,627,776 characters and is approximately equal to a whole library.