use case
Decimal to Binary Converter
Convert decimal integers to binary representation
Converting decimal numbers to binary is a fundamental operation in computer science — used when working with bitmasks, flags, file permissions, network subnets, and low-level programming. This tool converts any decimal integer to binary, octal, and hex simultaneously.
Step-by-step guide
- Enter the decimal number: Type any positive integer in the Input field (e.g. 42).
- Select Decimal as the input base: Choose Decimal (base 10) from the From base selector.
- Read the binary output: The Binary field shows the binary representation — for 42 that is 101010.
- Check if it is a power of two: The Is power of two field is useful when working with memory allocation, bitmasks, or hash table sizes that must be powers of 2.
Frequently asked questions
- How many bits does the decimal number 255 need?
- 8 bits. 255 in binary is 11111111 — all eight bits set. The tool reports bit length in the output.
- How do I convert decimal to binary manually?
- Repeatedly divide by 2, noting the remainder each time, until the quotient is 0. Reading the remainders in reverse order gives the binary representation. For 42: 42÷2=21 r0, 21÷2=10 r1, 10÷2=5 r0, 5÷2=2 r1, 2÷2=1 r0, 1÷2=0 r1. Reversed: 101010.
- What is the binary for Unix file permission 755?
- 755 in octal is rwxr-xr-x. In binary: 7=111, 5=101, 5=101 — the full 9-bit mask is 111101101.
Try it now
Use the Number Base Converter to complete this task — free, no sign-up, runs in your browser.
Open Number Base Converter →