To convert binary to octal we have to transform input value in base 2 to base-8 system.
The following is a conversion chart to help you compare values in base 2 with base 8:
| Value in Base 2 | Base 8 |
|---|---|
| 0 | 0 |
| 1 | 1 |
| 10 | 2 |
| 11 | 3 |
| 100 | 4 |
| 101 | 5 |
| 110 | 6 |
| 111 | 7 |
| 1000 | 10 |
| 1001 | 11 |
| 1010 | 12 |
| 1011 | 13 |
| 1100 | 14 |
| 1101 | 15 |
| 1110 | 16 |
| 1111 | 17 |