Number to Octal
A base (also known as radix) of a number system tells us about the unique or different symbols and notations it uses to represent a value. For example, the base 8 tells us that it uses 8 different numbers i.e. 0 to 7 to represent a value. The most commonly used base in the number system is the base 10 which uses 10 different digits i.e. 0 to 10 to represent a value. Bases can be 0, positive, negative, complex, and non-integral. Other frequently used bases are base 2, base 8, and base 16. They are used in computing and are known as binary, octal, and hexadecimal respectively.
We can convert one base into the other base by following the simple conversion steps. Here, we will discuss the steps on how to convert a number from decimal to octal, octal to decimal, octal to binary, binary to octal, octal to hexadecimal, hexadecimal to octal, and so on.
Let us begin with the octal to decimal conversion
Decimal to Octal Conversion
To convert decimal to octal, we use the following steps:
The steps given below show how to convert a number from the decimal system to the octal system.
Example
Convert 560₁₀ into the octal system
Step 1: Observe the base of the required number.
As we have to convert the given decimal number into the octal number system, the base of the required number is 8.
Step 2: Divide the given decimal number by the base of the required number and list down the quotient and remainder in the form of quotient-remainder.
Repeat the process (dividing the quotient value again by base 8) till we get the quotient value less than the base.
[Image will be uploaded soon]
Octal to Decimal Conversion
To convert a number from an octal system to a decimal system, multiply each digit of the given octal number by the reducing power of 8.
Let us discuss octal to decimal conversion through an example:
Example:
Convert 764₈ into the decimal system
764₈ = 7 x 8² + 6 x 8¹ + 4 x 8º
= 7 x 64 + 6 x 8 + 4 x 1
= 448 + 48 + 4
= 500
Binary to Octal Conversion
To convert a number from binary system to the octal system, we use the following binary to the octal table:
Example:
Convert 1010111100₂ to octal number system
To convert binary to octal, we will group the binary digits by three, starting from the far right to left. You can add trailing zeros to the left of the last digit to complete the last group of three if required. Then replace each group of three digits with the equivalent octal digit.
1010111100₂ in a group of 3 is represented by \[\overline{001}\] \[\overline{010}\] \[\overline{111}\] \[\overline{100}\]. Here we have added trailing zeros to the left of the last digit to complete the last group of three.
Let us now convert base₂ to base₈
Octal to Binary Conversion
To convert a number from the octal system to the decimal number system, we simply need to follow the 2 steps given below:
Convert the given octal number into the decimal number system.
Convert the decimal number that is obtained in Step 1 into the binary number.
Let us understand octal to binary conversion through an example:
Example: Convert 205₈ into the decimal number system.
Step 1: Convert a number from the octal system to the decimal system
205₈ = 2 x 8² + 0 x 8¹ + 5 x 8º
= 2 x 64 + 0 x 8 + 5 x 1
= 128 + 0 + 5
= 133₁₀
Step 2: Convert a decimal number that is obtained in the previous step into the binary system.
To get the equivalent binary number, we will list down all the remainder values from bottom to top.
Octal to Hexadecimal Conversion
To convert octal to hexadecimal or hexadecimal to octal, we need to memorize the table given below:
Octal to Hexadecimal Conversion Steps
To convert a number from the octal system to the decimal number system, we simply need to follow the 2 steps given below:
Convert the given number from the octal system into the binary number system.
Convert the binary number that is obtained in Step 1 into the hexadecimal number system.
Let us understand octal to hexadecimal conversion through an example.
Example: Convert 536₈ into the hexadecimal decimal number system
Step 1: Convert the given number from the octal system into the binary number system
To convert a number from the octal system to the binary number system, we simply need to follow the 2 steps given below:
Convert each octal digit into the equivalent three-digit binary number. Each of the digits must be treated as a decimal value.
Combine these groups of 3 binary values into a single binary number.
Convert each octal digit into the three-digit binary number as shown below:
\[\overline{101}\] \[\overline{011}\] \[\overline{110}\]
Combine these groups of 3 binary values (starting from the far right) into a single binary number.
536₈ = 101011110₂
Step 2: Convert the binary number that is obtained in the previous step into the hexadecimal number system.
101011110₂
To convert a number from binary system to the hexadecimal system, we will group the binary digits by four, starting from the far right and proceeding to the left as shown below. You can add trailing zeros to the left of the last digit to complete the last group of four if required.
101011110₂ in a group of 4 is represented by as \[\overline{0001}\] \[\overline{0101}\] \[\overline{1110}\]. Here we have added trailing zeros to the left of the last digit to complete the last group of four.
Now, let us convert the 1101011110₂ into the base₁₆.
Hexadecimal to Octal Conversion
To perform the hexadecimal to octal conversion, we simply need to follow the below-mentioned steps.
Write each of the given hexadecimal number digits into its equivalent binary number.
Combine and make the groups of binary bits, each group containing 3 bits from right to left. You can add trailing 0’s to the left of the last digit if there are less than 3 digits in the last group.
Find the equivalent hexadecimal number of each binary group.
Let us understand hexadecimal to octal conversion, through an example.
Example: Convert (1BC)₁₆ into the octal number system
Step 1: Convert each hexadecimal digit into the four-digit binary number as shown below:
Step 2: Combine and make the groups of binary bits, each group containing 3 bits from right to left.
000, 101 , 111, 100
Step 3: Now, write down the equivalent hexadecimal number of each binary group of 3 bits.
FAQs on Base Conversion
1. What is a Binary Number System?
Ans. The binary number systems (also known as base 2) are a representation of a number using the two bits i.e. os and 1s, instead of decimal. Each digit in a binary number system is referred to as a bit or binary digit. The group of 8 bits makes one byte. Binary numbers are extensively used in computers as data in computers are stored in terms of bits or bytes. 11000₂, 1010101₂,111101₂ are some of the numbers in the binary number system.
2. What is a Decimal Number System?
Ans. The decimal number systems (also known as base 10) are a representation of a number using 10 different digits i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. If we observe any number without any base, we treat it as a decimal number. The decimal number system is the system that is frequently used to represent any number in real life. 724₁₀,921₁₀, 65₁₀ are some of the numbers in the decimal system.
3. What is an Octal Number System?
Ans. Octal numbers (also known as base 10) are a representation of a number using 10 different digits i.e. 0,1, 2, 3, 4, 5, 6, and 7. The advantage of the octal number system is that it uses fewer digits to represent a number in comparison to the decimal number system and hence there would be fewer computation errors. For example, 36₈, 924₈, and 142₈ are some of the numbers in the octal number system.
4. What is a Hexadecimal Number System?
Ans. Octal numbers (also known as base 16) are a representation of a number using 10 different digits i.e. 0,1, 2, 3, 4, 5, 6, 7,8,9, A, B, C, D, and E. Here, A is 10, B is 11, C is 12, and so on. The hexadecimal number system is widely used in computers to minimize the large-sized string of the binary system. 8B3₁₆, 7F₁₆, 3B2A₁₆ are some of the examples of hexadecimal number systems.