TechKnowSurge
CompTIA Tech+ 1.1 CompTIA Tech+ 1.2 CompTIA Tech+ 1.5 CompTIA A+ Core 1 2.6
VideoComputeFree

Powers of 2 in Computing

Binary numbers and powers of two explain why values like 256 appear repeatedly in computing environments. Each additional bit doubles the total number of possible combinations, producing the consistent sequence of values that define hardware and software boundaries.

Complete this video to capture a CTF flag worth 1 point.

About this video

Binary is the foundation of how computers store and process information, and understanding it explains why certain numbers appear so consistently across computing systems. A single bit can exist in one of two states — zero or one — giving it exactly two possible values. Adding a second bit doubles that count to four possible combinations, a third bit doubles it again to eight, and so on. This consistent doubling is the defining characteristic of binary data. The relationship between bit count and possible combinations is captured by powers of two, where two is raised to the power equal to the number of bits in use. One bit yields two to the first power, or 2. Two bits yield two to the second power, or 4. By the time eight bits are in play, there are 256 possible combinations — two to the eighth power — which is why 256 is one of the most commonly encountered values in computing. Extended further, two to the sixteenth power produces 65,536, another figure that appears frequently in networking and software design. Practical familiarity with these values is essential for IT and networking work. Powers of two define the boundaries of memory allocation, determine the size of address spaces, and appear directly in subnetting calculations. Recognizing these numbers on sight — especially the results from two to the first through two to the eighth power — allows for faster interpretation of system specifications, network configurations, and application limits encountered in day-to-day technical environments.

What you'll learn

What's covered

Binary Numbers & Powers of Two

Aligned to

CompTIA Tech+
1.1 Compare and contrast notational systems.
1.2 Compare and contrast fundamental data types and their characteristics.
1.5 Compare and contrast common units of measure.
CompTIA A+ Core 1
2.6 Compare and contrast common network configuration concepts.

Key terms

Bit
Short for binary digit, the smallest unit of data in computing, holding a single value of 0 or 1; all digital information is ultimately composed of bits.
Binary
The base-2 number system that uses only the digits 0 and 1; the native language of digital computers, which store and process data as electrical on/off states.
Powers of Two
The sequence of values produced by multiplying 2 by itself a given number of times (e.g., 2¹=2 through 2⁸=256), which appear frequently in computing contexts such as memory and subnetting.
Subnet Mask
A 32-bit number that divides an IP address into network and host portions.
Subnet
A logical subdivision of an IP network, used to organize and segment network traffic.

Topics

Binary Numbers Powers Of Two Number Systems Subnetting Memory Addressing Networking Computer Architecture

Transcript

After working with computers for a while, you'll start noticing that there are some numbers that come up very consistently. Like 256 — for some reason it comes up a lot. But why does it come up a lot? Well, it really boils down to those binary numbers and the powers of two.

Counting combinations of bits

If we have one bit, it could be either a zero or a one, so it can be in two different states. So when we have one bit, there are two states with this.

How many combinations can we think of when we have two bits? Well, we could have 00, we could have 01, we could have 10 and 11. So now we have four possibilities: 1, 2, 3, 4. We've doubled the amount of possibilities that we have. If you think about it, it really makes sense, because we still have that single bit that could be a zero or one, and now we have an extra bit which could be a zero or a one. So we've doubled the amount of combinations we have by adding an extra bit.

Let's do that again. Here we have three bits, so we've got 000, 001, 010, 011, and we've got 100, 101, 110 and 111. So 1, 2, 3, 4, 5, 6, 7, 8 — we have eight combinations here, eight different ways that we can represent this with three different bits. This makes sense as well, because in this case right here we have the four combinations we had with two bits, but we could do that with a zero as the third bit or a 1 as a third bit. So we've doubled the amount. Every time we do this we double the amount.

If we have four bits, how many combinations do we have? What I'm going to do is let you figure this out. Go ahead and figure out what the answer is with four bits. You can do it two ways: you can do it the pattern that we've already discovered, where we double it every time, or you could also figure out what all the combinations of ones and zeros are that you can possibly have.

If you came up with the answer of 16, then you'd be correct. It's twice as much as eight, so we know from the pattern that we're going to have 16 different combinations. But what are those combinations? Here's a list of those combinations. If you noticed, it's the same combinations here for the first three bits, but since we can do it all as zeros and then again all as ones, we have another set of those same combinations again. So this is all of the answer here.

Powers of two

Here are a couple of other ways to look at this. If you just have a single bit, there are two possibilities. If you have two bits, it's 2 × 2. If you have three bits, it's 2 × 2 × 2. And if you have four bits it's 2 × 2 × 2 × 2. We can just shorten that to two to the first power, two to the second power, two to the third power, two to the fourth power. So it's two to however many bits that you have is going to be what the answer is. And so now we get, in both these cases, 2, 4, 8, 16 and so on and so forth.

Here's the rest of that. We're going to go out to 2 to the power of 8. Here are the answers: 32, 64, 128, 256. So these are common numbers that you'll see on computers. If we take this all the way out to 2 to the 16th power, we get 65,536.

Why these numbers show up

Now, these numbers are going to show up a lot on computers, and in addition to that it can keep going, so you'll still see these numbers. The powers of two are a lot of times why we see these strange numbers pop up on our computers, because what it's doing is it's calculating a lot of the information that it has with these powers of two.

So you need to be familiar with these, especially the first eight. These are going to be something that you're going to encounter a lot, especially if you're getting into subnetting, or if you're getting into working with certain types of processing. Certain programs will have limits that you'll see here, and so you'll see it a lot and it can be applied in a lot of scenarios.

About TechKnowSurge

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 →