PureDevTools

Decimal to Binary Converter

Convert decimal to binary with 8-bit grouping, plus hex and octal output

All processing happens in your browser. No data is sent to any server.

Decimal → Binary

Group bits:

Binary (8-bit groups)

BIN11111111

Hexadecimal

HEXFF

Octal

OCT377
Bits: 8Bytes: 1
8-bit reference table ▸
Decimal8-bit BinaryHexOctal
000000000000
100000001011
200000010022
400000100044
8000010000810
16000100001020
32001000002040
640100000040100
1281000000080200
25511111111FF377

Converting decimal numbers to binary is a core skill in systems programming, network engineering, and low-level debugging. Whether you’re checking a bitmask, understanding an IP subnet, or working with hardware registers, you need binary. This converter turns any decimal integer into binary with 8-bit grouping for readability — plus hex and octal as bonus outputs.

How Decimal to Binary Conversion Works

The algorithm: repeatedly divide the number by 2, record the remainder (0 or 1), then read the remainders in reverse.

Example: 202 → binary

DivisionQuotientRemainder
202 ÷ 21010
101 ÷ 2501
50 ÷ 2250
25 ÷ 2121
12 ÷ 260
6 ÷ 230
3 ÷ 211
1 ÷ 201

Reading remainders bottom to top: 11001010 = 202.

8-Bit Groups: Why They Matter

Raw binary strings become hard to read at length. Grouping into 8-bit blocks (bytes) aligns with how computers actually store data:

Without grouping: 1100101011110000
With 8-bit groups: 11001010 11110000

Each 8-bit group corresponds directly to one byte. This lets you mentally process multi-byte values more easily and spot patterns like repeated bytes or specific nibbles.

The 4-bit grouping option is useful when working with hex, since each hex digit = 4 bits:

4-bit groups: 1100 1010 → CC AA → wait, no: 1100=0xC, 1010=0xA → 0xCA

Powers of 2 Reference

Understanding powers of 2 lets you estimate binary conversions at a glance.

PowerDecimalHexSignificance
2⁰10x01Bit 0 (LSB)
20x02Bit 1
80x08Nibble boundary
2⁷1280x80Sign bit (8-bit)
2⁸2560x1009-bit range start
2¹⁰1,0240x4001 KiB
2¹⁵32,7680x8000Sign bit (16-bit)
2¹⁶65,5360x1000016-bit max + 1
2³¹2,147,483,6480x80000000Sign bit (32-bit)

Practical Applications

IP Subnet Masks

Subnet masks are fundamentally binary: /24 means the first 24 bits are 1, the rest are 0.

The binary view reveals why subnetting works the way it does.

Bitmask Operations in Code

Flags are often packed into a single integer for efficiency:

const READ    = 0b0001;  // 1
const WRITE   = 0b0010;  // 2
const EXECUTE = 0b0100;  // 4

let perms = READ | WRITE;       // 3 = 0b0011
let canRead = perms & READ;     // 1 (truthy)
let canExec = perms & EXECUTE;  // 0 (falsy)

Color Channel Arithmetic

RGB colors: each channel is an 8-bit (0–255) decimal value. 128 = 0b10000000 — exactly half brightness.

Signed vs. Unsigned

In 8-bit signed arithmetic, 128 decimal overflows (the MSB is the sign bit). Binary makes this visible: 10000000 is -128 in two’s complement. This tool shows unsigned values; the bit pattern is the same, but interpretation differs.

The Bit Count Display

The tool shows how many bits the result uses and how many bytes it requires. A value of 200 uses 8 bits (1 byte); a value of 300 uses 9 bits (2 bytes minimum).

Privacy

All conversions run entirely in your browser. No server involved, no data stored.

Related Tools

More Encoding & Crypto Tools