Octal Help (decimal to octal)
Here is one way to convert a decimal number to octal.
First convert the decimal number to binary.
For example:
560 (decimal)
512 256 128 64 32 16 8 4 2 1
1 0 0 0 1 1 0 0 0 0
560 (decimal) = 1000110000 (binary)
Then convert the binary number to octal by grouping the bits into three bits starting from the right.
1 000 110 000
000
110
000
1
Then get the octal values by using this chart.
Octal Binary
=================
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
000 = 0
110 = 6
000 = 0
1 or 001 = 1
Then put the numbers together starting from the left or reverse order.
1060
560 (decimal) = 1060 (octal)
Another example:
448 (decimal)
Convert the number to binary.
256 128 64 32 16 8 4 2 1
1 1 1 0 0 0 0 0 0
448 (decimal) = 111000000 (binary)
Then convert the binary number to octal by grouping the bits into three bits starting from the right.
111 000 000
000
000
111
Then get the octal values.
000 = 0
000 = 0
111 = 7
Then put the numbers together starting from the left or reverse order.
700
448 (decimal) = 700 (octal)
Close