~/netref / Binary / Dec / Hex
##

Binary · Decimal · Hex

Every IP octet is 8 bits. Master the place values and conversion becomes instant. Click any bit below to flip it.

// live octet converter
dec
hex 0xAC
bin 10101100
// powers of 2
20
1
21
2
22
4
23
8
24
16
25
32
26
64
27
128
28
256
29
512
210
1,024
211
2,048
212
4,096
213
8,192
214
16,384
215
32,768
216
65,536
// quick conversions
192 = 11000000
168 = 10101000
255 = 11111111
10  = 00001010
0xFF = 255
// decimal → binary, by hand
  1. Write the 8 place values: 128 64 32 16 8 4 2 1
  2. Go left→right: does the place value fit in what remains?
  3. If yes write 1 and subtract it; if no write 0
  4. Stop at 0 — the bit string is your binary
  5. Hex: split the 8 bits into two nibbles, map each 0–F
// hex digit reference
HexDecBinary
000000
110001
220010
330011
440100
550101
660110
770111
881000
991001
A101010
B111011
C121100
D131101
E141110
F151111
// a full IP in binary — 192.168.10.1
192.168.10.1  =  11000000.10101000.00001010.00000001
32 bits = four 8-bit octets. The same value in hex is C0.A8.0A.01.