How does digital memory work?

 

What is memory in Digital Electronics?

Every piece of information stored within the computer’s memory is encoded as some unique combination of zeros and ones. These zeros and ones are called bits (binary digits). Each bit is represented by an electronic device that is, in some sense, either “off’ (zero) or “on” (one).



One Byte

Small computers have memories that are organized into 8-bit multiples called bytes, as illustrated in Fig. 1.1. Notice that the individual bits are numbered, beginning with 0 (for the rightmost bit) and extending to (the leftmost bit). Normally, a single character (e.g., a letter, a single digit or a punctuation symbol) will occupy one byte of memory. An instruction may occupy 1, 2 or 3 bytes. A single numeric quantity may occupy 1 to 8 bytes, depending on its precision (i.e., the number of significant figures) and its type (integer, floating-point, etc.).

bit number: 7 6 5 4 3 2 1 0

 

 

 

 

 

 

 

 

                                                                        Fig.1.1



One 32- bit word

The size of a computer’s memory is usually expressed as some multiple of 2, 2^10 = 1024 bytes. This is referred to as 1K. Modem small computers have memories whose sizes typically range from 4 to 16 megabytes, where 1 megabyte (1M) is equivalent to 2^10 x 2^10 bytes, or 2^10 K = 1024K bytes.

EXAMPLE 1.2 The memory of a personal computer has a capacity of 16M bytes. Thus, as many as 16 x 1024 x 1024 =16,777,216 characters and/or instructions can be stored in the computer’s memory. If the entire memory is used to represent character data (which is actually quite unlikely), then over 200,000 names and addresses can be stored within the computer at any one time, assuming 80 characters for each name and address.

If the memory is used to represent numeric data rather than names and addresses, then more than 4 million individual numbers can be stored at any one time, assuming each numeric quantity requires 4 bytes of memory. Large computers have memories that are organized into words rather than bytes. Each word will consist of a relatively large number of bits-typically 32 or 36. The bit-wise organization of a 32-bit word is illustrated in Fig. 1.2. Notice that the bits are numbered, beginning with 0 (for the rightmost bit) and extending to 3 1 (the leftmost bit).

Bit no.: 3130 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10  9  8  7  6  5 4 3 2 1 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                                                                               Fig.1.2

 


 One 4-byte (32-bit)word

Figure 1.3 shows the same 32-bit word organized into 4 consecutive bytes. The bytes are numbered in the same manner as the individual bits, ranging from 0 (for the rightmost byte) to 3 (the leftmost byte).

The use of a 32- or a 36-bit word permits one numeric quantity, or a small group of characters (typically or 5), to be represented within a single word of memory. Large computers commonly have several million words (Le., several megawords) of memory

bit no.: 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

                                            Fig 1.3

                                                                     

EXAMPLE 1.3 The memory of a large computer has a capacity of 32M (32,768K) words, which is equivalent to 32 1024 x 1024= 33,554,432 words. If the entire memory is used to represent numeric data (which is unlikely), then more than 33 million numbers can be stored within the computer at any one time, assuming each numeric quantity requires one word of memory.

If the memory is used to represent characters rather than numeric data, then about 130 million characters can be stored at any one time, based upon 4 characters per word. This is enough memory to store the contents of several large books. 

Most computers also employ auxiliary storage devices (e.g., magnetic tapes, disks, optical memory devices) in addition to their primary memories. These devices can store more than 1 gigabyte (1 G = 1024M bytes) of information. Moreover, they allow information to be recorded permanently, since they can often be physically disconnected from the computer and stored when not in use. However, the access time (i.e., the time required to store or retrieve information) is considerably greater for these auxiliary devices than for the computer's primary memory.