TechKnowSurge
CompTIA Tech+ 1.1 CompTIA Tech+ 1.2 CompTIA Tech+ 1.5
VideoComputeFree

Bits, Binary, Hex, and Octal

Computers rely on multiple numbering systems—binary, decimal, hexadecimal, and octal—each suited to specific technical tasks. Understanding when and why each system is used is foundational knowledge for working in IT and cybersecurity.

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

About this video

Computers represent data using powers of two, and this mathematical foundation shapes how different numbering systems are applied across computing tasks. A single bit holds either a zero or a one, representing two possible states. Four bits form a nibble, capable of representing 16 combinations, while eight bits form a byte—also called an octet—which covers 256 possible values. The byte has become a standard unit of measurement in computing precisely because 256 states are sufficient to represent a wide range of characters, colors, and other data types. Each numbering system occupies a specific role in IT work. Decimal is the default for human communication because it is the format people are most familiar with, making addresses and values easier to read and recall. Binary is unavoidable at the technical level, particularly in networking tasks like subnetting, where understanding the state of individual bits is a hard requirement. Hexadecimal offers a practical middle ground—because a byte can be split into two nibbles and each nibble maps directly to a single hex digit, converting between binary and hexadecimal is straightforward. This efficiency makes hex the format of choice for IPv6 addresses and many low-level data representations. Octal serves a narrower but important purpose in Unix and Linux environments, where file permissions are defined in three-bit groupings for the owner, group, and others, and octal notation maps cleanly onto those groups in a way that hexadecimal does not. A solid grasp of these four numbering systems and their practical applications is essential for anyone working in IT infrastructure, networking, or cybersecurity. Recognizing which system applies in a given context—and being able to convert between them—reduces errors and builds the technical fluency needed for tasks ranging from reading packet data to configuring server permissions.

What you'll learn

What's covered

Numbering Systems in Computing

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.

Key terms

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.
Decimal
The base-10 number system using digits 0–9; the standard system used in everyday counting and arithmetic, and the most common format for presenting numeric output to humans.
Hexadecimal
Hex
A base-16 number system using digits 0–9 and letters A–F; each hex digit maps to exactly 4 bits, making it a compact shorthand for representing binary data.
Octal
A base-8 number system using digits 0 through 7, where each digit represents exactly three binary bits; commonly used in Unix and Linux file permission notation because a three-bit permission group (read, write, execute) maps cleanly to a single octal digit.
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.
Nibble
A group of exactly 4 bits, equivalent to one hexadecimal digit; two nibbles make up one byte.
Byte
A group of 8 bits; the standard unit for representing a single character or small value in computing, and the building block for larger storage measurements such as kilobytes and gigabytes.

Transcript

Why do we use different numbering systems when it comes to computers? Let's go over the common numbering systems that we use on computers and why we use them.

Powers of two

One of the reasons gets back to those powers of two. We want to represent different characters, we want to represent graphics, we want to represent different things on our computers, and so to represent that we need to have a certain amount of representation. For instance, if we needed to represent four different states, we'd use 2 to the power of two. Let's say we wanted to represent 16 different states — well, that would be 2 to the 4th power, so we would use four bits to represent 16 different combinations. If we wanted to represent 64, that would be 2 to the 6th, or we'd have six bits. If we wanted to represent 256, then we would have eight bits for that.

Bits, nibbles and bytes

One of these numbers that seems to fit really well in a lot of different scenarios is this 256 possibilities, or eight bits that we have here. We've labeled it as being a byte of information, and we use it as a form of measurement for a lot of different things. So that's a byte. But that's not the only one. If we were to use a full byte for everything, it might not always make sense, so sometimes we use half that: we use four bits, which is 16 possibilities, and we call that a nibble.

So a bit is either a one or a zero. A nibble is four of those. A byte is eight of those, or it could be considered as two nibbles, and we also actually call this an octet at times.

Why decimal

One question that comes up is, why would we want to use decimal versus why would we want to use binary, and why would we want to use hexadecimal, or why would we want to use octal?

Let's first answer the question, why decimal? The answer to that is pretty straightforward: it's what we're used to using. In decimal format, this is much easier to read than a binary number. For a binary I'd have to say 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 and so on and so forth, and it would get really monotonous, really quite crazy. So it's much easier to say 192.168 4045 — also, this is an IP address, so it's a little easier to say than hexadecimal or octal format.

Why binary

If decimal is easier for us, why would we ever want to use binary? The thing is, there are times when binary is just necessary. For instance, when we're subnetting a range, we have to really get down into the bits and what the bits look like. So it really is a requirement that we understand binary and can work with binary.

Why hex

So then the question is, why would we want to use hex? The reason is because translating from decimal to binary is not always the easiest, and we can do it much easier with hex. If we take a look at an example of this, it would be IP version 6. IP version 6 is a hex number, and that looks much better than if we were to do the binary equivalent, or the decimal equivalent is a little crazy there.

From the conversion standpoint, since we do have to work a lot with binary numbers, it's just a lot easier to convert a binary number into hexadecimal rather than decimal. The reason for that is because here's eight bits right here. We've got eight bits of information, we just split it down into two nibbles here, and then we convert each nibble into a hex number. So it can be actually fairly simplistic for this conversion.

Why octal

Why would we use octal? One of the ways that we use octal is when it comes to file permissions in Unix or Linux systems. Here we have the user, the group, and for each one of those we have read, write and execute. These are levels of permissions for each one of these: the user, the group, and for everyone else. What we do is we set a flag, we turn on read, write or execute for each one of these — the user, group and other — and we represent that for the computer. In the computer it's represented as a binary number.

If we wanted to represent this in something other than binary, we could use hexadecimal, but what we're doing is we're splitting this like this. We've got a nibble here, we've got a nibble here, and then we've got this last little bit, and it just doesn't fit very nicely in here. So that's an example where we use the octal system.

What we have here is, if we add up these bits, the four bit, the two and the one are all turned on, so that's seven. And here right here we've got a one and a one, so that would be a five. And here we've got a 0, 0, 0, so that would be a zero. So then this 750 number represents the permissions that we're giving to each one of these.

We're going to see decimals, binaries and hexadecimals come up quite a bit, and octal we'll see out there as well.

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 →