An IPv4 address is 32 bits long, divided into four 8-bit sections

Every device on your home network has an IPv4 address — a string of numbers like 192.168.1.5. That address is made of 32 bits total, split into four octets (groups of 8 bits each). Each octet can hold a value from 0 to 255 because 8 bits can represent 256 different numbers (2 to the 8th power). When you see an address written as 192.168.1.5, you are looking at those four octets written in decimal form instead of binary.

The 32-bit structure was chosen in the 1980s when IPv4 was designed, and it limits how many unique addresses can exist on the internet. With 32 bits, there are roughly 4.3 billion possible addresses. That seemed like plenty at the time. Today, with smartphones, tablets, smart home devices, and servers all needing addresses, we have run out — which is why IPv6 (with 128 bits) exists, though most home networks still use IPv4.

Key Takeaways

  • An IPv4 address contains 32 bits split into four 8-bit octets, each displayed as a number from 0 to 255.
  • The first octet or first few octets determine which network a device belongs to; the remaining bits identify the specific device.
  • A subnet mask (like 255.255.255.0) tells your router how many bits are reserved for the network and how many for individual devices.
  • Understanding bit structure helps you see why your router can only assign addresses within a certain range and why some devices cannot talk to each other without a gateway.

How the 32 bits split between network and device address

Not all 32 bits do the same job. Your router uses a subnet mask to divide the address into two parts: the network portion and the host (device) portion. In a typical home network with the subnet mask 255.255.255.0, the first 24 bits identify the network, and the last 8 bits identify individual devices on that network.

If your router assigns addresses in the 192.168.1.0 range, the 192.168.1 part (first three octets, or 24 bits) stays the same for every device. Only the last octet (8 bits) changes — so you can have devices at 192.168.1.1 through 192.168.1.254. That gives you 254 usable addresses on that network (the .0 and .255 addresses are reserved). If you had a subnet mask of 255.255.0.0 instead, the first 16 bits would be the network, and you would have 65,534 usable addresses — but that is rare in home networks.

Why 32 bits matters for your home network security

The bit structure affects how your network isolates devices. When you connect a device to your home WiFi, your router assigns it an address within the range your subnet mask allows. Devices with the same network portion (same first 24 bits, in the common case) can talk directly to each other without going through the router. Devices on different networks cannot — they need the router to relay messages.

This is why some security setups create separate networks for guests or IoT devices. If a guest device is on a different subnet (different network bits), it cannot directly scan or attack your work computer, even if both are on your WiFi. The router acts as a gatekeeper. Understanding which bits define the network helps you see why that separation works and what a subnet mask actually controls.

Binary representation: what the bits actually look like

When you write 192.168.1.5, you are using decimal notation. In binary, that same address looks like 11000000.10101000.00000001.00000101. Each octet becomes 8 binary digits (bits) — eight 1s and 0s. A 1 in a bit position means that power of 2 is "on"; a 0 means it is "off". The first bit in an octet represents 128, the next 64, then 32, 16, 8, 4, 2, and 1. Add up the "on" values and you get the decimal number.

You do not need to convert addresses to binary in your head to run a home network. But seeing the binary form explains why each octet maxes out at 255 (all eight bits on: 128+64+32+16+8+4+2+1) and why the 32-bit limit exists. Every additional bit doubles the number of possible addresses. IPv6 uses 128 bits, which is why it can support vastly more devices than IPv4 ever could.

Common subnet masks and what they mean in bits

Your router probably uses 255.255.255.0 as the subnet mask, which reserves 24 bits for the network and 8 for devices. But other masks exist and change how many devices you can address:

Subnet MaskNetwork BitsDevice BitsUsable Addresses
255.255.255.0248254
255.255.255.128257126
255.255.255.19226662
255.255.0.0161665,534

The more bits you reserve for the network, the fewer you have for devices. In a home network, you will almost never change this — 255.255.255.0 is the standard. But if you were setting up a large office or data center, you might use a different mask to control how many devices fit on each network segment.

Why IPv4 ran out of addresses and what that means for you

The 32-bit limit means IPv4 can only address about 4.3 billion unique devices. That sounded infinite in 1981, but the internet grew faster than anyone predicted. By the early 2010s, the global pool of unassigned IPv4 addresses was exhausted. Your home router still uses IPv4 because it is simpler and because private address ranges (like 192.168.x.x) can be reused in different homes without conflict.

IPv6, with 128 bits, can address 2 to the 128th power of devices — a number so large it is effectively infinite for any foreseeable use. But switching the entire internet to IPv6 is slow. Most home networks today use IPv4 internally and rely on the router to translate between IPv4 and IPv6 when talking to the wider internet. Understanding the 32-bit constraint helps you see why your router exists: it lets millions of homes reuse the same private IPv4 addresses (192.168.1.x, 10.0.0.x, etc.) without collision.

How to check your own network's bit structure

On Windows, open Command Prompt and type ipconfig. Look for "IPv4 Address" and "Subnet Mask". On Mac or Linux, open Terminal and type ifconfig or ip addr. You will see your device's address and the subnet mask. If the mask is 255.255.255.0, you know the first 24 bits are the network and the last 8 bits identify your device.

You can also log into your router's admin panel (usually 192.168.1.1 or 192.168.0.1 in the address bar) and look at the DHCP settings or LAN settings. There you will see the subnet mask the router is using and the range of addresses it assigns to devices. That range is determined by the bit structure — the router cannot assign an address outside the range that the subnet mask allows.

Frequently Asked Questions

Why is it called an octet if there are 8 bits?

Octet means a group of eight. Each of the four sections in an IPv4 address contains 8 bits, so each section is called an octet. The term comes from the Latin root for eight, the same way an octopus has eight arms.

Can I change the subnet mask on my home network?

Technically yes, but there is no reason to in a home setting. Changing it would limit or expand how many devices can connect, and 255.255.255.0 (24 network bits) is the standard for home networks. Changing it could break device discovery and cause more problems than it solves.

What is the difference between a public and private IPv4 address?

Private addresses (like 192.168.x.x, 10.x.x.x, and 172.16-31.x.x) are reserved for use inside networks and cannot be routed on the public internet. Your home network uses private addresses. Your router translates between private addresses (inside your home) and public addresses (on the internet) so devices can communicate outward.

Does understanding IPv4 bits help me find my network?

It helps you understand how network isolation works. Knowing that a subnet mask controls which devices can talk directly to each other explains why creating separate networks for guests or IoT devices actually protects your main devices. It also clarifies why your router is necessary — it is the bridge between different bit ranges.