List the powers of 8. Remember that "decimal" is called base 10 because each digit represents a power of Octal, or the base 8 number system, uses powers of 8 instead of powers of Write a few of these powers of 8 in a horizontal line, from largest to smallest. Note that these numbers are all written in decimal base 10 : 8 2 8 1 8 0 Rewrite these as single numbers: 64 8 1 You don't need any powers of 8 larger than your original number in this case, Divide the decimal number by the largest power of eight.
Take a look at your decimal number: The nine in the 10s place tells you that there are nine 10s in this number. Similarly, with octal, we want to know how many "64s" go into the final number. Divide 98 by 64 to find out. Find the remainder. Calculate the remainder of the division problem, or the amount left over that doesn't go in evenly.
Write your answer at the top of the second column. This is what's left of your number after the first digit is calculated. Divide the remainder by the next power of 8. To find the next digit, we move one step down to the next power of 8. Repeat until you've found the full answer. Just as before, find the remainder of your answer and write it at the top of the next column. Keep dividing and finding the remainder until you've done this for every column, including 8 0 the ones place.
Your final row is the final decimal number converted to octal. Check your work. To check your work, multiply each digit in octal by the power of 8 it represents. You should end up with your original number. Try this practice problem. Practice this method by converting the decimal number into octal. When you think you have the answer, highlight the invisible text below to see the whole problem laid out.
Hint: it's fine to have 0 as the answer to a division problem. Method 2. Start with any decimal number. We'll start with the decimal number This method is faster than the successive division method. Most people find it more difficult to understand why it works, and may want to start with the easier method above. Divide this number by 8. Ignore decimal values for now.
You'll see why this calculation is useful soon. Now that we've "counted by 8" as many times as we can, the remainder is the small number left over. This is the last digit of our octal number, in the ones place 8 0. The remainder is always smaller than 8, so it can't be represented by any of the other digits.
Our octal number so far is??? If your calculator has a "modulus" or "mod" button, you can find this value by entering " mod 8. Divide the answer to your division problem by 8. Set aside the remainder and return to your division problem.
Take your answer and divide by 8 again. Note the answer, then find the remainder. In our example: The answer to our last division problem was Our octal number so far is?? For further convenience, we have outlined the octal to decimal table for your analysis of the two systems. Send feedback Loading…. Need some help? Octal to Decimal.
Octal to decimal Decimal to octal Octal to hex Decimal to ascii Ascii to decimal. Enter octal number:. Calculate Loading…. Decimal result: 0. Hex result: 0. Decimal calculation: 0. Table of Contents 1 How to convert octal to decimal 2 Decimal calculation: 3 Octal to decimal table. How to convert octal to decimal With this octal converter tool, you can convert octal to decimal system for whatever reasons in no time. Enter the octal number.
Sequential Circuits. Number Representation and Computer Airthmetic. Table of Contents. Improve Article. Save Article. Like Article. Python3 program to convert. Initializing base value. Extracting last digit. Multiplying last digit. This code is contributed by mits. WriteLine octalToDecimal num ;.
0コメント