Beginner

Binary Calculator — Binary, Octal, Decimal & Hex Converter

Enter a number in binary, octal, decimal or hexadecimal and instantly see it in all four bases — with the binary representation grouped into 4-bit nibbles.

Input base

Non-negative whole number
Binary (grouped nibbles)
0010 1010
Десятковий
42
Binary
00101010
Octal
52
Hexadecimal
0x2A
Significant bits
6
Bytes required
1
Set bits (population count)
3
0326496128160192224256Decimal value on the binary number line
Результати є приблизними оцінками лише для загального ознайомлення та не є професійною порадою — завжди самостійно перевіряйте важливі результати, перш ніж покладатися на них. Прочитати повне застереження.
Швидка відповідь

Як працює цей калькулятор?

To convert a decimal n to binary: repeatedly divide by 2, collect remainders (LSB first). To convert binary to decimal: Σ bᵢ × 2ⁱ. One hex digit = 4 binary bits; one octal digit = 3 binary bits. Enter any base and the converter shows all four representations plus bit count, byte count, and popcount.

Формула
Decimal n = Σ dᵢ × baseⁱ • Reverse: repeated division by the target base
How this is calculated

Every non-negative integer can be represented in any positional numeral system by expressing it as a sum of powers of the base. In binary (base 2), each bit is a coefficient of a power of 2: the rightmost bit is 2⁰ (= 1), the next is 2¹ (= 2), then 2² (= 4) and so on. To convert a decimal number to binary, repeatedly divide by 2 and collect the remainders from bottom to top. Hexadecimal (base 16) uses digits 0–9 plus A–F for values 10–15; one hex digit encodes exactly four bits, making hex a compact notation for binary data.

The tool converts your input into an internal BigInt value (arbitrary precision), so it handles numbers far beyond JavaScript's safe integer limit of 2⁵³. The binary output is zero-padded to the nearest multiple of 4 bits (nibble boundary) and grouped into nibbles with spaces for readability, which is the standard way engineers read binary in hardware and protocol contexts.

The population count (number of set bits, also called Hamming weight or popcount) tells you how many bits are 1. It is used in error detection, cryptography, and CPU intrinsics like POPCNT. The byte count shows the minimum number of 8-bit bytes needed to store the value.

Поширені запитання

One nibble (4 bits) corresponds to exactly one hexadecimal digit, so grouping makes it easy to verify the hex equivalent visually. For example, binary 1010 1111 = 0xAF. Nibble grouping is standard in hardware design, networking (IPv6, MAC addresses) and assembly-language programming.

A bit is the smallest unit of binary information — a single 0 or 1. A byte is 8 bits and can represent values 0–255 (unsigned). Most modern computers address memory in bytes. The "bytes required" stat shows how many 8-bit bytes are needed to store the entered number.

This converter handles non-negative integers only. Negative numbers require a sign representation such as two's complement, which is base- and word-size-specific. Use a dedicated two's complement calculator for signed conversions.

Також відомий як

binary to decimal converter
decimal to binary calculator
binary hex octal decimal converter
number base binary converter
binary digit converter
binary number system calculator
base 2 number conversion

APA

TG we-Calculate Editorial Team. (2026). Binary Calculator — Binary, Octal, Decimal & Hex Converter [Online calculator]. TG we-Calculate. https://we-calculate.com/uk/calculator/binary-calculator

Chicago

TG we-Calculate Editorial Team. "Binary Calculator — Binary, Octal, Decimal & Hex Converter." TG we-Calculate. 2026. https://we-calculate.com/uk/calculator/binary-calculator.

IEEE

TG we-Calculate Editorial Team, "Binary Calculator — Binary, Octal, Decimal & Hex Converter," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/uk/calculator/binary-calculator

BibTeX

@misc{wecalculate_binary_calculator, title = {Binary Calculator — Binary, Octal, Decimal & Hex Converter}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/uk/calculator/binary-calculator}}, year = {2026}, note = {TG we-Calculate} }

Чи допоміг вам цей калькулятор?

Пов'язані калькулятори