Memory Unit

Memory Unit

TOPIC: Memory Unit

Class: SSS Two

What is the Memory Unit?

i. The memory unit is part of the computer that holds data and instructions for processing.
ii. It may also be defined as the storage space in the computer where data to be processed and instructions required for processing are stored.
Although closely associated with the Central Processing Unit (CPU), the memory unit is separated from it to allow for different types of storage, each optimized for speed, cost, and capacity, and to enable efficient data flow via buses.

Types of Memories in Computer

Memory is generally categorized into two main types based on their purpose and how the CPU interacts with them:
i. Primary memory / Main memory / Internal memory (for active, immediate use by the CPU)
ii. Secondary memory / Auxiliary memory / External memory (for long-term data storage)

Primary Memory:

The primary memory is the memory that can be directly accessed by the CPU. The CPU constantly interacts with it, reads instructions stored there, and executes them as required. It is essential for the computer's immediate operation.

Types of Primary Memory

There are two types of primary memory:
i. RAM
ii. ROM

RAM (Random Access Memory):

Random Access Memory, also called Read/Write memory, is the temporary memory of a computer. It is said to be ‘volatile’ since its contents are accessible only as long as the computer is on. The contents of RAM are cleared once the computer is turned off or if there is a power cut. RAM is where currently running programs and data are stored for quick access by the CPU.

Types of RAM

1. Dynamic RAM (DRAM): Dynamic RAM (DRAM) is a type of physical memory used in most personal computers. The term dynamic indicates that the memory must be constantly refreshed (re-energized) or it will lose its contents.
2. Static RAM (SRAM): Static RAM (SRAM) is a type of RAM that holds its data without external refresh, for as long as power is supplied to the circuit. This is contrasted to dynamic RAM (DRAM), which must be refreshed many times per second to hold its data contents. SRAM is generally faster but more expensive than DRAM.

ROM (Read Only Memory):

Read Only Memory is a special type of memory which can only be read, and its contents are not lost even when the computer is switched off or if there is a power cut. It is non-volatile. It typically contains the manufacturer’s instructions and critical boot-up information (like the BIOS/UEFI) that the computer needs to start.

Types of ROM

i. Programmable Read-Only Memory (PROM): This type of ROM can be programmed once by the user or manufacturer using a special device called a PROM programmer. Once programmed, its contents cannot be changed.
ii. Erasable Programmable Read-Only Memory (EPROM): This type of ROM can have its contents erased by exposure to strong ultraviolet light and then reprogrammed by a PROM programmer. This procedure can be carried out many times; however, the constant erasing and rewriting will eventually render the chip useless.
iii. Electrically Erasable Programmable Read-Only Memory (EEPROM): These are also erasable like EPROM, but the erasing is performed with electric current. This provides the ease of erasing it even if the memory is positioned in the computer. It stores the computer system’s BIOS/UEFI on modern systems. Unlike EPROM, the entire chip does not have to be erased for changing some portion of it, making it more flexible.

Differences between RAM and ROM

RAM ROM
It is volatile (It loses data when power is turned off) It is non-volatile (retains data even when power is off)
Data in RAM can be changed or deleted ROM is fixed or data typically cannot be modified by the user.
RAM chips are generally larger in physical size for comparable capacity. ROM chips are generally smaller in physical size for comparable capacity.
RAM chips are relatively expensive per gigabyte. ROM chips are relatively less expensive per gigabyte.
RAM stores all the applications and data when the computer is running. ROM usually stores instructions that are required for booting the computer (BIOS/UEFI).

Secondary Memory

This type of memory is a non-volatile memory, meaning it retains data even when power is turned off. It is slower than the main memory but offers much larger storage capacities at a lower cost. These are used for storing data/information permanently. The CPU does not directly access these memories; instead, their contents are first transferred to the main memory (RAM), and then the CPU can access it.

Types of Secondary Memory

Secondary memory can be broadly categorized by its underlying technology:
Magnetic: Data and information are stored and retrieved using magnetism on a magnetic coating.
Examples:
Hard Disk Drives (HDDs)
Magnetic tape (primarily for backup and archives)

Optical: Optical storage devices employ light (laser beams) to store and retrieve data and information.
Examples:
CD-ROM (Compact Disc Read-Only Memory)
DVD (Digital Versatile Disc)
Blu-ray Disc (BD)

Electronic (Solid State): This holds data and information using semiconductor flash memory, with no moving parts.
Examples:
Solid State Drives (SSDs)
USB Flash Drives (Pen Drives)
Memory Cards (SD cards, microSD cards)

Secondary Storage Devices

1. Hard Disk Drives (HDDs):
HDDs are the traditional primary storage devices in computers, using spinning platters and read/write heads to store and retrieve data magnetically. They offer large capacities at a relatively low cost per gigabyte, but are slower than SSDs and more prone to mechanical failure.

2. Solid State Drives (SSDs):
SSDs use flash memory to store data, similar to USB drives. Unlike HDDs, they have no moving parts, making them much faster, more durable, and more power-efficient. They are rapidly becoming the standard for primary storage in modern computers, though they are generally more expensive per gigabyte than HDDs.

3. CD-ROM drives:
CD-ROM stands for (Compact Disc Read Only Memory), and it is mainly used to mass produce audio CDs and computer games. Computer users can only read data and music from the discs, but they cannot write their own information onto the discs.

4. CD-R:
CD-R (Compact Disc Recordable), also known as WORM (Write Once Read Many), is a blank disc that users can put into a CD-R drive to burn or make a copy of their personal data, music, videos, and information. CD-Recordable discs are designed for one-time recording only.

5. CD-RW:
The CD-RW (Compact Disc Rewritable) can be erased and rewritten multiple times. New files can then be copied onto the rewritable disk. While not as universally compatible for audio playback as CD-R, they are useful for moving data between computers or for temporary backups.

6. DVD (Digital Versatile Disc):
DVD is very similar to a CD but it has a much larger storage capacity. A standard single-layer DVD can hold 4.7 GB of data. DVDs come in various types, including DVD-ROM (read-only), DVD-R (recordable once), and DVD-RW (rewritable).

7. Blu-ray Disc (BD):
Blu-ray discs are the successor to DVDs, offering significantly higher storage capacities (typically 25 GB for single-layer and 50 GB for dual-layer discs). They are primarily used for high-definition video storage and playback, as well as large data backups.

8. USB Flash Drives (Pen Drives):
These are portable, solid-state storage devices that plug into a computer's USB port. They are widely used for transferring files between devices and for small-scale backups due to their convenience and durability.

9. Memory Cards:
Small, solid-state flash memory storage devices used in portable electronic devices like digital cameras, smartphones, and tablets (e.g., SD cards, microSD cards).

Differences between Primary and Secondary Memory

Primary Memory Secondary Memory
These devices are temporary (Volatile, mostly RAM) These devices are permanent (Non-volatile)
These devices are generally more expensive per unit of storage. These devices are generally cheaper per unit of storage.
They have less storage capacity (typically gigabytes). They have much larger storage capacities (typically terabytes and beyond).
They are significantly faster. They are significantly slower than primary memory.
Directly accessed by the CPU. Not directly accessed by the CPU; data must first be transferred to primary memory.
Often referred to as internal memory. Often referred to as external or auxiliary memory.

Units of Storage in Computer

i. Bit (b): Bits is an acronym that stands for Binary digITS. It is the smallest unit of data in a digital computer. A single bit consists of either a 0 (zero) or a 1 (one).
ii. Nibble (nybble, nyble, or nybl): A nibble is a collection of four bits.
iii. Byte (B): A byte consists of eight bits. It is the smallest addressable unit of storage in most computer architectures and is the fundamental unit for storing characters (like letters, numbers, symbols).
iv. Word: A word is a collection of bits that a particular CPU can process at one time. Common word sizes are 16 bits, 32 bits, or 64 bits.
v. Kilobyte (KB): A Kilobyte consists of $2^{10}$ (1,024) Bytes.
vi. Megabyte (MB): One Megabyte consists of $2^{20}$ (1,048,576) Bytes.
vii. Gigabyte (GB): A Gigabyte is a collection of $2^{30}$ (1,073,741,824) Bytes.
viii. Terabyte (TB): A Terabyte consists of $2^{40}$ (1,099,511,627,776) Bytes.
ix. Petabyte (PB): A Petabyte consists of $2^{50}$ (1,125,899,906,842,624) Bytes.
x. Exabyte (EB): An Exabyte consists of $2^{60}$ (1,152,921,504,606,846,976) Bytes.
xi. Zettabyte (ZB): A Zettabyte consists of $2^{70}$ (1,180,591,620,717,411,303,424) Bytes.
xii. Yottabyte (YB): A Yottabyte consists of $2^{80}$ (1,208,925,819,614,629,174,706,176) Bytes.

Conversion from one Unit to another

The conversion process from one unit to another can be done using the following relationships (where 1024 is $2^{10}$):
1 bit = 0 or 1
1 nibble = 4 bits
1 byte = 8 bits
1 word = variable (e.g., 16, 32, or 64 bits)
1 KB = 1024 bytes
1 MB = 1024 KB
1 GB = 1024 MB
1 TB = 1024 GB
1 PB = 1024 TB
1 EB = 1024 PB
1 ZB = 1024 EB
1 YB = 1024 ZB

Example 1
Convert 1208 bits to bytes
Solution

We are required to convert 1208 bits to bytes
Let the unknown byte be x
It implies that;
1208 bits = x bytes
The relationship between bits and bytes is:
8 bits = 1 byte
Cross multiplying we have:
$x \text{ bytes} \times 8 \text{ bits} = 1208 \text{ bits} \times 1 \text{ byte}$
Divide both sides by the coefficient of the unknown unit of storage (8 bits):
$\frac{x \text{ bytes} \times 8 \text{ bits}}{8 \text{ bits}} = \frac{1208 \text{ bits} \times 1 \text{ byte}}{8 \text{ bits}}$
$x \text{ bytes} = \frac{1208}{8} \text{ bytes}$
$x \text{ bytes} = 151 \text{ bytes}$
Therefore, 1208 bits = 151 bytes

Example 2
Convert 330 KB to bytes
Solution

We are required to convert 330 KB to bytes
Let the unknown byte be x
It implies that;
330 KB = x bytes
The relationship between KB and byte is:
1 KB = 1024 bytes
Cross multiplying we have:
$x \text{ bytes} \times 1 \text{ KB} = 330 \text{ KB} \times 1024 \text{ bytes}$
Divide both sides by the coefficient of the unknown unit of storage (1 KB):
$\frac{x \text{ bytes} \times 1 \text{ KB}}{1 \text{ KB}} = \frac{330 \text{ KB} \times 1024 \text{ bytes}}{1 \text{ KB}}$
$x \text{ bytes} = 330 \times 1024 \text{ bytes}$
$x \text{ bytes} = 337920 \text{ bytes}$
Therefore, 330 KB = 337920 bytes

Example 3
Convert 14200 KB to MB
Solution

We are required to convert 14200 KB to MB
Let the unknown MB be x
It implies that;
14200 KB = x MB
The relationship between KB and MB is:
1024 KB = 1 MB
Cross multiplying we have:
$x \text{ MB} \times 1024 \text{ KB} = 14200 \text{ KB} \times 1 \text{ MB}$
Divide both sides by the coefficient of the unknown unit of storage (1024 KB):
$\frac{x \text{ MB} \times 1024 \text{ KB}}{1024 \text{ KB}} = \frac{14200 \text{ KB} \times 1 \text{ MB}}{1024 \text{ KB}}$
$x \text{ MB} = \frac{14200}{1024} \text{ MB}$
$x \text{ MB} \approx 13.87 \text{ MB}$
Therefore, 14200 KB = 13.87 MB (approximately)

Example 4
Convert 1.44 MB to Bytes (B)
Solution

We are required to convert 1.44 MB to Bytes
Let the unknown B be x
It implies that;
1.44 MB = x B
The relationship between MB and B is:
1 MB = 1024 KB
1 KB = 1024 B
So, 1 MB = $1024 \times 1024 \text{ B} = 1048576 \text{ B}$
Cross multiplying we have:
$x \text{ B} \times 1 \text{ MB} = 1.44 \text{ MB} \times 1048576 \text{ B}$
Divide both sides by the coefficient of the unknown unit of storage (1 MB):
$\frac{x \text{ B} \times 1 \text{ MB}}{1 \text{ MB}} = \frac{1.44 \text{ MB} \times 1048576 \text{ B}}{1 \text{ MB}}$
$x \text{ B} = 1.44 \times 1048576 \text{ B}$
$x \text{ B} = 1509949.44 \text{ B}$
Therefore, 1.44 MB = 1509949.44 Bytes

Example 5
Two storage devices have capacities of 2 KB and 2 MB respectively:
i. Calculate the number of bits each can hold
ii. Putting the two storage capacities together, calculate the total capacity in bytes
Solution

i. Calculate the number of bits each can hold
For 2 KB to bits:
Let the unknown bits be x
2 KB = x bits
We know that:
1 KB = 1024 bytes
1 byte = 8 bits
So, 1 KB = $1024 \times 8 \text{ bits} = 8192 \text{ bits}$
Cross multiply:
$x \text{ bits} \times 1 \text{ KB} = 2 \text{ KB} \times 8192 \text{ bits}$
Divide both sides by 1 KB:
$\frac{x \text{ bits} \times 1 \text{ KB}}{1 \text{ KB}} = \frac{2 \text{ KB} \times 8192 \text{ bits}}{1 \text{ KB}}$
$x \text{ bits} = 2 \times 8192 \text{ bits}$
$x \text{ bits} = 16384 \text{ bits}$
Therefore, 2 KB = 16384 bits

For 2 MB to bits:
Let the unknown bits be y
2 MB = y bits
We know that:
1 MB = 1024 KB
1 KB = 1024 bytes
1 byte = 8 bits
So, 1 MB = $1024 \times 1024 \times 8 \text{ bits} = 8388608 \text{ bits}$
Cross multiply:
$y \text{ bits} \times 1 \text{ MB} = 2 \text{ MB} \times 8388608 \text{ bits}$
Divide both sides by 1 MB:
$\frac{y \text{ bits} \times 1 \text{ MB}}{1 \text{ MB}} = \frac{2 \text{ MB} \times 8388608 \text{ bits}}{1 \text{ MB}}$
$y \text{ bits} = 2 \times 8388608 \text{ bits}$
$y \text{ bits} = 16777216 \text{ bits}$
Therefore, 2 MB = 16777216 bits

ii. Putting the two storage capacities together, calculate the total capacity in bytes
Total bits = 16384 bits (from 2 KB) + 16777216 bits (from 2 MB)
Total bits = 16793600 bits
Next, convert 16793600 bits to bytes:
Let the unknown bytes be z
16793600 bits = z bytes
We know that 8 bits = 1 byte
Cross multiply:
$z \text{ bytes} \times 8 \text{ bits} = 16793600 \text{ bits} \times 1 \text{ byte}$
Divide both sides by 8 bits:
$\frac{z \text{ bytes} \times 8 \text{ bits}}{8 \text{ bits}} = \frac{16793600 \text{ bits} \times 1 \text{ byte}}{8 \text{ bits}}$
$z \text{ bytes} = \frac{16793600}{8} \text{ bytes}$
$z \text{ bytes} = 2099200 \text{ bytes}$
Therefore, the total combined storage capacity in bytes is 2,099,200 bytes.

Comments

  1. This is extremely beneficial information! This blog is an excellent source of information that I find really useful. Thank you very much for drawing our attention to this!.pcseekers

    ReplyDelete
  2. Thank you for all the knowledge that you share, great article. I was extremely interested in the post, and it's impressive.
    kpm5wrug3t84

    ReplyDelete
  3. Tougg the not is too long but It a good website and lit information

    ReplyDelete
  4. An educative blog for teachers.

    ReplyDelete

Post a Comment

Popular posts from this blog

90 Objective Examination Questions in Major Subjects

Complete Computer Studies/ICT Curriculum for JSS 1 to SSS 3

JSS 3 Objective Questions and Answers in Computer studies