Why is data stored in a binary format?
Data is stored in binary format because computers are electronic devices.
They fundamentally rely on representing information using two distinct states: on or off, represented by 1 or 0 respectively. These binary digits, or bits, are the foundation of digital data storage and processing.
Example:
Consider a light switch. It can be either on (1) or off (0). Similarly, in a computer's memory, each tiny switch-like component can store a single bit, either a 1 or a 0.
🗝️ Key points to remember:
Binary is the language of computers: All data, whether text, images, or sound, is ultimately converted into binary code for storage and processing.
Two states: Binary uses only two digits, 0 and 1, making it a simple and efficient system for electronic devices.
Basis of digital technology: The binary system underpins all modern computing and digital communication.
❌✅ Misconceptions
❌ Binary is only for numbers.
✅ While numbers are readily represented in binary, all types of data, including text, images, and sound, can be encoded using binary.
❌ Binary is difficult to understand.
✅ While binary may seem complex at first, it's based on a simple two-state system that's easily grasped once the fundamentals are understood.
To calculate the required storage capacity for a given set of files, you need to determine the total size of all the files and ensure the storage device has enough capacity to accommodate them.
Example
Suppose you have the following files:
Document.txt (50 KB)
Image.jpg (2 MB)
Video.mp4 (500 MB)
Calculation Steps
Convert all file sizes to the same unit: (in this instance we will reduce to KB)
Document txt: 50 KB
Image jpg: 2 MB * 1000 = 2000 KB
Video mp4: 500 MB * 1000 = 500,000 KB
Add the file sizes together:
Total size = 50KB + 2000KB + 500,000KB = 502,050 KB
Convert the total size to a more convenient unit if necessary:
502,050 KB / 1000 = 502.05 MB
Total size = 502.05 MB
🗝️Key points to remember
Consistent units: Ensure all file sizes are in the same unit before adding them.
Conversion factors: Remember the conversion factors between kilobytes (KB), megabytes (MB), and gigabytes (GB).
❌✅ Misconceptions
❌ Forgetting conversion to find common unit. (i.e. making sure all are KB)
✅ Failing to convert all file sizes to the same unit can lead to inaccurate calculations.
sound file size = sample rate * duration (s) * bit depth
image file size = colour depth * image height (px) * image width (px)
text file size = bits per character * number of characters