UNITS OF STORAGE IN COMPUTER -JH2
Units of Storage in Computer — Interactive Guide
Introduction
A number system is a collection of symbols (digits) used to represent numbers, and a unit of storage tells us how much digital information can be held. Computers use bits and bytes to measure and store data. This guide covers the common storage units, how to convert between them, and many worked examples.
Basic Units — Definitions
- Bit (b): Short for binary digit. The smallest unit of data; value is 0 or 1.
- Byte (B): 1 byte = 8 bits. Used to store a single character (letter, number, symbol).
- Kilobyte (KB): Usually 1 KB = 1024 bytes in computing contexts.
- Megabyte (MB): 1 MB = 1024 KB = 1,048,576 bytes.
- Gigabyte (GB): 1 GB = 1024 MB.
- Terabyte (TB): 1 TB = 1024 GB.
Storage Units Table (binary)
| Unit | Abbreviation | Value (bytes) |
|---|---|---|
| Bit | b | — (1 bit) |
| Byte | B | 8 bits |
| Kilobyte | KB | 1024 B |
| Megabyte | MB | 1024 KB = 1,048,576 B |
| Gigabyte | GB | 1024 MB |
| Terabyte | TB | 1024 GB |
Conversions — Practical Methods & Worked Examples
Bits ↔ Bytes
1 byte = 8 bits. To convert bits → bytes divide by 8; bytes → bits multiply by 8.
Higher units (using 1024)
Use 1024 when converting between KB, MB, GB, etc. Example: 1 MB = 1024 KB.
Worked example — 2048 bytes to KB
2048 ÷ 1024 = 2 → 2048 bytes = 2 KB
Worked example — 5 GB to MB
5 × 1024 = 5120 MB → 5 GB = 5120 MB
Conversions Between Number Systems (Binary / Octal / Hex / Decimal)
Binary → Octal (group by 3 bits)
Group binary digits into sets of 3 (from right). Use the table below.
| Binary (3 bits) | Octal |
|---|---|
| 000 | 0 |
| 001 | 1 |
| 010 | 2 |
| 011 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
11100101₂ to octal.
11100101₂ → group: (011)(100)(101) → 3 4 5 → 345₈
Binary → Hex (group by 4 bits)
Group binary digits into sets of 4 (from right). Use the table below (0–F).
| Binary (4 bits) | Hex |
|---|---|
| 0000 | 0 |
| 0001 | 1 |
| 0010 | 2 |
| 0011 | 3 |
| 0100 | 4 |
| 0101 | 5 |
| 0110 | 6 |
| 0111 | 7 |
| 1000 | 8 |
| 1001 | 9 |
| 1010 | A |
| 1011 | B |
| 1100 | C |
| 1101 | D |
| 1110 | E |
| 1111 | F |
11100101₂ to hexadecimal.
11100101₂ → group (from right): (1110)(0101) → E 5 → E5₁₆
Binary → Decimal (place-value)
Multiply each binary digit by powers of 2 and add results.
111100000000₂ to decimal.
1×2¹¹ + 1×2¹⁰ + 1×2⁹ + 1×2⁸ = 2048 + 1024 + 512 + 256 = 3840₁₀
Decimal Conversions (to Binary / Octal / Hex)
Decimal → Binary (division by 2)
1920₁₀ to binary.
1920 ÷ 2 = 960 rem 0
960 ÷ 2 = 480 rem 0
480 ÷ 2 = 240 rem 0
240 ÷ 2 = 120 rem 0
120 ÷ 2 = 60 rem 0
60 ÷ 2 = 30 rem 0
30 ÷ 2 = 15 rem 0
15 ÷ 2 = 7 rem 1
7 ÷ 2 = 3 rem 1
3 ÷ 2 = 1 rem 1
1 ÷ 2 = 0 rem 1
Read bottom→top = 111100000000₂
Decimal → Octal (division by 8)
1792₁₀ to octal.
1792 ÷ 8 = 224 rem 0
224 ÷ 8 = 28 rem 0
28 ÷ 8 = 3 rem 4
3 ÷ 8 = 0 rem 3
Read bottom→top = 3400₈
Decimal → Hex (division by 16)
47806₁₀ to hexadecimal.
47806 ÷ 16 = 2987 rem 14 → E
2987 ÷ 16 = 186 rem 11 → B
186 ÷ 16 = 11 rem 10 → A
11 ÷ 16 = 0 rem 11 → B
Read bottom→top = BABE₁₆
Octal and Hexadecimal Conversions
Octal → Binary (lookup each digit → 3 bits)
345₈ to binary.
3→011, 4→100, 5→101 ⇒ 011100101₂ ⇒ 11100101₂ (leading zero optional)
Octal → Hex (two-step: octal → binary → hex)
345₈ → binary → hex = E5₁₆ (see earlier examples)Hex → Binary (lookup each digit → 4 bits)
A2DE₁₆ → A=1010, 2=0010, D=1101, E=1110 ⇒ 1010001011011110₂
Hex → Octal (hex → binary → octal)
A2DE₁₆ ⇒ binary ⇒ group in 3s ⇒ octal = 121336₈ (worked in full steps earlier)
Hex → Decimal (place-value)
A2DE₁₆ to decimal:
A2DE₁₆ = (10×16³) + (2×16²) + (13×16¹) + (14×16⁰)
= 40960 + 512 + 208 + 14 = 41694₁₀
Practice Questions (click to reveal answers)
11100101₂ to octal.
345₈11100101₂ to hexadecimal.
E5₁₆111100000000₂ to decimal.
3840₁₀1792₁₀ to octal.
3400₈47806₁₀ to hexadecimal.
BABE₁₆5,368,709,120 bytesTeacher Tips & Notes
- Use grouping shortcuts for binary↔octal (3 bits) and binary↔hex (4 bits) to save time.
- When converting fractions (binary fractions), multiply fractional part by base and take whole parts in order.
- Clarify manufacturer vs OS displays: manufacturers may use 1000-based units while OS often shows 1024-based units.
ok
ReplyDelete