IP Address Notations: Decimal to 32-Bit

toolsphere.in · 2026-10-04 · by Long Nguyen ·generic
Why the same IPv4 address gets written as dotted-decimal, binary octets, a hex string, or one packed integer depending on context, and how to convert between them.

IP Address Notations: Decimal to 32-Bit

Back to all articles

Try it: free IP Address ConverterConvert an IPv4 address between dotted-decimal, binary, hexadecimal, octal, and 32-bit integer.Open →

One 32-bit number, several ways to write it

An IPv4 address is fundamentally a single 32-bit number — every notation you'll encounter is just a different way of writing that same value, chosen for whichever context makes it most convenient to read or process.

Dotted-decimal: 192.168.1.1
Binary:         11000000.10101000.00000001.00000001
Hex:            C0.A8.01.01
Packed integer: 3232235777

Dotted-decimal: the human-readable default

Splitting the 32 bits into four 8-bit (0–255) octets, each written in decimal and separated by dots, is the format almost everyone recognizes — chosen specifically because four small decimal numbers are far easier for a person to read, remember, and type correctly than a 32-bit binary string or a 10-digit integer.

Binary: what a subnet mask calculation actually operates on

Binary is rarely how addresses are stored or displayed in day-to-day tools, but it's the representation that makes subnetting logic transparent — a CIDR prefix (see CIDR Subnetting Explained) is literally a statement about how many leading bits are fixed, which is far more direct to reason about when the address is written in binary rather than decimal.

Hex: compact, and common in low-level networking tools

Hexadecimal packs the same 8 bits per octet into exactly 2 characters (`C0` instead of `192`), which shows up in packet capture tools, some router configuration interfaces, and IPv6 addresses (which use hex groups natively, unlike IPv4).

The packed 32-bit integer: what databases actually store

This is the form most people don't encounter directly but that matters a great deal behind the scenes: many databases, geolocation datasets, and IP-range lookup systems store addresses as a single 32-bit integer rather than four separate octets, because a single integer is both more storage-efficient and trivially comparable — checking whether an address falls within a range becomes a simple numeric comparison (`start <= ip <= end`) instead of comparing four separate octet fields with awkward carry logic.

192.168.1.1
= 192×256³ + 168×256² + 1×256¹ + 1×256⁰
= 3232235777

Common mistakes

  • Assuming dotted-decimal is the "real" underlying format. It's simply the most human-readable of several equivalent representations of the same 32-bit value.
  • Manually converting octets to a packed integer incorrectly. Each octet's positional weight is a power of 256, not 10 or 16 — a common arithmetic slip when converting by hand.
  • Forgetting hex requires exactly 2 characters per octet. A single-digit hex value needs a leading zero (`0A`, not `A`) to represent a full byte correctly in most conventions.

FAQ

Why do databases often store IP addresses as a single integer instead of the usual dotted format? A packed integer is more storage-efficient and makes range comparisons (is this address between X and Y) a simple numeric operation, rather than requiring per-octet comparison logic.

Is binary notation ever actually used in networking tools, or is it purely educational? It's genuinely used for subnetting logic — a CIDR prefix directly describes a count of fixed bits, which is most transparent to verify when the address is written out in binary.

How many hex characters represent one IPv4 octet? Exactly 2 — an 8-bit value (0–255) maps to exactly two hexadecimal digits (00–FF).

Convert any IPv4 address between dotted-decimal, binary, hex, and packed integer instantly with the IP Address Converter — entirely in your browser.

#### Interactive Utilities Discussed

Try the Free IP Address ConverterConvert an IPv4 address between dotted-decimal, binary, hexadecimal, octal, and 32-bit integer.Try the Free CIDR / Subnet CalculatorCalculate network address, broadcast address, subnet mask, and host counts from an IPv4 CIDR block.

#### Looking for other tools?

Explore ToolSphere Homepage →

toolsphere.in · 25 links

Comments (0)

No comments yet