Convert between bases, flip bits, play with bitwise operators, and see why negative numbers look the way they do inside a computer.
The same number can be written in any base — binary (2), octal (8), decimal (10) or hexadecimal (16). Edit any field and the others update live, or flip bits directly on the grid. Conversions use exact big-integer math, so huge values never lose precision.
Viewing as unsigned — click bits to toggle them.
Computers store everything — numbers, text, images, sound — as binary: patterns of ones and zeros. This playground lets you convert between base 2, 8, 10 and 16, toggle individual bits, and experiment with the bitwise operations that low-level code uses every day.
In any base, each digit position carries a different weight. Binary 101010 is 32+8+2 = 42 in decimal — the same digits, different powers of two.
One hex digit represents exactly four bits, so programmers write memory addresses and color codes compactly: 0xFF is 11111111.
AND masks bits, OR sets them, XOR flips them, NOT inverts them, and shifts slide whole patterns left or right — multiplying or dividing by powers of two.
Signed integers use the top bit as a sign. Negative values are formed by inverting the positive pattern and adding one, which lets the same adder circuit handle positive and negative numbers.
Log in to share your feedback on this tool.