What is Memory Unit?

Introduction

When you do any task in computer, it needs a place to store all the data and information it’s using. It store everything in the memory.Ā 

Memory Size: Understanding How Computer Data is Measured

Let’s understand how data storage units are measured from smaller to larger data units.

  • In computers, data is stored and represented using bits, which are like switches that can be either ‘on’ (1) or ‘off’ (0).
  • In 1960s, ASCII (American Standard Code for Information Interchange) character encoding was developed.
  • ASCII uses 8-bits to uniquely represent different characters like letters, numbers, and symbols.
  • This 8-bit representation became the standard for character encoding.

To simplify calculation, we represented:

  • 1-bit (b) = 0 or 1.
  • 1 byte (B) =Ā 8 bits.
Data Storage Conversion Table: Easily Convert Bytes, Kilobytes, Megabytes, and More!
Unit Size
Kibibyte (KiB) 1,024 bytes
mebibyte (MiB) 1,024 KiB
Gibibyte (GiB) 1,024 MiB
--- ---
Unit Size
Kilobyte (KB) 1,000 bytes
Megabyte (MB) 1,000 KB
Gigabyte (GB) 1,000 MB
--- ---
Computer Memory: Exploring the Layers of Memory in Computer System

Before discussing about computer hierarchy. Let’s understand, How fast a CPU can process any task?

  • CPU is superfast and process billion cycles per second.
  • Take an example of 3.2 GHz CPU or Processor, it can execute 3.2 billion cycles per second.

Main goal of having a computer hierarchy is to provide a data storage which can be accessed at the same speed of what CPU requires.

There are 4 commonly used storage available in computer.

Computer Memory Hierarchy: A Comparison from Registers to RAM, Cache, and Storage
Register Cache RAM HDD or SSD
Speed Fastest Faster Fast Slowest
Cost Expensive Costly Cheap Cheapest
Size 8 to 64-bit 64 KB to 32 MB 1 to 16 GB 500 GB to 8 TB
Store Temporary Temporary Temporary Permanent
Purpose Super-fast storage for CPU to quickly fetch, execute and process data. Hold a queue of data and instructions which will be processed next. Stores the running program and data so that it is ready for use when the CPU needs it. Long term permanent storage.
Advantages of Computer Memory Hierarchy
Problem Statement: Enhancing Data Access Speed

Imagine you are listening to songs, working on a document, and browsing the internet simultaneously on your computer.

Problem Description: The Challenge of Different Tasks

Each tasks in computer requires access to different data and instructions.

  • If computer store it in the HDD (slowest memory), then accessing this information would be incredibly slow.
  • The CPU will be spending time in waiting for data, resulting in a frustrating user experience.
Solution: Introducing the Memory Hierarchy

To tackle this challenge, computers uses memory hierarchy.

  • Faster Memory for Frequently Accessed Data:
    • Computer organizes the frequently accessed data like operating system, applications (audio player, document editor) in faster memory like cache and RAM.
    • This allows the CPU to quickly access all the information to ensure smooth and responsive performance.
  • Slower Memory for Less Frequent Data:
    • Computer organizes the less frequently accessed data in slower memory types like HDD or SSD.
    • While these memory types have slower access time, they offer more storage capacity at a cheapest cost and permanent storage.