Memory Unit

Memory Unit - SSS Two
Topic: Memory Unit Class: SSS Two

The Memory Unit


What is the Memory Unit?

The memory unit is part of the computer that holds data and instructions for processing. 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 Computer Memory

Memory is generally categorized into two main types based on their purpose and how the CPU interacts with them:

  1. Primary memory / Main memory / Internal memory (for active, immediate use by the CPU)
  2. 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.

There are two types of primary memory:

  1. RAM (Random Access Memory)
  2. ROM (Read Only Memory)

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): This type of physical memory is 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): This type of RAM 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

  1. 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.
  2. 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.
  3. 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; data typically cannot be modified by the user.
RAM is used for storing applications and data during runtime. ROM stores instructions required for booting the computer.
RAM is a read-and-write memory. ROM is a read-only memory.
RAM chips are generally larger in physical size for comparable capacity. ROM chips are generally smaller in physical size for comparable capacity.

Secondary Memory

This type of memory is non-volatile, meaning it retains data even when power is turned off. It is slower than primary memory but offers much larger storage capacities at a lower cost. These are used for storing data 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

  • Magnetic: Data and information are stored and retrieved using magnetism on a magnetic coating.
    Examples: Hard Disk Drives (HDDs), Magnetic tape (for backup)
  • Optical: Optical storage devices employ light (laser beams) to store and retrieve data.
    Examples: CD-ROM, DVD, Blu-ray Disc (BD)
  • Electronic (Solid State): This holds data using semiconductor flash memory, with no moving parts.
    Examples: Solid State Drives (SSDs), USB Flash Drives (Pen Drives), Memory 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.
  3. CD-ROM drives: CD-ROM stands for (Compact Disc Read Only Memory). 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 record data onto once.
  5. CD-RW: The CD-RW (Compact Disc Rewritable) can be erased and rewritten multiple times.
  6. DVD (Digital Versatile Disc): DVD is very similar to a CD but has a much larger storage capacity (4.7 GB for a single-layer).
  7. Blu-ray Disc (BD): Blu-ray discs are the successor to DVDs, offering significantly higher storage capacities (typically 25 GB to 50 GB).
  8. USB Flash Drives (Pen Drives): These are portable, solid-state storage devices used for transferring files.
  9. Memory Cards: Small, solid-state flash memory storage devices used in portable electronic devices like digital cameras and smartphones (e.g., SD cards, microSD cards).

Units of Storage in Computer

i. Bit (b): Bit is an acronym that stands for Binary digIT. It is the smallest unit of data in a digital computer, consisting of either a 0 or a 1.
ii. Nibble: A nibble is a collection of four bits.
iii. Byte (B): A byte consists of eight bits. It is the fundamental unit for storing a single character.
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.

Larger Units (based on $2^{10}$ or 1,024):
v. Kilobyte (KB): 1 KB = $2^{10}$ (1,024) Bytes
vi. Megabyte (MB): 1 MB = $2^{20}$ (1,048,576) Bytes
vii. Gigabyte (GB): 1 GB = $2^{30}$ (1,073,741,824) Bytes
viii. Terabyte (TB): 1 TB = $2^{40}$ (1,099,511,627,776) Bytes
ix. Petabyte (PB): 1 PB = $2^{50}$ (1,125,899,906,842,624) Bytes
x. Exabyte (EB): 1 EB = $2^{60}$ (1,152,921,504,606,846,976) Bytes
xi. Zettabyte (ZB): 1 ZB = $2^{70}$ (1,180,591,620,717,411,303,424) Bytes
xii. Yottabyte (YB): 1 YB = $2^{80}$ (1,208,925,819,614,629,174,706,176) Bytes

Conversion from one Unit to another

The conversion process uses the following key relationships:

  • To convert from a larger unit to a smaller unit, you multiply by the conversion factor (e.g., multiply by 1024 to convert KB to Bytes).
  • To convert from a smaller unit to a larger unit, you divide by the conversion factor (e.g., divide by 1024 to convert KB to MB).

  • 1 bit = 0 or 1
  • 1 nibble = 4 bits
  • 1 byte = 8 bits
  • 1 word = 16, 32, or 64 bits (depends on system)
  • 1 Kilobyte (KB) = 1024 bytes
  • 1 Megabyte (MB) = 1024 KB
  • 1 Gigabyte (GB) = 1024 MB
  • 1 Terabyte (TB) = 1024 GB
  • 1 Petabyte (PB) = 1024 TB
  • 1 Exabyte (EB) = 1024 PB
  • 1 Zettabyte (ZB) = 1024 EB
  • 1 Yottabyte (YB) = 1024 ZB

Example 1: Convert 1208 bits to bytes
Rule: To convert from bits to bytes, we divide by 8. Since 1 byte = 8 bits
Calculation: $\frac{1208 \text{ bits}}{8} = 151 \text{ bytes}$

Example 2: Convert 330 KB to bytes
Rule: To convert from KB to bytes, we multiply by 1024. Since 1 Kilobyte (KB) = 1024 bytes.
Calculation: $330 \text{ KB} \times 1024 = 337,920 \text{ bytes}$

Example 3: Convert 14,200 KB to MB
Rule: To convert from KB to MB, we divide by 1024. Since 1 MB = 1024KB
Calculation: $\frac{14200 \text{ KB}}{1024} \approx 13.87 \text{ MB}$

Example 4: Convert 1.44 MB to Bytes
Rule: To convert from MB to bytes, we multiply by 1024 twice. Since 1 MB = 1024 * 1024 Bytes
Calculation: $1.44 \text{ MB} \times 1024 \times 1024 \approx 1,509,949 \text{ bytes}$

Example 5:Two storage devices have capacities of 2 KB and 2 MB.
i. Calculate the number of bits each can hold
ii. Calculate the total capacity in bytes

For 2 KB: $2 \times 1024 \times 8 = 16,384 \text{ bits}$
For 2 MB: $2 \times 1024 \times 1024 \times 8 = 16,777,216 \text{ bits}$

ii. Calculate the total capacity in bytes
Total bits = $16,384 + 16,777,216 = 16,793,600 \text{ bits}$
Total bytes = $\frac{16,793,600 \text{ bits}}{8} = 2,099,200 \text{ bytes}$


Test Your Knowledge

Answer the following questions based on the information above.

1. Which type of memory is volatile and loses its contents when the power is turned off?

2. What is the fundamental unit of storage, consisting of 8 bits?

3. Which memory type stores the computer's boot-up instructions (BIOS/UEFI) and is non-volatile?

4. Which of the following is an example of an optical storage device?

5. What is the main difference between primary and secondary memory?

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