A bit about the bit

This definitely qualifies as a “computer science” term that you don’t need to know. (There won’t be a quiz.) This page is entirely optional.

Still, it’s a simple thing, so why not take it in?

Just a little bit

A bit is the smallest unit of information possible in computing. It’s something that exists in one of two states. Like a switch: something that can be flipped either this way or that way.

If you want to store information, what good is a simple switch? Not much! Let’s see: we could use it to store the information “on” vs “off”. Or “left” vs “right”. Or “she loves me” vs “she loves me not”. Or something of similarly little use…

Here’s the point, though. Clever people quickly realized that while a single bit means little, combinations of bits can represent much more. Think of Morse code: the ability to communicate either a dash or a dot – that’s a bit! – means nothing. But if we define certain combinations of dashes and dots as representing letters of the alphabet, we can now communicate complete old-timey telegrams with those simple bits.

More astutely, people realized that combinations of bits could represent numbers in a very logical way. Like this: A single bit has two states; let’s call these “on” and “off”. With a single bit, we can represent two numbers – say, 1 if the switch is on and 0 if it’s off. Wow! That’s…

…uh, okay, a single bit is great for representing a choice of two numbers, but that’s hardly useful, is it now.

A bigger byte

Wait, there’s a way to make this useful. Go back to that stuff about combining bits, and place two bits together. We now have four possible configurations: 1. first and second bits both off; 2. just the first bit on; 3. just the second bit on; and 4. first and second bits both on. That means we can represent any of four numbers, like 1, 2, 3, and 4… or even better, 0, 1, 2, and 3. (That’s better because 0 is a really useful number. We want a 0!) If we add another bit, so we now have three bits, we can represent twice as many configurations: any one of eight numbers. With four bits, we can represent any of sixteen numbers. And so on: just by using enough “switches”, our simple on/off bits can represent any number.

Wait, that’s just the beginning. Now that we have numbers, we can also decree that, in the right contexts, the numbers stored in switches will represent letters of the alphabet, punctuation marks, and so on. Voila: we can now effectively record text in our switches.

Usually, eight bits are used to represent a character of text. That’s because eight bits can represent any of 256 configurations, which is enough to handle the 26 lower-case letters and 26 upper-case letters of the English alphabet, common accented or other “non-English” letters from other alphabets (you know, “é” and “ö” and “Å” and so on), the digits 0 through 9, common punctuation marks, a few common mathematical symbols, and more. Because of this, a grouping of eight bits even gets a special name: a byte.

More than just text!

Now try this: Take a bunch of switches representing a number, and use that number to represent something completely different – say, intensity of light. Say we use eight switches (eight bits – that’s one byte!), which can represent any one of 256 numbers. Let each number indicate a shade of gray, including jet black at one end and pure white at the other end.

Okay, our switches are now recording a specific shade of gray; what use is this? Well, imagine displaying that shade as a little dot on the computer’s screen. Now take another eight switches, and use those to indicate the shade of gray that goes into the next little dot on the screen. And again. And again. Do this with thousands or even millions of these bunches of switches, until… presto, your many little dots now represent an entire black-and-white image, with each dot black, white, or one of over 250 degrees of gray in between.

Don’t stop there! We know that any color can be created from combinations of basic colors of light, like red, green, and blue. So now let’s take that same bunch of eight switches and instead use it to represent the intensity of the color red. Then do the same for green, and then for blue. This big bunch of twenty four switches (eight each for red, green, and blue) can now represent one dot of a specific color. With enough switches to define thousands or millions of these dots, you’re now storing information that represents a color image.

And so on. With even more ingenuity, people have figured how just about anything – even sounds, like music – can be represented as big bunches of numbers, stored using lots and lots of simple switches.

And that’s the story of computers. They’re devices born of two big insights: 1) The realization that we’re able to build giant collections of switches that can be easily flipped (at first, smallish numbers of slow, clacking mechanical switches in giant boxes; now, incredible numbers of lightning-fast, silent electronic switches in tiny chips); and 2) The realization that, by assigning meaning to bunches of switches, we can store and manipulate numbers, or letters and symbols, or colors, or sound, or any sort of information cleverly represented using numbers.

A whole lotta bits and bytes

Kilobytes! Megabytes! Gigabytes! And these days, it’s time to throw in terabytes too.

You’ll hear these words a lot in talk about computers, but they’re not exactly self-explanatory, are they. But do take a moment to read on and learn. These words are really easy to understand, and really useful once you do.

Bigger units

You know that your computer deals with data: data representing text, music, videos, and more. The applications that you use – the email software, web browser, games, and more – are also made of data.

You also know that this data is physically stored somewhere. That’s most commonly a device inside the computer called a hard disk or hard drive (same thing, different names), but there are plenty more places to store data: on CD or DVD disks, on additional hard drives attached to the computer by cable, on little memory devices (cards, “thumb drives”, etc.) that plug in to the computer, and so on. More and more, people are even storing data on other computers located far away, sending the data back and forth using the Internet.

Wherever a piece of data is stored, here’s the important thing: there’s some certain amount of it. And just as a bucket can only hold so much water, a device that stores data can only store so much of it.

Amounts of data are measured by their number of bits or bytes (i.e., eight bits). But when the amounts get big, these little units become inconvenient, so we use bigger units. (It’s the same reason why we switch to yards or meters to measure medium-sized lengths, and then switch to miles or kilometers to measure even longer lengths. Otherwise we’d be saying things like, “Oh, you live by the dairy farm? That’s just 190,000 inches down the road from me.”)

Here are the “big units” commonly used to discuss data. It’s definitely worth being a little familiar with these!

Kilobytes, Megabytes, Gigabytes, and Terabytes

Kilobyte (a.k.a. KB, kb, K, k, kbyte, etc.): A kilobyte is about 1,000 bytes. (I know, saying “about” is odd. In some contexts, it means precisely 1,024 bytes; in other contexts, 1,000 bytes. “About 1,000 bytes” is good enough!)

One or several kilobytes is still a very small amount of data, for most practical purposes: a simple text-only email message, or a tiny little graphic file, might consist of just a few kilobytes of data.

Say you need to download a file from the Internet, and the file is several kilobytes in size. Should that take long? Nope. Even if your Internet connection is very slow, downloading that file should happen in an instant. And you almost certainly don’t need to worry about that tiny bit of data “taking up space” on your computer.

Megabyte (a.k.a. MB, mb, M, mmbyte, etc.): A megabyte is about 1,000 kilobytes (or 1 million bytes). These are more substantial chunks of data: one or several megabytes might be the amount of data in a very long work of text, or the amount of data that makes up a photo taken with your smartphone camera. (Several megabytes of data is also a limit on the amount of data that some stingy email services will let you attach to an email message.)

Depending on the speed of your Internet connection, downloading a file of a few megabytes in size may be nearly instant, or may leave you with a few moments to twiddle your thumbs. And unless your computer is really strapped for remaining space to store data, that file probably won’t take up any appreciable space. (However, a lot of multi-megabyte files, like most smartphone camera photos, can add up and really start taking up space!)

Gigabyte (a.k.a. GB, gb, G, ggbyte, etc.): A gigabyte is about 1,000 megabytes (or 1 million kilobytes, or 1 billion bytes). One or several gigabytes represents a big amount of data, such as that in a big video file, or an application that takes up a fair amount of storage. As of this date, sending files that big by email is generally possible only with special services designed to handle such heavy loads.

Depending on the speed of your Internet connection, downloading a file of a few gigabytes in size probably leaves you time to get a cup of coffee. Or maybe dinner.

Terabyte (a.k.a. TB, tb, T, t, tbyte, etc.): A terabyte is about 1,000 gigabytes (or 1 million megabytes, or 1 billion kilobytes, or 1 trillion bytes). As of this date, you’re very unlikely to run across any sort of file even approaching a terabyte in size. Your computer may not even be able to store a terabyte of date inside it. (As of this date, computers with hard disks that store 1 terabyte of data are becoming common, but many computers out there have hard disks storing only a fraction of that.)

As for downloading… I’ve never downloaded a terabyte-sized file, and I don’t expect you or I will do so soon. It’d take a long time, and you’d need at least a terabyte of unused storage space to save the file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.