Przejdź do treści
Liczbnik

Number base converter

Enter a number and select its input base (binary, octal, decimal or hexadecimal). The calculator instantly converts the value to all four number systems. An essential tool for developers, computer science and electronics students.

Reviewed byRedakcja Liczbnik
Calculator
Value in number systemsDecimal (DEC)255
Binary (BIN)
11,111,111
Octal (OCT)
377
Hexadecimal (HEX)
255

How we convert number bases

Each digit in base b represents a power of b. To convert to decimal: sum each digit × b^position. To convert from decimal: divide repeatedly by the target base and read the remainders from last to first. The calculator uses JavaScript's parseInt and toString methods.

Example calculation

Decimal 255: input base = 10, value = 255. Results: binary = 11111111, octal = 377, hexadecimal = FF. Enter FF with base 16 to get the same values in reverse.

Frequently asked questions

What is a number system?

A number system is a set of symbols and rules for writing numbers. The most common is decimal (base 10). Binary (2), octal (8) and hexadecimal (16) are widely used in computing.

How does binary work?

Binary uses only 0 and 1. Each position represents a power of 2 (from right: 2⁰, 2¹, 2², …). Example: 1010₂ = 0×1 + 1×2 + 0×4 + 1×8 = 10.

What is hexadecimal used for?

Hex uses digits 0–9 and letters A–F (A=10 … F=15). One byte (8 bits) = exactly two hex digits, so hex gives a compact way to write binary data. Example: 255₁₀ = FF₁₆.

How do you convert between number bases?

To convert any base to decimal: multiply each digit by the corresponding power of the base and sum. To convert decimal to another base: divide repeatedly by the target base and collect remainders.

How does octal differ from binary?

Octal (base 8) uses digits 0–7. Each octal digit equals exactly 3 binary bits. Example: 377₈ = 011 111 111₂ = 255₁₀.

How do you convert decimal to binary?

Divide the decimal number by 2 and record remainders. Read remainders from last to first. Example: 13 → 1101₂.

Indicative result

Results are indicative. The calculator handles integers — fractional numbers may produce imprecise results.
  • GCD and LCM Calculator

    Calculate GCD (greatest common divisor) and LCM (least common multiple) of two numbers. Free online calculator.

    Maths