Units of Storage, Explained

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

← 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 →

Earn 3 college credits for Introduction to Operating SystemsRecommended for credit by NCCRS · Computer Science 354 · self-paced · one payment, lifetime access

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.

Compare: Linux vs Operating Systems

Why take it here

Why students take Introduction to Operating Systems with UPI Study

What happens under every app you runIntroduction to Operating Systems explains the software that runs a computer: processes and scheduling, threads and synchronization, deadlock, memory and paging, devices and storage, file systems, networking, security and virtualization. It suits computer science and information technology degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

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.

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?
A 1 TB drive shows about 931 GB because the maker counts in thousands while Windows counts in 1,024s. The drive holds one trillion bytes. Windows divides by 1,024 three times, which gives 931.32 binary gigabytes, but it still labels them GB. No space is missing. Formatting uses a little room for file system bookkeeping, but the unit difference causes most of the gap.
What is the difference between a gigabyte and a gibibyte?
A gigabyte, GB, is one billion bytes, while a gibibyte, GiB, is 2 to the 30th power, or 1,073,741,824 bytes. The IEC introduced binary names such as kibibyte, mebibyte and gibibyte in 1998 to end the confusion of kilo meaning both 1,000 and 1,024. A quick rule: a unit with an i counts in 1,024s, and one without an i counts in 1,000s.
How do you convert megabits per second to megabytes per second?
Divide megabits per second by 8 to get megabytes per second, because each byte has 8 bits. A 100 megabit per second connection moves at most 12.5 megabytes each second. At that rate, a 3 gigabyte download takes at least 240 seconds, or 4 minutes. Real downloads are usually slower because of overhead and because the connection is shared.
Do Mac and Windows report storage sizes the same way?
No, macOS and Windows report storage sizes differently. Windows divides by 1,024 but writes GB, so a 1 TB drive appears as about 931 GB. Macs have counted in decimal thousands since 2009, so the same drive appears as 1 TB. When a size looks wrong, first check which counting system the screen uses before assuming any space is missing.

About the Introduction to Operating Systems course

How many college credits is Introduction to Operating Systems?
Introduction to Operating Systems (Computer Science 354) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Operating Systems cost and what is included?
$250, paid once, with lifetime access: all 83 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Operating Systems take?
It is self-paced with no deadlines. The 83 lessons total about 10 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

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

Introduction to Operating Systems
3 credits · NCCRS
Enroll →