Number bases

Binary Calculator

Convert a decimal integer to binary, hexadecimal and octal.

Input limits

This browser calculator accepts non-negative safe integers so the displayed base conversion remains reliable in JavaScript.

Example

The decimal number 42 is 101010 in binary, 52 in octal and 2A in hexadecimal.

Where binary is used

Binary is base 2, using only 0 and 1. It is common in computing because digital systems represent data with two states.

Common mistakes

This page converts ordinary non-negative integers. It does not interpret signed integer formats, floating-point values, byte order or two's-complement negatives.

Last reviewed: 2026-05-17

Before relying on this result

Use this calculator together with the formula, assumptions, limitations and examples on the page. If the topic involves health, tax, lending, investment, legal, safety or current-rate decisions, treat the number as an estimate and check the relevant primary source or professional guidance.

Calculator metadata last reviewed: 2026-05-14.