Addressing · 4 min read

Reading IP addresses in binary, hex and decimal

IP addresses are fundamentally numbers. The dotted-decimal notation (192.168.1.1) is human-friendly, but routers, ACLs, and subnet calculations often require you to think in binary or hexadecimal. Understanding all three representations is essential for subnetting, VLSM design, and troubleshooting network masks and host bits.

Decimal: The standard notation

An IPv4 address is a 32-bit number split into four 8-bit octets, each displayed in decimal. Each octet ranges from 0 to 255 (2^8 - 1). The address 192.168.1.1 is four separate decimal numbers: 192, 168, 1, and 1. This notation is convenient for humans but masks the bit-level operations that subnetting requires.

Binary: Where subnetting happens

Binary is the native language of networking. Each decimal octet converts to 8 bits. To convert a decimal octet to binary, repeatedly divide by 2 and track remainders, or use the positional method: 128, 64, 32, 16, 8, 4, 2, 1.

Decimal 192 to binary:
192 = 128 + 64 = 11000000

Decimal 168 to binary:
168 = 128 + 32 + 8 = 10101000

Full address 192.168.1.1 in binary:
11000000.10101000.00000001.00000001

Binary reveals the true structure of subnets. A /24 mask (255.255.255.0) is 11111111.11111111.11111111.00000000 in binary: the first 24 bits identify the network; the last 8 bits identify hosts. Subnet calculations, VLSM design, and wildcard mask creation all depend on binary thinking.

Hexadecimal: Compact and efficient

Hexadecimal (base 16) compresses binary into a more readable form. Each hex digit represents 4 bits (a nibble), so each octet becomes 2 hex digits. This is common in packet captures, memory dumps, and some routing protocol outputs.

Decimal to hex conversion (per octet):
192 (decimal) = C0 (hex)    [12 * 16 + 0]
168 (decimal) = A8 (hex)    [10 * 16 + 8]
1 (decimal)   = 01 (hex)
1 (decimal)   = 01 (hex)

192.168.1.1 in hex: C0A80101

Hex is useful when reading packet captures or protocol analyzers. For example, an Ethernet frame or IPv4 header dump often shows addresses in hex. Knowing the mapping (A=10, B=11, C=12, D=13, E=14, F=15) lets you quickly decode what you see.

Practical conversion workflow

These conversions appear constantly in CCNA and NSE labs: calculating usable host ranges, designing subnets with specific requirements, reading packet traces, and interpreting access control lists. Mastery of all three formats eliminates guesswork and speeds up real-world troubleshooting.

IP Converter
Instantly convert between decimal, binary, and hexadecimal for any IP address or subnet mask.
Open →
Practise this on today’s Daily Ops Drill — a free network task every day.
Open the app →
Free tools for this
More from the blog
Subnetting on the Fortinet NSE4 exam: what to expectRead →Auditing an ACL for the permit any that should not be thereRead →