Disclaimer: This is my interpretation of the concepts in computer and networking the way I understand it. Everyone has a different understanding of the topics, and how everyone sees something could be different; I am just showing this from my perspective. Of course, what I understood could very well be misinformed or totally wrong. Please do not treat what you see here as fact and always do your own research. These should be for entertainment and comedic purposes only 😉. Enjoy!
Hello there, Welcome to another lesson with me, Prof. Laz, and this is Noob 101. We will be talking about everything, though as random as it might be about computers and technology. I hope you will go along with the ride and maybe learn something (perhaps not too significant), but hey, it wouldn’t hurt to have some idea about what people are talking about, right?
Today’s topic is about bits and bytes. These are the most fundamental building block of computers when storing and processing data. Everything we are seeing, using right now, is the result of the intricate re-arrange of those building blocks created. It is pretty much like how we humans are made up of tiny cells combined and arranged to make us how we are. These are the same concept applied but for computers. I always joke around with friends that technology has a lot of similarities to biology, just that one study the field of a living being (Bio) and one study the mechanical being (computers, mech). You might say this is ridiculous since they are nothing alike. However, you might be surprised how something could have an equivalent concept and could be translated directly one for one. Of course, this is just my humble opinion from observation based on my shallowed amount of knowledge, I want to share with you my point of view, and it was not my intention to convince you that what I said is factually correct. Everyone is entitled to their own opinion, after all.
It looked like I went off-topic yet again🤪. If you would excuse me, Where were we again? Right, Bits and Bytes is today’s topic. Here is the breakdown of our lesson for today.
1. What are Bits?
2. What are Bytes?
3. Prefix of the unit
4. The takeaway
What are Bits?
I know you are wondering, I build up all the suspend to the question, shouldn’t it be the time for me to answer it? And yes, you are correct; I shall answer the question now: Bit(verb) is the past tense of Bite(verb). So when you say, “He bit me yesterday,” you are trying to tell us the story of how your vampire boyfriend gave you a byte…Eh, bite yesterday. 😂
With all the jokes aside, Do you remember our previous lesson about Binary and How I mentioned that it was the only way computers knew how to interpret the data and interact with the world since it was the only language computer understood? And in binary, it only consists of 0 and 1. Each 0 and 1 is a bit made up of the computer language/data structure and what the computers understood.
So, for example, if you have 1001. This consists of 4 bits 1, 0, 0, and 1. Simple as that. So yea, it is not some crazy thing you might expect, bit is simply 0 or 1, and that is it—nothing more, nothing less. The only important factor is how you put those bits to create strings that carry meaning, and the computer understands it.
What are bytes?
Now you know what a bit is, then what is a byte? Let me ask you this, what is a dozen of eggs? Too random of a question, you say? Of course, it’s not that random as you might think. A dozen eggs consist of 12 eggs, the egg being the base unit. What if I told you that bytes comprised 8 bits, the bit being the unit😉. That is right, 8 bits = 1 byte. Does that answer your question?
Let’s write it out, shall we? 1 byte = 8 bits, so the possibility of the value of a byte is from 00000000 to 11111111 or 0 to 255. If you were wondering how the value of a byte is from 0 to 255, you have to look at how to write binary into the number system we are using from the previous lesson, but here is the short version.
00000000 =(0*128)+(0*64)+(0*32)+(0*16)+(0*8)+(0*4)+(0*2)+(0*1)=0
00000001 =(0*128)+(0*64)+(0*32)+(0*16)+(0*8)+(0*4)+(0*2)+(1*1)=1
00000010 =(0*128)+(0*64)+(0*32)+(0*16)+(0*8)+(0*4)+(1*2)+(0*1)=2
00000011 =(0*128)+(0*64)+(0*32)+(0*16)+(0*8)+(0*4)+(1*2)+(1*1)=3
…………………………………………………………………………………….
…………………………………………………………………………………….
11111111 =(1*128)+(1*64)+(1*32)+(1*16)+(1*8)+(1*4)+(1*2)+(1*1)=255
There you have it; the assignment of bits in a byte can determine the value of the byte from 0 to 255. Keep these numbers in mind since you probably will see them around quite a bit (not the bit bit but bit )😉
Prefix of the unit
This is where the fun begins. Usually, you wouldn’t hear people saying anything about bits or bytes, right? Practical daily use, that is. But I bet you are seeing something like megabyte, gigabyte… So you ask yourself? What are these even mean? Well, I’m glad you ask. They are the prefix of a specific base unit. For the case of a megabyte, the base unit is a byte, and the prefix is mega. Here is the handy little cheat sheet that simplifies the prefix (of course, some people might argue that this is wrong, but well, this is how I see it)
Kilo(k) = 1000 * unit
Mega(M) = 1000 kilo = 1000,000 *unit
Giga(G) = 1000 Mega = 1000,000 Kilo = 1000,000,000 *unit
Tera(T) = 1000 Giga = 1000,000 Mega = 1000,000,000 Kilo = 1000,000,000,000 * unit.
The last prefix isn’t really in use for ordinary people, but I just put it here for your information. Peta(P) = 1000 Tera, Exa(E) = 1000 Peta, Zetta(Z) = 1000 Exa, and Yotta (Y) = 1000 Zetta . Honestly, I only know up until Exa, Zetta, and Yotta are pretty much what I got from looking up on Wikipedia, but well, the principal remains the same. The latter prefix is a multiple of 1000 from the previous.
So, in short, if you hear someone say 1 kilobyte, you can say it is 1000 bytes. Or when someone says 1 terabyte, it just means 1000 Gigabytes or 1 trillion bytes. It is a lot I know to take in, but it is pretty simple if you break it down. Just multiply the value by 1000, and you get the lower prefix or add 3 zeros to the numbers 😉.
Prefix for unit of speed and capacity
You probably must have realized by now that sometimes people say megabyte. However, sometimes you also hear megabit. What gives? Well, you often hear megabit and gigabit when people talk about data transfer speed. As you know, it is a stream of data consisting of bits. It makes sense in a way that how computers read the continuous stream of bits, hence why we use bit per second to describe the speed of data transfer.
We often thought of capacity in terms of bytes as our based unit, and thus by hearing people using bits per second for speed somewhat confused us and made us think the speed was faster than it actually was. Look at how all the telecommunication advertises their Gigabit internet. Our first thought would be, wow, if I get this, then it only takes me a minute or 60 seconds to download a 60GB file, right? I mean 60/1= 60 seconds, right? You have to see that it is not actually the same thing, the advertising speed was gigabit per second or Gbps or Gb/s is totally not the same as gigabyte per second or GB/s. Did you notice the upper case B and lower case b? the upper case B is byte while lower case b is bit. So what it meant was your 1 Gigabit internet is basically a 125 megabyte per second (125MB/s) or 0.125GB/s because 1 byte = 8 bits, so you have to divide by 8 . Which mean it will take 60 / 0.125 = 480 seconds or 8 mins to finish the download. Don’t get me wrong; it is still fast to have gigabit internet. It’s just not as fast as you expected after the conversion, that is all.
Let look at this situation; you finally decided to spend your hard-earned money and invest in a brand new SSD ( and no, don’t you dare buy a hard drive for the daily driver PC). The capacity on the label said 1TB, but when you pop that into your PC, it only shows 950GB??? what the heck? Where is my 50GB went? First, you must understand that most SSD doesn’t like to be filled to the brim, so they hide some sector(it is called reserved. It is like me saving up food before the hibernation😎 ) to ensure the drive functions properly. But it is also due to conversion. What conversion, you ask? When I told you about the prefix, that is the multiple of 1000, right? Well, It is somewhat true, but at the same time, it is not. I said 1000 because it is close enough; the actual number converting from kilobyte to megabyte or megabyte to gigabyte is actually 1024 instead. But conventionally, we would rather take 1000, more straightforward to convert and remember than 1024, and it does make some difference between theoretical and actual capacity. They come up with prefixes for the units that will make it a bit closer to the existing capacity to address that issue.
Gigabytes vs Gibibytes
So I mentioned the theoretical capacity and actual capacity is a bit different due to how are we doing the prefix value, right? To address this issue, they come up with another prefix (IEC 60027-2 probably the standard’s name) that makes the higher prefix = 1024 * lower prefix. So 1 kilobyte(kB) = 1000 bytes and 1 kibibyte(KiB) = 1024 bytes . Follow the same thing 1 mebibyte(MiB) = 1024 kibibytes, and so on.
So yea it isn’t apparent between how to say it correctly, but well, if you are like me, an average user and does not have to be absolutely accurate, just go with the prefix of kilo, mega, giga, tera… with the multiple of 1000 and make your life much easier. At least when you hear people saying stuff like gibibyte or mebibyte, you still have some idea what they are talking about and not go straight into a debate if someone has it right.
The takeaway
Here is the TLDR for those who are too lazy to read ( I totally understand since I am one of those people)
1. Bit is either 0 or 1
2. Byte is 8 bits
3. Prefix such as kilo, mega, Giga is just a multiple of 1000 of the base unit
4. speed vs. capacity when it comes to naming. Speed is usually bit per second, while capacity favors bytes as the base unit. GB per second is not the same as Gb per second. Upper case B is for byte, and lower case b is bit so you can read properly.
5. GiB pronounce gibibyte and not gigabyte 😜 and they are the prefix that uses multiples of 1024 instead of 1000.
Congratulations 🥳, you made it to the end of the lecture, hopefully still awake. These concepts are the basic building block of computers and networking, so if you understand them, you are off to a good start, and I hope you learned something from this lesson. Until next time I, Prof Laz, shall go back to rest. I have had trouble sleeping lately, so my hibernation was not last as long as I expected, hence why you are getting this lecture so early.
-Professor Laz.