Table of Contents |
When we work with numbers in everyday life, we use the decimal system, which is based on 10 digits: 0 through 9. Each position in a decimal number represents a power of 10. For example, the number 345 means 3 hundreds, 4 tens, and 5 ones.
Computers use a different system to store and process information. This system is called the binary number system, and it is based on just two digits: 0 and 1. Each digit in binary is called a bit, which is short for binary digit. Computers use binary because the digits 0 and 1 can easily represent electrical states—off and on.
Just like in decimal, each place in a binary number has a value based on its position. However, instead of powers of 10, binary uses powers of 2. From right to left, the values are as follows:
| Position | 2⁷ | 2⁶ | 2⁵ | 2⁴ | 2³ | 2² | 2¹ | 2⁰ |
|---|---|---|---|---|---|---|---|---|
| Value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
This table shows the value of each bit in an 8-bit binary number. Eight bits is also called one byte. If all the bits are off (0), the total value is 0. If all the bits are on (1), the total value is
So, an 8-bit binary number can represent any value from 0 to 255. You’ll see this range often in networking, especially when working with IP addresses.
EXAMPLE
Let’s look at the binary number 1010. This number has four bits, so we start with 2³ (which is 8) and go down from there.



Recall that every network adapter has a MAC address, which is its physical address. To be part of a network, every device also needs a unique logical address. In the world of networking, these digital addresses are called IP addresses. Whereas MAC addresses are built into the adapter and do not change, like the street address of a property, IP addresses are logically assigned, like telephone numbers.
Internet Protocol Version 4, IPv4 short for, is the most widely used system for assigning these addresses. It plays a critical role in everyday activities, such as browsing websites, sending emails, streaming videos, and connecting smart devices.
Here’s why IPv4 is essential:
IPv4 addresses are written in a format called dotted decimal notation, which looks like this: 192.168.1.1. This address is made up of four numbers separated by dots. Each number is called an octet, and each octet is made up of 8 binary digits, or bits. Since there are four octets, an IPv4 address contains 32 bits total.
Each octet can represent a number between 0 and 255. This is because 8 bits can create 256 different combinations, which makes this format both compact and powerful. For example, the IP address 192.168.1.1 would be written in binary as 11000000.10101000.00000001.00000001. This binary representation is essential for understanding how IP addresses are processed by computers. While devices such as routers work with binary, humans usually interact with the easier-to-read decimal version.
An IPv4 address is divided into two parts: the network portion and the host portion. The network portion identifies the overall network a device belongs to, while the host portion identifies the specific device (or “host”) within that network. The exact split between these two parts depends on how the address is structured, which was historically determined by a system of address classes. This system helped organize IP addresses into different categories based on the size of the network.
EXAMPLE
Here is an IP address: 192.168.10.25
A subnet mask is binary code that identifies where the break occurs between network and host. Because it must match the IPv4 address bit for bit, the subnet mask is also 32 bits long. The mask lays over the IP address to show which bits belong to the network portion and which belong to the host portion. All the numbers on the left end are 1s, and all the numbers on the right end are 0s. For example, in the subnet mask 255.0.0.0 (11111111.00000000.00000000.00000000), the break occurs after the first octet. You’ll learn more about subnet masks later.
192.168.x.x or 10.x.x.x)? In the early days of the internet, IPv4 addresses were grouped into fixed categories known as IP classes. These classes determined how much of the address was used for the network portion and how much was left for hosts.
Here’s a summary of the most commonly used classes.
| Class | Starting Range | Default Subnet Mask | Typical Use |
|---|---|---|---|
| A | 1–126 | 255.0.0.0 (/8) | Large organizations |
| B | 128–191 | 255.255.0.0 (/16) | Medium-sized networks |
| C | 192–223 | 255.255.255.0 (/24) | Small networks |
Class D addresses (224 to 239) are used for multicasting, a special type of network communication where one device sends data to a group of devices at once. This is useful for things such as video conferencing or streaming media, where the same data needs to reach multiple recipients.
Class E addresses (240 to 255) are reserved for experimental use and are not assigned to regular devices. These are mostly used in research or development and are not part of everyday network configurations.
EXAMPLE
An address such as 10.50.23.5 is a Class A address because it begins with 10. That means the first 8 bits (one octet) represent the network, and the remaining 24 bits are used for hosts. This class structure was easy to apply but not very efficient as many networks ended up with more IP addresses than they needed.Not all IP addresses are visible to the public internet. Some are used only inside homes, schools, or businesses. These are known as private IP addresses. Others, called public IP addresses, are assigned to devices that communicate across the internet.
A private IP address is used within a local network to let devices such as phones, printers, or laptops communicate with each other. These addresses are not unique on the global internet, which means the same private address can be used in many different homes or offices without causing any problems.
A public IP address is used to identify a device or network on the internet. It is assigned by an internet service provider (ISP) and must be globally unique so that data sent across the internet reaches the correct destination.
You can picture it like this image of a house:
EXAMPLE
In your home network, your router might have a public IP address such as 73.141.22.8, while your personal laptop might have a private IP address such as 192.168.1.20. Devices in your home use private addresses to talk to each other. The router uses the public address to communicate with websites and services on the internet.Some IP address ranges are reserved for private use. These include the following:
| Public IP Address | Private IP Address | |
|---|---|---|
| Scope | Global/internet | Local network only |
| Assigned by | ISP | Router or network admin |
| Example | 8.8.8.8 (Google DNS) | 192.168.1.5 |
| Uniqueness | Must be globally unique | Can be reused in different networks |
| Security | More exposed; requires tight controls | More secure; “hidden” from the internet |
| Cost | May carry a fee | Always free |
Every device on a network needs an IP address, but it does not always keep the same one. IP addresses can be assigned in two different ways.
A static IP address is manually configured and stays the same over time. It does not change, even when the device is restarted. Static IPs are often used for devices that need a consistent address, such as servers, printers, or security cameras. Because the address stays fixed, it is easier to find and manage these devices on a network.
A dynamic IP address, on the other hand, is assigned automatically by the network. Most home and office networks use dynamic addressing. When a device connects to the network, it receives an available IP address from a pool. This address might change the next time the device connects. Dynamic IPs are managed by the network to make sure no two devices use the same address at the same time.
Most laptops, smartphones, and tablets use dynamic IPs. This makes network setup easier and helps support many changing devices. Static IPs require more setup but offer reliability for devices that need to be reachable at a known address.
EXAMPLE
A company might assign a static IP address, such as 192.168.1.100, to its office printer so employees can always find it on the network. Meanwhile, an employee’s laptop might receive a dynamic IP address, such as 192.168.1.45, that could change the next day.Source: THIS TUTORIAL WAS AUTHORED BY SOPHIA LEARNING. PLEASE SEE OUR TERMS OF USE.