Bits vs. Bytes

Ever wonder exactly how fast your internet is? Why the 120 gigabyte hard drive you bought is only 111 gigabytes according to your computer? I’ve encountered a lot of confusion explaining these concepts to clients over the years. This mainly stems from the confusion about bits and bytes, two units that measure data. While many people use the two terms interchangeably, they are not the same thing.

Techy Russian Dolls

Techy Russian Dolls (Image Credit: LaughingSquid.com)

Computers use binary to compute and store data. The binary numeral system (base 2) consists of 1′s and 0′s which represent ‘on’ and ‘off,’ respectively, to the computer. A bit is a single binary digit, and therefore is read as either a 1 or and 0 by the computer. A byte is a collection of eight bits in modern computing systems, and therefore consists of a sequence of eight 1′s or 0′s.

For a (somewhat) practical example of how bits and bytes work, lets look at writing a sentence on your computer. The alphabet consists of 26 letters, each with an upper and lower case symbol, there are 10 numbers (0-9), and a wide variety of symbols, equaling a fair number of different characters that must be represented. Since a byte is 8 bits long, there are 255 different possibilities that a byte can represent (11111111 in binary is 255). This is the foundation for the ASCII (American Standard Code for Information Interchange) system, which assigns a different character for each possibility. The shortest complete sentence, “I am.”converts to 0100100100100000011000010110110100101110 in binary, which is 40 bits or 5 bytes long. If you separate that string into sequences of 8 bits, you can see that 01001001 is ‘I’, 00100000 is the space, 01100001 is the ‘a’, etc. etc. This goes to show how bits and bytes are used to represent data on your computer, and how different the two terms are.

Anyways, it’s when you get to the speed of your internet connection that bits vs. bytes becomes increasingly relevant. When you go to order high speed internet, you’ll usually see Mbps after the connection speed. This stands for megabits per second, not megabytes per second like many think. A 1 Mbps (1,000,000 bits per second) connection is fast enough for most people, it allows a max download speed of about 125 kBps (kilobytes per second), but connections go as fast as 1 Gbps (gigabits per second [1,000,000,000 bits per second]) which allows a max download speed of 125 megabytes per second. People often write MBps when they mean Mbps, this is most likely a mistake. A 5MBps connection would be very expensive for anyone but a very large business.

As to why that new hard drive you bought isn’t as big as you thought it would be, the discrepancy comes from the fact that hardware manufacturers cut corners when they do their calculations. Since binary uses just two different symbols, the way you count is different from that in base ten. 1 in binary is 1 in base ten, 10 in binary is 2 in base ten, 100 is 4, 1000 is 8, and so on and so forth. It advances in powers of two, This means that it takes 1024 bytes to make a kilobyte, 1024 kilobytes to make a megabyte, and 1024 megabytes to make a gigabyte. The people who make hard drives cheat and assume that 1000 bytes is a kilobyte, 1000 kilobytes is a megabyte, and 1000 megabytes is a gigabyte and say it’s close enough that it doesn’t matter. They say that a hard drive which holds 120,000,000,000 bytes holds 120 gigabytes, while in actuality it only holds 111 gigabytes (120,000,000,000 ÷ 1024 ÷ 1024 ÷ 1024). This is why you never get as many gigabytes as you think you do.

Even people in the tech world have trouble with this concept of bits vs. bytes at times, but hopefully now you won’t. While this subject may not seem terribly important, it’s very relevant to computing in general and is a good bit of trivia. I hope that this post hasn’t bored you too much, and that you walk away knowing something new.

Leave a Reply