(a) Explain the following terms: (i) storage device; (ii) virtual memory.
(b) Two storage devices have capacities 2KB and 2MB respectively. (i) Calculate the number of bits that each of 2KB and 2MB can hold. 2 KB: 2 MB
(i) Putting the two storage together, calculate the total capacity in bytes.
(a) Explanation of terms:
(i) Storage device: A storage device is a piece of computer hardware used to record (write) and hold (retain) data, instructions and information either temporarily or permanently, so that they can be retrieved (read) later. Examples include the hard disk, flash drive, memory card and optical (CD/DVD) disk.
(ii) Virtual memory: Virtual memory is a memory-management technique in which a portion of the hard disk (secondary storage) is set aside and used as an extension of the main memory (RAM). When the RAM becomes full, the operating system temporarily moves some data or program pages to this disk area, giving the impression that the computer has more RAM than it physically has. This allows large programs to run even when physical RAM is limited.
(b) Calculations
(i) Number of bits held by each device
Recall: \(1\text{ byte} = 8\text{ bits}\), \(1\text{ KB} = 1024\text{ bytes}\), \(1\text{ MB} = 1024\text{ KB} = 1024 \times 1024\text{ bytes}\).
2 KB:
\[2\text{ KB} = 2 \times 1024\text{ bytes} = 2048\text{ bytes}\]
\[= 2048 \times 8\text{ bits} = 16384\text{ bits}\]
2 MB:
\[2\text{ MB} = 2 \times 1024 \times 1024\text{ bytes} = 2097152\text{ bytes}\]
\[= 2097152 \times 8\text{ bits} = 16777216\text{ bits}\]
(ii) Total capacity of the two devices together, in bytes
\[2\text{ KB} = 2048\text{ bytes}\]
\[2\text{ MB} = 2097152\text{ bytes}\]
\[\text{Total} = 2048 + 2097152 = 2099200\text{ bytes}\]