Computers process all data using binary ones and zeros, a system rooted in the physical behavior of transistors inside modern microprocessors. This content covers the history of computing hardware, how digital circuits represent and calculate information, and how binary values translate into text, graphics, and arithmetic operations.
How Computers Work
We're not going to take a real deep in-depth discovery over computers and how they operate, but I want to give you a brief understanding of why these binary numbers are used and why we talk about them so much. So let's take a look at computers and how they operate.
We're going to start by talking about the history of computers — not an in-depth look, but just to see what the progress was and where we're at right now. Then we're going to take a look a little closer into digital circuits, what they are and why they use bits, ones and zeros, to be able to calculate information. Then we'll take a look at a few different representations of binary numbers, or how these bits get translated into graphical representation, or how they get translated to get computed. We're just going to take a glance into those different aspects of how a computer works.
Way back to 2400 BCE, we have the abacus. The abacus has contributed to being one of the first computers. It computed, although very manually. It was some sort of board with beads on it that you would scoop back and forth to calculate some sort of addition and subtraction, some simple calculation. So that was contributing to being one of the first computers. Obviously it didn't have all the electronics that we have now, and it didn't have the speed — it was a very manual process.
Now fast forward to 1820, and then came the idea of having some sort of machine actually do the calculation. So it was a little more automated of a process. There were still a lot of manual components, where you had to physically alter some sort of input into this machine, and then there would be wheels and gears and pulleys that would then calculate to have some sort of output from that. So Babbage was one of the first to come up with this concept of using machines for calculation, and so we had machines start doing our calculations — physical machines.
Then we started coming up with things like vacuum tubes. In 1934 the idea of using vacuum tubes came about, where now, rather than a mechanical process to do the calculation, a mechanical computer to do the calculation, perhaps we could use electricity and create faster compute power with this. So we started out using vacuum tubes. We don't need to necessarily know all the ins and outs of how these vacuum tubes work, but at some point in time they transitioned from using vacuum tubes to using transistors.
Transistors are interesting. They use something called semiconductors in order to turn these little switches on and off, and then you string these little transistors all together to create a chain for calculation. So these transistors were starting to be used, and then at that point in time, in 1961, came the integrated circuit. The idea behind the integrated circuit is that now we take all these transistors and we put them all together on some sort of microchip, or some sort of little circuit board, or we put them really close together, and so we can start minimizing how big and how much electricity these computers would use.
Since then we've just continued to get smaller and smaller with these transistors, trying to make the transistors just atoms thick. So that's kind of the general progress of the history of computers, and now we have these integrated circuits that we're using.
As these integrated circuits got smaller and smaller and smaller, at some point in time they became microprocessors. So a little bit of history around microprocessors. In 1975, one of the microprocessors that we had was this MOS 6502. It was one of the best performing ones at the time, and it was later used in the Nintendo Entertainment System. That one had 3,500 transistors in it. You can see that's quite a bit, although as you're looking at this table you realize that we really expand quite quickly.
When we moved to 1978, the Intel 8086 had 29,000 transistors in there. The Pentium Pro — which I actually had a chance to work on before it was released to the public, a really cool experience, I'm so glad I had that experience and was able to work on that — the Pentium Pro had 5.5 million. As you can see, it just continued to grow. The PlayStation 2 in 2000 had 13 million. The Xbox 360 in 2005 had 232 million. And then this Apple M2 Ultra has 134 billion transistors.
So these little transistors get shrunk down to just being microscopic. If you look over here at this picture that I have right here, these are chips. This is how they are created: they're created on these wafers and then later they are cut out. So each one of these is a chip right here that they would then cut out, test for the speed, and then it would be sold at a certain speed out on the market. So those are the chips that are created now, and you would have millions if not billions of little tiny switches, little tiny transistors, on these wafers, on each one of the integrated circuits, each one of these microprocessors.
So these millions or billions of transistors that are on these microprocessors nowadays are little switches. A transistor is either a one or a zero. You have some sort of input into it, and based off of that you get an output from it. Depending on how and what order we put these different transistors into, we can get different functions out of it. We can store data with it, we can process, we can calculate data with it, we can present data with it — we can do all of these things with it, which is amazing. It is crazy that we can do that, but we do it all with these little ones and zeros, ons or offs.
A one is an on, a zero is an off. A one means that there's voltage coming out of it — maybe it's 5 volts, maybe it's a half volt, maybe it's 12 volts, it just depends on the integrated circuit that you're using — or it doesn't have any voltage and it's a zero. So these transistors are little switches in there, and that's why binary numbers come up in so many of our calculations when it comes to computers.
One representation of that is we type out text. We have text on a screen, and so we need binary numbers that represent different letters. If you were to look at the binary representation of the character A, it would be 01000001. But we can't forget lowercase as well, and that's a different representation, so a lowercase a is 01100001. Then we need to also represent all the numbers, we need to represent all the other characters on the keyboard. There's different things on the keyboard that we have to represent, that we want to represent and send codes back and forth.
So your calculator, when you press an A, will translate it to 01000001. It will send that code to your computer, to your processor, and that processor is going to determine what does it do with this A that you typed. Well, it's going to depend: if you're in a game that might make you go left; if you are in a work document that might type out a letter A on the screen. So it's going to do different things depending on what exactly application that you have open.
Not only do we need to represent characters that we type out on our keyboards and into our spreadsheets, but we're also going to need to represent graphics, things that are displayed to us. So how do those graphics get turned into little ones and zeros? Here's an example of it. I've got a little Mario here, that's a little simple bitmap, and for each of your colors here you're going to have a certain amount of red, a certain amount of green and a certain amount of blue.
If you just wanted a really bright blue, you wouldn't have any red, you would have no green, and you would just have straight up blue. But most of the colors that are out there are going to be some sort of variation of a blue, and that's where we actually have some red, some green — and all blue right there, all those ones means that it's all blue right there.
So for every single bit that we have in here, we need to calculate how much red there is, how much green and how much blue there is. Depending on that, in this little character that we have right here, we've got four colors that we're representing here that get put into there. So this square right here is going to be represented by three bytes, as well as this one, as well as this one. So you could take three bytes and multiply that by how many pixels you have on here to determine the size. There are ways to compress it and there's other ways that we can store some of this information — I don't want to get too much into that — but you can see that these numbers right here are representing the component: how much red, how much green, how much blue there is for every single pixel there is on this graphic.
So that's one way that we can store information and present information, how a computer is going to do graphical processing on it and then send that signal to your monitor, and your monitor is going to display it, and it's all with these ones and zeros.
One thing I can do is I can take these binary numbers that I just showed you and I can translate those into decimal numbers, so it's anywhere from 0 to 255. So 255 means that it's maxed out. You can see that the blue is maxed out right here, and you can see the elements of how much blue, how much green and how much red is in here. If you wanted to convert that to a percentage, I guess you could just take the number that it is divided by 255, and that would give you the percentage of each of those. So it's a hundred percent of it is blue there.
Now, I would love to go in depth into how computers calculate information and what transistors look like. It's really not necessary for this course, but at some point in time I'm going to offer a class on that. I think there is some value in understanding that, but it's not really necessary to understand IP addresses.
So let's take a look at a full adder and what a full adder is. It's just for adding two numbers together. Let's say I'm adding a one and a zero together. I use something called gates here, and we see a couple of XOR gates, we can see a couple of AND gates, and we see an OR gate. So we use these different gates to calculate the number and have some sort of output. This is the carry in right here, and this is the carry out.
You don't necessarily need to know what that all means, but I just want to show you how a computer would really just add two numbers together. And if you want to add more — let's say it's a very long number that you need to add together — you would just create more full adders, and put more and more full adders. Then each one of these gates has quite a few transistors involved in each one of these gates, so this simple little full adder could have 2022 different transistors in it to calculate and add just two binary numbers together. So that really is why we have billions of transistors in today's microprocessors.
But this just gives you a concept of how a computer will add, be a basic calculator and add numbers together. Really what it's doing is a lot of calculations on the different bits. That's what the processor does: it computes, and it's processing that data, and a lot of times it's doing mathematical equations on that data to get output from that. So that is how a computer works.
We talked about the history of computers, and how we've gone from this abacus to more mechanical, to electronic signals, and we now use transistors and we pack those transistors into smaller and smaller microprocessors, and that's getting into small little chips, and we're getting them atoms thick now, which is amazing. Then we showed you some different binary representation of how a computer takes those ones and zeros and is able to process those ones and zeros, and then be able to send data to your screen and be able to accept data from your keyboard. So it's really fascinating how these computers work. But what that all boils down to is computers use ones and zeros. They store information using ones and zeros, and understanding ones and zeros is going to be fairly critical to being able to subnet. So we're going to get more in depth into binary numbers and how to manipulate and use those binary numbers.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →