The difference between a bit and a byte

comment No Comments Written by Anders on July 23, 2008 – 5:54 pm

This is a Quick Reference and I promise to be brief and simple, but it’s important that you have a grasp on at least the basics of computer math. You need to know the difference between a bit and a byte, a megabyte and a gigabyte, and just enough binary math to know that it’s not the same as decimal logic. Why bother to understand how a computer counts? Because you live in a world that mixes mathematical metaphors.

Humans get along pretty well in a system derived (and supported) by the fact that they have ten fingers; we discover at an early age that, in the number 123, that as we progress from right to left, each digit is based on 10 times the value of the previous digit. Think of 123 as this: three ones, two tens, and one hundred.

For computers, though, thinking in leaps of tens requires extra steps and translations. Instead, nearly every computer ever developed works on a much simpler binary system. Each value in a computer number can have only two values: 0 or 1, or yes or no, or true or false. So, a computer’s way of dealing with that same number would be this: 01111011. Here’s how to translate that, again from right to left: one 1, one 2, zero 4s, one 8, one 16, one 32, one 64, and zero 128s. Do the math (switching back to human logic) and you come up with 123 in decimal math.

That’s it - your entire course in binary math. As a user, you don’t ever have to use this sort of binary logic; that’s the computer’s business. But the mixing and matching begins when you think about the size of storage devices (and memory) for a laptop computer. Bits and bytes The smallest unit of measure in a computer is the bit, which is just a single 0 or 1 in a string of information in an 8- or 16-bit computer word. Back to my example: 01111011 (in digital translation, 123). That word could represent a particular color in an image file, a specific tone in an audio file, or a character code from the keyboard. (From the keyboard, 01111011 transmits the curly bracket - { - to be displayed onscreen or stored in a file.)

The next step up is a byte, which is made up of eight bits. Everything your computer does, and everything it stores, is constructed of strings of bytes; think of a byte as a character in a word. Older computers manipulated words made up of 8 bits or 1 byte, while most modern machines are based around 16-bit or 2-byte words. “Aha,” you may be saying, “my computer has 512 megabytes of RAM, and so that means it has the capacity to hold 512 million bytes.” That’s correct . . . sort of.

When computer designers began thinking beyond 0s and 1s to much larger numbers, they adopted mostly Greek prefixes for bytes: kilo, mega, giga, and tera for (roughly) one thousand, one million, one billion, or one trillion. But in a binary world, these values were based on powers of 10: 210 is 1,024, which is slightly larger than 1,000. As numbers go up, that error becomes larger and larger.

Here are the common abbreviations in computer math, their real value, and their incorrect but commonly used digital values.

And so the bottom line: Your laptop’s 20GB drive has the capacity to store something like 21,474,836,480 characters of information. In actuality, that number’s reduced by 20 to 30 percent because the computer needs to devote some of the space for things like indexes and markers, as well as separators, between the bytes.

And one more thing: Hard drive manufacturers (and the laptop makers who sell their devices) have an unpleasant habit of mixing and matching binary and digital math when it’s to their benefit. For example, a drive may have the capacity for something like 19.5 billion characters in digital math; the maker (or its marketing department) may call that a 20GB drive.

Between the laboratory and the store shelf, the real capacity of that drive has lost 500 million characters because of rounding up to an even number, plus an additional 184 million or so characters because a number that started as a digital value is being expressed as a binary one.

What this means to you is this: Be sure you’re comparing binary to binary or digital to digital when you appraise the size of a drive.

Bookmark or Share:
  • E-mail this story to a friend!
  • Technorati
  • StumbleUpon
  • Facebook
  • Google
  • del.icio.us
  • Digg
  • Slashdot
If you enjoyed the article, why not subscribe?

Browse Timeline

  • No Related Post

Post a Comment

About The Author: Anders

Anders is a freelance graphic designer. He specializes in CSS/XHTML web design and design of print materials including business cards, brochures and flyer’s. You can view his portfolio at andershaig.com.

Want to subscribe?

SEO blog and web design related issues. Subscribe in a reader Or, subscribe via email:
Enter your email address: