Quick answer, why do you not use the calculator built into your computer for conversions between decimal - binary - octal - or hexadecimal. Programs>Accessories> calculator. When it appears under "View" select scientific. Enter the decimal number with Dec selected then click on Hex, Oct or Bin.
Formula: Converting decimal to octal or hexadecimal:
You asked about octal, so I will use it, but hexadecimal works using 16.
601 decimal to octal
Divide 600 by 8 = 75 and the remainder is 1
Divide 75 by 8 = 9 and the remainder is 3
Divide 9 by 8 =1 and the remainder is 1
Divide 1 by 8 = 0 and the remainder is 1
Reading from bottom to top 300 decimal is 1131 octal.
So keep dividing the number by the base number, until you only have a remainder, then use last remainder as the most significant number..
To change 1131 octal to decimal: Keep the right number, multiply all other digits by the base number times itself the same number of times that it is to the left of your right number..
Right most number 1
Multiply 3 x 8 = 24
Multiply 1 x 8 x 8 = 64
Multiply 1 x 8 x 8 x 8 = 512.
Add your numbers up and you get 601.