Binary Converter

The number 42 in binary is 101010 — six bits alternating all the way, which is one reason programmers are fond of it.

—

Everything is worked out in your browser — your text and numbers are never uploaded anywhere.

How it works

Flip between the counting system humans use and the one machines use. Decimal to binary shows the bit pattern with its length and the octal and hex readings alongside, because real work never involves one base at a time. Binary back to decimal validates that your input is genuinely binary before believing it.

Negative and fractional values are declined with an explanation rather than guessed at: two's-complement and floating-point are each their own conventions, and neither is the plain conversion this page promises.

The method

Standard base conversion on whole numbers: decimal → base 2 by repeated division (as performed exactly by the browser's radix conversion on integers), binary → decimal by positional sum after validating the input contains only 0 and 1.

Check important dates twice. Every result here is worked out from the values you enter and the calendar, clock and counting conventions described on the page. Date and time answers can depend on time zones and daylight-saving rules, and counting tools follow the definitions printed with them. For deadlines, filings, payroll or anything with money attached, confirm the figure against an authoritative source.

Frequently asked questions

How do I read 101010 as a number?

Each position doubles: from the right — 0×1, 1×2, 0×4, 1×8, 0×16, 1×32 — summing the lit positions gives 2 + 8 + 32 = 42.

Why are octal and hex shown too?

Because they are binary in shorthand: each octal digit is exactly 3 bits and each hex digit exactly 4, so programmers read long bit patterns through them.

Can it convert negative numbers?

Not here. Negatives in binary are stored by convention (usually two's complement, which depends on a chosen bit width), so a width-free converter would be guessing.

Embed this tool

Put this tool on your own site for free — copy the code below. It runs entirely in the visitor's browser, like it does here.

<iframe src="https://calcwhen.com/embed/binary-converter/" width="100%" height="520" style="border:1px solid #d9d5f2;border-radius:12px" loading="lazy" title="Binary Converter — CalcWhen"></iframe>

Tool by CalcWhen — please keep the credit link so others can find the original.