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
Cum funcționează acest calculator?
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.
Formulă
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.
Întrebări frecvente
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.
Cunoscut și ca
TG we-Calculate Editorial Team. (2026). Binary Calculator — Binary, Octal, Decimal & Hex Converter [Online calculator]. TG we-Calculate. https://we-calculate.com/ro/calculator/binary-calculator
TG we-Calculate Editorial Team. "Binary Calculator — Binary, Octal, Decimal & Hex Converter." TG we-Calculate. 2026. https://we-calculate.com/ro/calculator/binary-calculator.
TG we-Calculate Editorial Team, "Binary Calculator — Binary, Octal, Decimal & Hex Converter," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/ro/calculator/binary-calculator
@misc{wecalculate_binary_calculator, title = {Binary Calculator — Binary, Octal, Decimal & Hex Converter}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/ro/calculator/binary-calculator}}, year = {2026}, note = {TG we-Calculate} }
Te-a ajutat acest calculator?
