UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 4.3 Free with a free account
Units of Storage
Introduction to Operating Systems · Chapter 4: Memory ManagementSection 4.3 · lesson 27 of 837 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Introduction to Operating Systems.
Lesson complete
Earn the 3 college credits for Introduction to Operating Systems
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: The History of Data Storage →← Storage TechnologiesNext lesson: The History of Data Storage →
A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →
In this lesson
Why decimal and binary prefixes make a 1 TB drive look smaller.
- Distinguish bits from bytes and the symbols b and B
- Compare decimal units (KB, MB, GB, TB) with binary units (KiB, MiB, GiB, TiB)
- Convert a drive's advertised capacity into the size Windows reports
- Estimate a minimum download time from a speed in megabits per second
Free study notes
Get this lesson's notes by email
The key points and 4 practice questions with answers, in your inbox. One email, free.
One email. Unsubscribe in one click.
Transcript
Everything said in the video, section by section (885 words). Read along, or search it.
Opening Puzzle
A 1 TB Drive Shows 931 GB
Sam, who runs a small online bakery, buys a new one terabyte drive for the shop's backups. Plugged into the old laptop, it shows up as only 931 gigabytes. Did the store cheat? Is the drive broken? Neither. Two honest ways of counting are colliding. By the end of this lesson, you'll work out that 931 yourself.
Bits and Bytes
Bytes Take Capital B, Bits Lowercase
Start small. A bit is one yes-or-no value, a 0 or a 1. A byte is 8 bits. Storage is counted in bytes, because one byte's 256 patterns are enough for one text character. A thousand letters take about a thousand bytes. Watch the letter case. A capital B means bytes. A small b means bits. Storage sizes use bytes: a 4 gigabyte file, a 500 gigabyte drive. Network speeds use bits: a plan of 100 megabits per second.
Decimal Units
Prefixes That Step by a Thousand
For big amounts, we add prefixes: kilo, mega, giga and tera. In everyday science, kilo means a thousand. A kilometer is a thousand meters. Drive makers use the same meaning. A kilobyte is a thousand bytes, a megabyte a million, a gigabyte a billion, and a terabyte a trillion. Each step multiplies by a thousand. These are the decimal units.
Binary Units
Kibibytes and the IEC Names
Computers, though, count in powers of 2. The power of 2 closest to a thousand is 2 to the tenth: 1,024. Memory chips come in sizes like that, so early programmers called 1,024 bytes a kilobyte, too. One word with two meanings caused confusion. So in 1998, the standards body IEC gave the binary sizes their own names. A kibibyte, written KiB, is 1,024 bytes. Then come mebibytes, gibibytes and tebibytes. Each step multiplies by 1,024. A quick rule: if the unit has an i in it, it counts in 1,024s. No i, and it counts in 1,000s.
Code Walkthrough
How Far the Two Ladders Drift
How far apart do the two ladders drift? This short Python program climbs both of them. For each prefix, it works out a thousand to that power, then 1,024 to that power, and how much bigger the binary one is, in percent. Run it. At kilo, the binary unit is only 2.4 percent bigger. At mega, it's almost 5 percent. At giga, over 7. And at tera, nearly 10 percent. That's exactly the size where today's drives live.
Worked Example
A Trillion Bytes Is 931.32 GiB
Drive makers use the decimal meaning. A one terabyte drive holds a trillion bytes. Windows shows sizes in binary units, but still labels them GB. So it divides by 1,024, three times. Run it. A trillion bytes is 1,000 decimal gigabytes, and 931.32 binary ones. There's Sam's 931. Every byte is there. Only the unit changed. Formatting a drive does use a little space, for the file system's own bookkeeping. But the big gap on a new drive comes from the units.
Operating Systems
Windows and Mac Count Differently
Not every system counts the same way. Windows counts in 1,024s and writes GB, so a 1 terabyte drive shows as about 931 GB. Macs have counted in thousands since 2009, so the same drive shows as 1 TB there. So whenever a size looks wrong, first check which unit you're looking at.
Common Slip
Divide by 1,024, Don't Multiply
Change one thing: make it a 500 gigabyte drive, which is 500 times a thousand cubed. Run it again. Five hundred billion bytes, and 465.66 gibibytes. A common slip is to multiply by 1,024 instead of dividing. That gives a bigger number, which can't be right. A gibibyte is the bigger unit, so you always need fewer of them.
Network Speeds
Divide Bits by Eight
Speeds are the other trap. Network speeds count bits per second, but file sizes count bytes. So divide by 8. A plan of 100 megabits per second, then, moves at most 12.5 megabytes each second. So a 3 gigabyte game takes at least 4 minutes to download. Real downloads are usually slower than that, because of overhead and sharing.
Sense of Scale
Everyday File Sizes
For a feel of scale, here are everyday sizes. They're rough, and they vary with quality. A short text message is a few hundred bytes. A page of plain text, a few kilobytes. A phone photo is a few megabytes. A feature-length film, gigabytes. And a company's backups can run to terabytes.
Quick Check
What Windows Shows for 2 TB
Quick check. A school's help desk buys a 2 terabyte drive, and plugs it into a Windows PC. Here's the program, set to 2 terabytes. About what size will Windows show? About 1,863 GB, about 2,000 GB, or about 2,147 GB? Pause and predict. About 1,863. Run it. Two trillion bytes, divided by 1,024 three times, is 1,862.65 binary gigabytes. And Windows writes GB. 2,000 is the decimal count. That's what a Mac would show. And 2,147 comes from multiplying instead of dividing. It's too big, because the binary unit is the bigger one.
Real Case
Every Byte Was There
Back to Sam's new drive. Ivy, who looks after the computers at a school, opened a calculator. Take a trillion bytes, she said. Divide by 1,024 three times. Sam stared at 931.32. So I got every byte after all? Every one, said Ivy. The box counts in thousands, and the laptop in 1,024s.
Key Takeaways
Thousands, 1,024s and Eight Bits
To recap. A byte is 8 bits. Capital B means bytes, and small b means bits. KB, MB, GB and TB step up by a thousand. KiB, MiB, GiB and TiB step up by 1,024. A 1 TB drive is 931.32 GiB: nothing is missing, only the unit differs. And network speeds count bits, so divide by 8 to get bytes.
About Introduction to Operating Systems at UPI Study
Introduction to Operating Systems (Computer Science 354) is a self-paced online course of 83 video lessons in 10 chapters, from what an operating system does and process scheduling to concurrency, memory, devices, file systems, networks, the internet, security and virtual machines. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Compare: Linux vs Operating Systems
Why take it here
Why students take Introduction to Operating Systems with UPI Study
Where the credit goes
Universities that work with NCCRS
Introduction to Operating Systems carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Units of Storage
Why does a 1 TB hard drive show only 931 GB?
What is the difference between a gigabyte and a gibibyte?
How do you convert megabits per second to megabytes per second?
Do Mac and Windows report storage sizes the same way?
About the Introduction to Operating Systems course
How many college credits is Introduction to Operating Systems?
How much does Introduction to Operating Systems cost and what is included?
Which universities accept UPI Study credits?
How long does Introduction to Operating Systems take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Introduction to Operating Systems.
83 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
Updated
3 credits · NCCRSEnroll →