Method 1: Use the remainder method of dividing by 8.
Example: Convert decimal number 115 to octal number
8| 115... 3
8| 14... 6
8| 1... 1
Result: (115) 10 = (163) 8
Method 2: First use the method of decimalizing binary, and then convert the binary number into octal number
Example: (115) 10 = (1110011) 2 = (163) 8
Extended information:
Advantages of octal system
Octal is widely used in computer systems such as the PDP-8, ICL 1900 and IBM mainframes using 12-bit, 24-bit or 36-bit. Octal is the basis for these because their optimal binary abbreviation size is divisible by 3 (each octal digit represents three binary digits). Four, eight to twelve numbers can succinctly display the entire machine.
It also reduces costs by allowing numbers to be used in operator consoles via nixie tubes, seven-segment displays, and calculators, which are too complex to use in binary displays, whereas decimal displays require complex hardware, and hexadecimal displays The system needs to display more digits.
Baidu Encyclopedia-Octal