Converting
binary numbers to
Octal numbers in 1-2-3:
1)
Write down your binary number:
100100101011
2)
Divide your binary number into groups of 3
bits
(if you have an amount of bits that is not evenly divisable by 3 you add 0 bits onto the left side.)
100 100 101 011
3
convert each group into a octal digit using this formula:
f(a,b,c) = a*2^2 + b*2^1 +c
1: 1*2^2 + 0*2^1 +0 = 4
2: 1*2^2 + 0*2^1 +0 = 4
3: 1*2^2 + 0*2^1 +1 = 5
4: 0*2^2 + 1*2^1 +1 = 3
100100101011(2) = 4453(8)
If you want to convert decimal numbers to octal numbers, you problaby want to convert from
decimal to binary first