What is a memory unit?
A memory unit is the amount of data that can be stored in a storage unit. Some storage devices are RAM, hard drive, memory card, flash drive, etc. In the age of exponentially growing digital media, knowledge of how computer memory works is a key skill.
Let us take the example of 1 TB hard drives that come with a laptop nowadays. 1 TB is the acronym for 1 Terabyte. Below is a chart of the current memory size system.
Name | Equivalent of | Size in bytes |
Bit(b) | 1 bit | 1/8 |
Nibble | 4 bits | 1/2 |
Byte(B) | 8 bits | 1 |
Kilobyte(KB) | 1024 bytes | 1024 |
Megabyte(MB) | 1024 kilobytes | 1,048,576 |
Gigabyte(GB) | 1024 megabytes | 1, 073, 741, 824 |
Terabyte(TB) | 1024 gigabytes | 1, 099, 511, 627, 776 |
Petabyte(PB) | 1024 terabytes | 1, 125, 899, 906, 842, 624 |
Exabytes(EB) | 1024 petabytes | 1, 152, 921, 504, 606, 846, 976 |
How does memory work?
A bit can store only either of two values 0 or 1. Everything can be denoted using 0 or 1 which is known as a binary system. In this system 0 means false and 1 means true. Think of a switch, if it is turned off then the value is 0, if it is switched on then the value is 1. Since a single byte can store 8 bits, it can store up to 256 values ranging from 0 or (00000000) to 255 or (11111111).
Talking about data types, a word is 2 bytes, a doubleword is 4 bytes and a quadword is 8 bytes.
From the above table notice that a single KB is 1024 bytes and not 1000 bytes. A similar counting system is used for the other units like MB, GB, TB, and so on. Fun fact: The human brain can store up to 2.5 million GB of digital memory.
Memory size applications
Bytes are used to measure small text files. Small programs like printing hello world are measured in few bytes.
Kilobytes- With the development of faster computers, files like low quality images, spreadsheets, small PDFs are measured in kilobytes.
Megabytes- Images captured by smartphones and digital cameras are measured in megabytes. Floppy disks used in the 1980s for portability of data used to be around 800 kilobytes to 2.8 megabytes. High bit rate music is also measured in few megabytes.
Gigabytes- Operating systems, engineering software like Autocad, large bluray movies, and large software projects usually takes up few gigabytes of memory. For portability of data, floppy disks were replaced with flash drives. Before 2010 flash drives with 1 gigabyte to 2 gigabytes storage were very popular. Nowadays USB flash drives range from 16 gigabytes to 500 gigabytes.
Terabytes- Personal computer and laptops store data on hard drives with 1 or 2 terabytes of space. Although 10 years back hard drives ranging from 80 GB to 500 GB were very common, but today they are rarely used in modern computers.
Petabytes- Cloud servicing companies like Amazon AWS or Google cloud platform maintain petabytes of storage data. According to estimates by Science Focus, the data stored collectively by Google, Amazon, Microsoft and Facebook is at least 1200 petabytes.
Types of memory
There are two types of memory in computers, one being primary memory or main memory and the other one being secondary memory. Devices like RAM and ROM come under primary memory which is used by the operating system to manage the memory needed to run the system and user applications. Devices like hard drives and flash drives are secondary memory as these are used to store large amounts of data but have slow read-write speed compared to primary memory. Hence the memory capacity of secondary memory devices is larger than main memory devices.
Primary memory
Let us take the example of powering on a computer and launching a web browser. When the user presses the power key, the computer fetched the boot information from BIOS (basic input output system) which is stored in ROM or the Read-Only Memory. To access the BIOS, tap the ‘Delete’ key multiple times after pressing the power button. BIOS is the communication link between the hardware and the operating system. Therefore ROM is a non-volatile memory because erasing this communication link means the computer can not detect hardware or the operating system. Whatever data is there on the ROM is written by the manufacturer and cannot be changed by the user. The size of a typical ROM ranges from 4 MB to 8 MB.
After the operating system boots up, there are many services and system applications which run in the background. All these applications run through RAM, which means Random Access Memory. When an application is launched, it is loaded onto the RAM from secondary memory and then the operating system executes it. Nowadays, RAMs in typical computers range from 4 GB to 32 GB. Video editing, software development software, and games consume a large amount of RAM as compared to browsers or media players. A larger RAM capacity enables the user to run a large number of applications simultaneously. Below is an image of a RAM with an inbuilt heat sink.
Secondary memory
Since the memory size of the primary memory is tiny, a storage device is required for programs and data. There was a large number of secondary memory used in the past like floppy disks, DVDs, magnetic tapes, etc. But, modern hard drives can store a relatively large amount of data and thus, have replaced them. Secondary memory can be divided into two types: floppy disks, DVDs, magnetic tapes, etc. But, modern hard drives can store a relatively large amount of data and thus, has replaced them. Secondary memory can be divided into two types:
Fixed storage devices
Devices like hard drives, SSDs, and flash memory are used in combination with primary memory for software and storage of user data. Although hard drives can be detached from the system and plugged into a different system, it is rarely required.
Removal storage devices
Flash drives, memory cards, and portable hard drives are used for the portability of data. Digital versatile disc or DVD is also a removable storage device but they are mostly not rewritable and rarely used nowadays.
Devices like hard drives, SSDs, and RAM are types of physical memory because these are actual devices that contain data. Among all of them, RAM is the only device that can be directly accessed by the CPU.
Virtual memory
Sometimes RAM space runs out and the operating system uses secondary memory space for primary memory. When some pages need to be loaded to the main memory but there is not much memory, then the OS looks for the least used RAM references and copy that to the secondary memory. This technique is an automatic memory allocation scheme, and it makes it look to the operating system that it has unlimited main memory. Virtual memory is also known as logical memory as it provides a layer of abstraction over the physical memory for the programmers/programs.
Fatal error
Applications are designed to throw exception errors when there is some problem with them. This allows the user to troubleshoot the error code. One of them is a fatal error which can happen due to several reasons.
If the RAM runs out of space and there is not much storage space left in secondary memory, then the fatal error may occur in the OS. In Windows machines, this may lead to the program being closed suddenly or a blue screen of death. A popular programming language PHP is used to develop a website. If there is a shortage of space in the server then it will likely produce a fatal error: allowed memory size exhausted.
Context and Applications
The fundamental of computer memory is a crucial subject to understand advanced topics in higher studies. It is studied in various courses like
- Bachelors of Technology in Electrical Engineering
- Bachelors of Science in Information Technology
- Bachelors of Software Engineering Honours
- Masters of Science in Computer Science
Practice Problems
Q1. What is the value of 1 MBps in kBps?
- 1000 kBps
- 1024 kBps
- 512 kBps
- 1048 kBps
Answer: a
Explanation: Although 1 MB is 1024 KB, 1 MBps is 1000 kBps.
Q2. What does memory usage represent in an operating system?
- Hard drive space
- CPU usage
- Used RAM
- Cache memory
Answer: c
Explanation: Memory usage in task manager or any system monitor represents the RAM usage in the operating system.
Q3. Which of the following is the fastest memory?
- Main memory
- Cache memory
- Virtual memory
- Secondary memory
Answer: b
Explanation: Cache memory holds frequently used data so that it can be accessed by the CPU when needed. It acts as a buffer between RAM and CPU.
Q4. How many bits are there in a single nibble?
- 4
- 8
- 2
- 6
Answer: a
Explanation: A nibble has 4 bits while a byte has 8.
Q5: Which device is preferred to store a large amount of data in gigabytes?
- RAM
- Registers
- CPU
- Hard drives
Answer: d
Explanation: Hard drives have disk space ranging from 500 gigabytes - 2 terabytes or more. Hence, they are used to store large user files.
Related concepts
- Memory locations
- Assembly language
- Logic gates
- Number system
Want more help with your electrical engineering homework?
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Search. Solve. Succeed!
Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.
Digital Electronics
Semiconductor Memory
Types and Size of Semiconductor Memory
Memory Size Homework Questions from Fellow Students
Browse our recently answered Memory Size homework questions.
Search. Solve. Succeed!
Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.