Number System Converter

Convert binary, decimal, octal and hexadecimal with steps.

Supports negative values, A–Z digits and fractions (e.g. 101.01 or 10.5).

Try:
Decimal (base 10)
45

Exact conversion

Binary bit positions

8-bit view

Powers of 2 above each binary digit. For very large numbers, a short preview is shown.

Step-by-step conversion

Number System Converter: Binary, Decimal, Octal and Hexadecimal

A number system converter helps you represent the same number in different bases. Computer science students frequently need to change binary into decimal, decimal into hexadecimal, octal into binary, or one custom base into another. The calculator above performs these conversions, explains the method and displays the number in all four commonly taught bases at once.

Every number system has a base, also called a radix. Decimal uses ten symbols (0–9), binary uses two (0 and 1), octal uses eight (0–7), and hexadecimal uses sixteen (0–9 and A–F). A computer number system converter works by interpreting the input digits using their place values and then expressing the same quantity using different digits and place values. This is the foundation of number system conversion in digital electronics, BCA, MCA, programming and computer engineering.

How to use the calculator: Enter your number, choose the input base, choose the output base and press Convert Number. The result appears immediately along with binary, octal, decimal and hexadecimal representations. Open the steps to see the positional expansion and repeated-division method. For other tasks, choose Indian / Intl., Roman Numbers or Digital Codes above.

What Is a Number System in Computer Science?

A number system describes how digits are arranged to represent a quantity. In a positional number system, each digit has a place value that depends on the base. In decimal, the number 352 means 3 × 10² + 5 × 10¹ + 2 × 10⁰. In binary, the number 1011 means 1 × 2³ + 0 × 2² + 1 × 2¹ + 1 × 2⁰. Both use the same rule; only the base changes.

The four main number systems studied in introductory computing are binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). You might see these together under binary decimal octal hexadecimal, number system and conversion, conversion in number system or binary octal hexadecimal. Binary represents digital bits, octal groups three binary digits, and hexadecimal groups four binary digits. Decimal remains the everyday counting system.

Number systemBaseAllowed digitsExample: decimal 45
Binary20, 1101101
Octal80–755
Decimal100–945
Hexadecimal160–9, A–F2D

Binary to Decimal Converter with Steps

The binary to decimal conversion is a common exam question. Each binary position represents a power of 2, starting from 2⁰ at the rightmost position. To convert 101101₂ into decimal, add the place values for all the positions that contain 1. This method is also called positional expansion. It is the easiest way to check your answer without a calculator.

101101₂ = (1 × 32) + (0 × 16) + (1 × 8) + (1 × 4) + (0 × 2) + (1 × 1) = 45₁₀

Use the main tool as a binary number to decimal, binary calculator to decimal or binary to decimal conversion calculator. Enter 101101, select Binary (2) and Decimal (10), and view the steps. If your homework asks for 1011 binary to decimal, the answer is 11 because 8 + 2 + 1 = 11. For 110 binary to decimal, the answer is 6. For 101 binary to decimal, the answer is 5. For 11111 binary to decimal, the answer is 31.

Many students search binary to decimal conversion examples or binary to decimal examples because place values can be confusing. A useful shortcut is to write 1, 2, 4, 8, 16, 32, 64 and so on, then add only the columns with a bit of 1. Leading zeros do not change the value: 00001011₂ and 1011₂ both equal eleven.

Decimal to Binary Converter with Steps

The reverse task, decimal to binary, is often solved by repeatedly dividing a whole number by 2. Write down the remainder at each division, stop when the quotient becomes zero, and read the remainders from bottom to top. This is the standard decimal to binary formula taught in programming and digital electronics classes.

45 ÷ 2 = 22 remainder 1
22 ÷ 2 = 11 remainder 0
11 ÷ 2 = 5 remainder 1
5 ÷ 2 = 2 remainder 1
2 ÷ 2 = 1 remainder 0
1 ÷ 2 = 0 remainder 1
Read upward: 101101₂

Our tool acts as a decimal to binary converter, calculator decimal to binary, decimal number to binary, decimal to binary conversion examples guide and decimal to binary converter with steps. For the familiar example 40 to binary, the result is 101000₂. For 224 to binary, the answer is 11100000₂. The result is exactly the same whether the input is typed with or without leading zeros.

For a decimal to binary fraction, multiply the fractional part by two repeatedly and record the integer parts in order. For example, 0.625 × 2 = 1.25, leaving 0.25; then 0.25 × 2 = 0.5; then 0.5 × 2 = 1.0. The fractional binary digits are 101, so 0.625₁₀ = 0.101₂. This calculator supports finite input fractions and shows up to 24 output fractional digits. Values such as decimal 0.1 have repeating binary expansions, so the displayed output is explicitly marked as truncated rather than claimed to be exact.

Binary to Hexadecimal and Hexadecimal to Binary

The quickest binary to hexadecimal method is to split the binary digits into groups of four, working from the right. Convert each group into its corresponding hexadecimal digit. For example, 11010111₂ groups as 1101 0111. The first group is D, the second is 7, so the answer is D7₁₆. The calculator also functions as a binary to hex, binary to hexadecimal calculator and binary number to hexadecimal tool.

1101 0111₂ = D7₁₆   |   2F₁₆ = 0010 1111₂

For hexadecimal to binary, replace each hexadecimal digit with its four-bit form. The digit A corresponds to 1010 and the digit F corresponds to 1111. Therefore AF₁₆ becomes 10101111₂. Leading zero groups may be shown or omitted without changing the numerical value. Users searching for hex to binary calculator, hexadecimal to binary calculator, hex to binary and hexadecimal to binary encoder can use the same main converter.

Binary and hex are especially useful when reading machine instructions, memory addresses, bit masks, RGB colors and hexadecimal debugging output. Hexadecimal is shorter than binary, but it is not a different quantity. The converter changes the representation, not the underlying number.

Decimal to Hexadecimal and Hexadecimal to Decimal

To perform decimal to hexadecimal, repeatedly divide the decimal number by 16 and convert remainders 10–15 into A–F. For instance, 255 ÷ 16 gives quotient 15 and remainder 15; both correspond to F, so 255₁₀ = FF₁₆. Our calculator supports decimal to hexadecimal converter, conversion decimal to hexadecimal, decimal number to hexadecimal and decimal hexadecimal searches.

To complete a hexadecimal to decimal conversion, evaluate each position as a power of 16. For the hexadecimal number 2D, D is the digit 13, so 2 × 16 + 13 = 45. This is also called a hexadecimal decimal converter or hexadecimal to integer conversion. A hex digit can never be G, because base 16 allows only 0–9 and A–F. The main tool validates that rule before calculating.

Octal Conversion: Decimal, Binary and Hexadecimal

Octal is base 8, so each position stands for a power of 8. To find the decimal value of 157₈, calculate 1 × 64 + 5 × 8 + 7 = 111₁₀. If you are looking for an octal to decimal, octal to decimal calculator, calculator octal or octal conversion calculator, choose Octal (8) as the input base.

For decimal to octal, divide repeatedly by eight and read the remainders in reverse order. For binary to octal, group bits in threes, beginning at the right. Binary 101101₂ becomes 101 101, which is 55₈. Octal to binary reverses that rule by replacing each octal digit with a three-bit group. For example, 73₈ becomes 111 011₂.

The same calculator also converts hexadecimal to octal, octal to hexadecimal, hex to octal converter, convert hexadecimal to octal calculator and binary to octal conversion. It safely uses an exact integer representation for large whole numbers instead of depending on JavaScript's normal floating-point integer limit.

How to Convert One Number System to Another

The general approach to conversion from one number system to another is straightforward: first find the actual value using the input base, then express that value in the output base. A number system converter calculator can do this in one step for bases 2 through 36. This is also useful for conversion of base 2 to base 10, base 10 to base 16, ternary number system converter (base 3) and base-3 number system converter searches.

In the main calculator choose Other base (2–36) and enter your custom base. Binary and hexadecimal are only special cases of the same mathematical rule. In base 12, for example, A represents ten and B represents eleven. In base 36, the permitted symbols are 0–9 and A–Z. Negative values use a leading minus sign; the minus sign is not a digit.

The formula for interpreting a number is a sum of digits multiplied by powers of the base. For a number containing a decimal point, positions after the point use negative powers such as base⁻¹ and base⁻². This means 10.1₂ = 2 + 1/2 = 2.5₁₀. It is important to distinguish a finite input fraction from an output with a repeating expansion. This number system converter with decimal points shows when a converted fraction has been cut off after the available display precision.

Binary Conversion Table and Quick Reference

A short binary decimal table or binary hexadecimal table is a practical revision aid. Learn the values from zero to fifteen first because a hexadecimal digit covers exactly four binary bits. The table below can be used as a conversion table of number system, binary number examples reference and hex binary table.

DecimalBinaryOctalHex
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

Indian Number System to International Number System Converter

Many students use Indian number system to international number system converter tools for homework, forms, finance lessons or written examinations. The Indian number system groups the first three digits from the right, then groups remaining digits in pairs. The international system groups all digits in sets of three. The actual numerical quantity is unchanged; only punctuation and naming conventions differ.

Indian: 12,34,567   |   International: 1,234,567
12 lakh 34 thousand 567 = 1 million 234 thousand 567

The Indian system uses lakh and crore, while the international system uses million and billion. One lakh is 100,000 and one crore is 10,000,000. Ten lakh equals one million, and one hundred crore equals one billion. The Indian / Intl. tab provides an indian number system converter in words, international number system converter in words, number to indian number system converter, indian number to us number system converter and international number system converter in one place.

You can also use it as a number to words and amount in words calculator for classroom examples. Enter a decimal amount, and the tool shows Indian and international digit grouping, two number-name versions, and a simple rupees-and-paise reading for nonnegative values with up to two decimal places. The names are written in English. The converter does not change the currency or apply an exchange rate.

Roman Numeral Converter and Roman Letter Values

Roman numerals use the letters I, V, X, L, C, D and M instead of positional decimal digits. The values are 1, 5, 10, 50, 100, 500 and 1000. Our Roman Numbers tab can convert ordinary integers into Roman numerals and convert correctly formed Roman numerals back into numbers. It supports standard forms from 1 through 3999.

A roman letter converter, roman numeral conversions, number into roman numerals or decimal to roman numeral query may ask for the same feature. For example, 49 becomes XLIX: XL is forty and IX is nine. The number 2026 becomes MMXXVI. Roman numerals do not have a standard positional zero, so zero is not accepted by this tool.

Students sometimes ask for the roman numerals to hindu arabic numbers conversion because the symbols used in everyday decimal numbers are often called Hindu-Arabic numerals. The phrase simply means converting from a symbol such as XIV into the number 14. The tool also rejects nonstandard repetitions like IIII rather than silently accepting them as canonical Roman numerals.

BCD to Binary and Decimal: 8421 Code

BCD to binary conversion is a common digital electronics topic, but it needs careful wording. Binary-coded decimal (BCD) stores each decimal digit separately as a four-bit binary code. For example, decimal 25 is binary 11001₂, but its 8421 BCD representation is 0010 0101. The two bit patterns are different because BCD is a digit-encoding system, not ordinary binary conversion.

259 decimal → BCD: 0010 0101 1001
259 decimal → ordinary binary: 100000011

The Digital Codes tab supports bcd to binary number system converter, bcd to hexadecimal conversion study questions and direct BCD encoding or decoding. To decode, separate the bits into groups of four; each group must represent a decimal digit from zero through nine. The codes 1010–1111 are invalid for standard 8421 BCD. A calculator should flag them rather than interpreting them as decimal digits.

Binary to Gray Code Conversion

Gray code is a binary labeling scheme in which adjacent values differ by only one bit. It is important in position encoders, digital circuitry and certain error-reduction applications. For binary to gray code conversion, copy the first binary bit; each later Gray bit is the XOR of the current binary bit and the preceding binary bit. The reverse calculation starts with the first Gray bit and cumulatively XORs successive Gray bits to recover binary.

The Digital Codes tab supports binary to gray code conversion, digit to binary examples, and digital systems tutorials. This tool preserves the given bit width, including any leading zeros that you enter. Unlike a decimal-place conversion, Gray code does not give an independent number base with positional powers. It is an encoding of a binary sequence.

Hexadecimal to ASCII and Text to Binary

Some computer-science exercises ask you to convert hexadecimal to ascii, binary number converter to text, or convert readable characters into bit patterns. The important distinction is between a number's value and the bytes that encode a string. For example, the character A has ASCII decimal code 65, hexadecimal byte 41 and binary byte 01000001. The decimal number 65, meanwhile, is a numerical quantity that can be represented in different bases without being interpreted as a letter.

Our Text → Binary & Hex mode encodes text as UTF-8 bytes. Basic English ASCII characters have the same byte values in UTF-8, while non-ASCII characters may use multiple bytes. The Binary → Text and Hex → Text modes decode UTF-8 bytes with validation. This makes the tool suitable for classroom demonstrations of binary to hex and binary number converter to text, without claiming that all characters are one ASCII byte.

Why the Same Value Looks Different Across Bases

The printed digits 101 do not always represent the same number. In decimal, 101 is one hundred and one. In binary, 101 is five. In octal, 101 is sixty-five. In hexadecimal, 101 is two hundred and fifty-seven. The base is therefore part of the meaning of the notation. Textbooks often use subscripts such as 101₂ and 101₁₀ to make this clear.

This matters in source code and embedded systems. Prefixes such as 0b1010 and 0xA typically indicate binary and hexadecimal numbers in programming languages. The main converter accepts 0b, 0o and 0x prefixes when the selected input base matches the prefix. For ordinary mathematics, the input can simply be written without the prefix. The result panel always names the selected target base.

Converting Fractions Without Losing Meaning

Integer conversions between positional bases are exact. Fractions introduce another issue: a fraction that terminates in one base may repeat forever in another. Decimal 0.5 ends in binary as 0.1₂ because one half equals 2⁻¹. Decimal 0.1 is one tenth, and its binary representation repeats. Therefore a short binary string cannot represent it exactly.

The converter uses whole-number arithmetic internally to represent the input fraction accurately, then repeatedly multiplies the remaining fraction by the output base. If the fraction becomes zero, the conversion is exact. Otherwise, the result includes a truncation notice after 24 fractional digits. This is much safer than showing a rounded floating-point value without stating that some digits have been omitted.

Number System Conversion in Digital Electronics

Electronics students use a number system conversion calculator when working with counters, registers, microcontrollers and logic gates. An eight-bit binary number can represent unsigned values from 0 to 255, or a different range if it is interpreted using signed two's-complement notation. Changing the base by itself does not determine whether a bit pattern is signed or unsigned.

The main converter treats a leading minus sign as an ordinary mathematical negative number. It is not a two's-complement encoder. If an assignment needs fixed-width signed operations, binary addition, shifts or bit masks, use a dedicated binary number calculator or Bitwise Calculator. For gate circuits, see the Logic Gate Calculator. Keeping these concepts separate prevents misleading results.

Worked Number System Conversion Examples

QuestionWorking ideaAnswer
1011 binary to decimal8 + 2 + 111
110 binary to decimal4 + 26
1101 binary to decimal8 + 4 + 113
1110 binary to decimal8 + 4 + 214
decimal 40 to binary32 + 8101000
binary to hexadecimal example1111 0000 → F 0F0
octal to binary5→101, 7→11157₈ = 101111₂
hex to decimal2 × 16 + 152F₁₆ = 47₁₀
decimal to octal64 + 8 + 173₁₀ = 111₈
decimal to binary with fraction10 + 0.6251010.101₂

Each example uses the same general relationship. A number is not changed by the conversion, only how its digits are written. If you are revising for an examination, write down the base beside every number. For a decimal to binary calculator with steps question, show the repeated divisions. For a binary to decimal formula question, show the powers of two. For a binary to hexadecimal conversion method question, group bits into sets of four.

Common Mistakes in Number System Conversion

  • Using an invalid digit: 102 is not a binary number because binary permits only 0 and 1. Likewise, 8 is not an octal digit.
  • Reading remainders in the wrong order: In decimal-to-base conversion, repeated-division remainders are read from last to first.
  • Forgetting zero padding in groups: In binary-to-hex conversion, pad the leftmost group to four bits if necessary.
  • Confusing BCD with normal binary: 25₁₀ = 11001₂, but its 8421 BCD encoding is 0010 0101.
  • Mixing number formatting with base conversion: 1,23,456 and 123,456 are the same decimal value, not different bases.
  • Assuming all fractions terminate: Decimal one tenth repeats in binary and should be labeled as approximate when digits are cut off.
  • Ignoring negative-number encoding: −5 is not the same as an unsigned bit pattern for a fixed-width two's-complement value.

Frequently Asked Questions

1. What is a number system converter?

A number system converter converts a value between positional bases such as binary, octal, decimal and hexadecimal without changing the value itself.

2. How do I convert binary into decimal number system?

Multiply every binary digit by its power of 2 and add the products. For 1101₂, calculate 8 + 4 + 1 = 13₁₀.

3. How do I convert decimal into binary number system?

Divide the integer by two repeatedly, record each remainder, and read the remainders in reverse. The calculator shows these steps for smaller integers.

4. Does the converter support hexadecimal to decimal?

Yes. Select Hexadecimal (16) as the input and Decimal (10) as the output. A–F represent the digit values ten through fifteen.

5. Can I convert binary to octal without decimal?

Yes. Group binary digits from right to left into sets of three, padding the first group if necessary. Each group becomes one octal digit.

6. Can I convert decimal fractions into binary?

Yes. Enter the number with a decimal point and choose the target base. Repeating fractional results are truncated after a set number of places and labeled accordingly.

7. Is the number system converter free?

Yes. All calculations run locally in your web browser, with no registration or external calculation service required.

8. Does this converter support base 3 and other number systems?

Yes. Choose Other base and enter any integer base between 2 and 36.

9. Can I convert Indian number system into international number system?

Yes. Use Indian / Intl. to see lakh/crore formatting beside thousand/million formatting and written number names.

10. Can I convert number into Roman numerals?

Yes. The Roman Numbers tab converts both ways for standard integers from 1 to 3999.

11. Is BCD the same as binary?

No. BCD encodes each decimal digit in four bits, while ordinary binary expresses the entire number using powers of two.

12. What is Gray code?

Gray code is a binary sequence encoding in which adjacent values differ in one bit. It is often used in electronic encoders and digital systems.

13. How do I convert hexadecimal into readable text?

Use Digital Codes → Hex bytes → Text. The input is interpreted as UTF-8 bytes, which include ASCII-compatible English characters.

14. Does it convert negative integers?

Yes, using the conventional minus sign. Fixed-width signed binary representations such as two's complement are a separate concept.

15. Can I use the tool for large numbers?

Yes. The base converter uses arbitrary-precision integer arithmetic for whole-number values, with an input-length limit to keep calculations responsive.

Practice Number System Conversion Online

Use the number system converter online above to check a homework answer, learn place-value methods or compare binary, decimal, octal and hexadecimal representations. Students searching for number system converter online, binary converter online, number system conversion calculator, convert number to hexadecimal, binary to decimal converter online or decimal to hexadecimal online can start with the main tab. The other tabs are available for Indian/international number naming, Roman numerals and digital encodings, without hiding the main calculator behind unrelated tools.