System Octal

System octal

The system octal has base 8 and is represented by the set {0, 1, 2, 3, 4, 5, 6, 7}

Conversions

To convert decimal system to octal

The binary representation of a decimal number (the passage of a number in base 10 to its corresponding in base 8), is calculated by successively dividing the quotient of the division of the number by the divisor 8, until obtaining a quotient less than 8. The representation in base 8 it will be the last quotient followed by the last remainder followed by the previous remainder followed by the previous remainder and so on until the first remainder obtained

Example: Convert 3737 to octal representation

Number Ratio Rest
\frac{3737}{8} 467 1
\frac{467}{8} 58 3
\frac{58}{8} 7 2

So we have to:

3737_{(10} = 7231_{(8}

To convert decimal system to octal with decimal

The binary representation of a decimal number with decimals (the passage of a number in base 10 to its corresponding in base 8), is calculated by successively multiplying the number (after the results) without its integer part by 8, until obtaining a number without decimals , up to an amount that is repeated periodically (in the case of periodic numbers), or up to a number of digits predefined by the precision of the machine. The representation in base 8 will be the integer part without modifications, then the comma is added and finally the integer part of the result of successive multiplications

Example: Convert 56.75 to octal representation with decimals

Number Ratio Rest
\frac{56}{8} 7 0

So we have that the integer part is:

56_{(10} = 70_{(8}

Number Result Integer part
0,75 \cdot 8 6 6

So we have that the decimal part is:

0,75_{(10} = 6_{(8}

So we have to:

56,75_{(10} = 70,6_{(8}

Convert system-octal to decimal

The decimal representation of an octal number would correspond to applying the formula:

b_1 \cdot 8^{(n - 1)} + \cdots + b_n \cdot 8^0

Where n would be the length of the string, and b_i the value corresponding to the i-th position of the string, starting from left to right

Example: Convert 7231 to decimal representation

7231_{(8}=7 \cdot 8^3 + 2 \cdot 8^2 + 3 \cdot 8^1 + 1 \cdot 8^0 = 7 \cdot 512 + 2 \cdot 64 + 3 \cdot 8 + 1 \cdot 1 = 3584 + 128 + 24 + 1 = 3737_{(10}

So we have to:

7231_{(8}= 3737_{(10}

Convert system octal to decimal with decimal places

If the number also has decimals, it will be expressed with the following formula:

b_1 \cdot 8^{(n - 1)} + \cdots + b_n \cdot 8^0+ b_{(n + 1)} \cdot 8^{-1} + \cdots+ b_{(n + m)} \cdot 8^{-m}

Where n would be the length of the string without decimals, m the length of the string with decimals, b_i the value corresponding to the i-th position of the string, starting from left to right

Example: Convert 70.6 to decimal representation

70,6_{(8}=7 \cdot 8^1 + 0 \cdot 8^0 + 6 \cdot 8^{-1} = 7 \cdot 8 + 0 \cdot 1 + 6 \cdot 0,125 = 56 + 0,75 = 56,75_{(10}

So we have to:

70,6_{(8}= 56,75_{(10}