Number System Converter

Number System Converter

Number System Converter

Explanation Binary to Octal
Since, there are only 8 digits (from 0 to 7) in octal number system, so we can represent any digit of octal number system using only 3 bit as following below.
Octal Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
So, if you make each group of 3 bit of binary input number, then replace each group of binary number from its equivalent octal digits. That will be octal number of given number number. Note that you can add any number of 0’s in leftmost bit (or in most significant bit) for integer part and add any number of 0’s in rightmost bit (or in least significant bit) for fraction part for completing the group of 3 bit, this does not change value of input binary number. So, these are following steps to convert a binary number into octal number. Take binary number Divide the binary digits into groups of three (starting from right) for integer part and start from left for fraction part. Convert each group of three binary digits to one octal digit. This is simple algorithm where you have to groupe binary number and replace their equivalent octal digit.
Explanation Binary to Decimal
The decimal number is equal to the sum of binary digits (dⁿ) times their power of 2 (2ⁿ): decimal = d0×2⁰ + d1×2¹ + d2×2² + ...
Explanation Binary to Hexal
Since, there are only 16 digits (from 0 to 9 and A | a to F | f) in hexadecimal number system, so we can represent any digit of hexadecimal number system using only 4 bit as following below.
Hexal Binary Hexal Binary
0 0000 8 1000
1 0001 9 1001
2 0010 A | a 1010
3 0011 B | b 1011
4 0100 C | c 1100
5 0101 D | d 1101
6 0110 E | e 1110
7 0111 F | f 1111
So, if you make each group of 4 bit of binary input number, then replace each group of binary number from its equivalent hexadecimal digits. That will be hexadecimal number of given number. Note that you can add any number of 0’s in leftmost bit or in most significant bit for integer part and add any number of 0’s in rightmost bit or in least significant bit for fraction part for completing the group of 4 bit, this does not change value of input binary number.
Explanation Octal to Binary
There is a simple direct method to convert an octal number to binary number. Since there are only 8 symbols (i.e., 0, 1, 2, 3, 4, 5, 6, and 7) in octal representation system and its base (i.e., 8) is equivalent of 23=8. So, you can represent each digit of octal in group of 3 bits in binary number.
Octal Binary
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
This method is simple and also works as reverse of Binary to Octal Conversion. The algorithm is explained as following below.
  • Take Octal number as input
  • Convert each digit of octal into binary.
  • That will be output as binary number.
Explanation Octal to Decimal
The decimal number is equal to the sum of binary digits (dⁿ) times their power of 8 (8ⁿ): decimal = d0×8⁰ + d1×8¹ + d2×8² + ...
Explanation Octal to Hexal
No direct Convertion. One Way is to take every Octal digit and convert it to the binary equivalent.
Second Step is to Convert the binary equivalant to the hexal value.
Explanation Decimal to Binary
Steps for Binary Conversion:
  1. Divide the number by 2.
  2. Get the integer quotient for the next iteration.
  3. Get the remainder for the binary digit.
  4. Repeat the steps until the quotient is equal to 0.
Explanation Decimal to Octal
Steps for Octal Conversion:
  1. Divide the decimal number by 8. Treat the division as an integer division.
  2. Write down the remainder (in hexadecimal).
  3. Divide the result again by 8. Treat the division as an integer division.
  4. Repeat step 2 and 3 until result is 0.
  5. The hex value is the digit sequence of the remainders from the last to first.
Explanation Decimal to Hexal
Steps for Hexal Conversion:
  1. Divide the decimal number by 16. Treat the division as an integer division.
  2. Write down the remainder (in hexadecimal).
  3. Divide the result again by 16. Treat the division as an integer division.
  4. Repeat step 2 and 3 until result is 0.
  5. The hex value is the digit sequence of the remainders from the last to first.
Explanation Hexal to Binary
Convert each hexadecimal digit to four binary digits.
This chart is all you need to convert from one to the other:
Binary Hexal Binary Hexal
0000 0 1000 8
0001 1 1001 9
0010 2 1010 A | a
0011 3 1011 B | b
0100 4 1100 C | c
0101 5 1101 D | d
0110 6 1110 E | e
0111 7 1111 F | f
Explanation Hexal to Octal
No direct Convertion. One Way is to take every Hex digit and convert it to the binary equivalent.
Second Step is to Convert the binary equivalant to the octal value.
Explanation Hexal to Decimal
The decimal number is equal to the sum of binary digits (dⁿ) times their power of 16 (16ⁿ):
decimal = d0×16⁰ + d1×16¹ + d2×16² + ...

With the help of this converter, a number from one number system can be quickly and easily represented in other number systems. The binary, octal, decimal and hexadecimal systems are available for selection.
When entering a character that does not belong to the corresponding number format, you will be informed about it.
A conversion takes place directly with the input. With the help of the Clear button, all fields are blanked.

if()