Binary Number System Converter

Convert nonnegative integers among decimal, binary, hexadecimal, and octal notation with one input.

Convert decimal, binary, hexadecimal, and octal
Enter a value in any one field, then convert it to all four common number systems.

About the binary number system converter

A number system assigns values to written digits according to a base, also called a radix. Decimal uses base 10 and the digits zero through nine. Binary uses base 2 and only zero and one. Octal uses base 8 and digits zero through seven. Hexadecimal uses base 16, extending the decimal digits with A through F for values ten through fifteen. The same quantity can be represented in every system even though its written form changes. Computers store information as binary states, making base 2 fundamental to digital electronics and programming. Binary strings can become long, so octal and hexadecimal provide compact groupings. Each hexadecimal digit corresponds exactly to four binary bits, while each octal digit corresponds to three bits. For example, decimal 255 is binary 11111111, hexadecimal FF, and octal 377. These are four notations for one integer, not four different values. This converter lets any of the four fields act as the source. Entering a value clears the other fields and records the number system you are using. When you select Convert Number, the tool validates the allowed digits, parses the source value, and writes the equivalent decimal, binary, hexadecimal, and octal strings. Hexadecimal output uses uppercase letters for readability. Leading zeros are omitted because they do not change the numeric value. Place value explains the conversion process. In binary, positions from right to left represent powers of two: one, two, four, eight, and so on. The binary number 101010 therefore equals 32 plus 8 plus 2, or decimal 42. In hexadecimal, 2A equals two groups of sixteen plus ten, which is also 42. In octal, 52 equals five groups of eight plus two, again producing 42. The calculator accepts nonnegative integers that fit safely within JavaScript's exact integer range. It intentionally avoids fractions and signed two's-complement interpretation because those require choices about precision, word length, and encoding. A binary string beginning with one is treated as a positive magnitude, not automatically as a negative signed value. For bit-level programming tasks, establish the intended word size before interpreting a pattern as signed. Use this converter when checking programming constants, learning place value, translating digital logic values, reading permissions, or comparing encoded identifiers. For manual verification, group binary digits from the right in sets of four for hexadecimal or sets of three for octal. Keeping the source base explicit prevents errors such as treating decimal 1010 as binary 1010, which represents decimal ten.

Number system conversion examples

SourceEquivalent valuesExplanation
Decimal 255Binary 11111111, hex FF, octal 377Eight one-bits equal decimal 255.
Binary 101010Decimal 42, hex 2A, octal 52The active binary positions sum to 42.
Hexadecimal 100Decimal 256, binary 100000000, octal 400Hex 100 is sixteen squared.
Octal 755Decimal 493, binary 111101101, hex 1EDA familiar Unix permission notation converted as a number.

How to use the binary converter

  1. Choose one field that matches the number system of your source value.
  2. Enter a nonnegative integer using only digits valid for that base.
  3. Select Convert Number to calculate all four equivalent representations.
  4. Read or copy the decimal, binary, hexadecimal, or octal result you need.

Binary converter FAQ

How is binary converted to decimal?

Multiply each bit by its corresponding power of two and add the products. The calculator performs that place-value calculation automatically.

Why does hexadecimal use letters?

Base 16 needs six symbols beyond digits zero through nine. The letters A through F represent decimal values ten through fifteen.

Can I enter a value in any field?

Yes, the most recently edited field becomes the source. Converting then fills all four fields with equivalent representations.

Does the converter support negative binary numbers?

No, it handles nonnegative integer magnitudes. Signed binary requires a word length and encoding convention such as two's complement.

Why are leading zeros removed?

Leading zeros do not affect an integer's value. The converter displays the shortest standard representation of each result.