To convert any base number with n digits to decimal do the following:

1) Number the digits right to left from 0 to n-1.

In your case, 0107 is actually 107 and the leading 0 tells us its in octal.

so we have

107 <--- number 210 <--- digit numbers

2) now calculate the following sum. For each digit, multiply the digit by the number base to the power of the digit number, and add to the total.

In the case of 107 octal we have

1*8^2 + 0*8^1 + 7*8^0 = 64 + 0 + 7 = 71 (decimal)

To convert from binary to octal take the binary number and group the digits in threes starting from right to left. Convert each three binary digits to an octal digit and you have the number.

To convert from binary to hex take the binary number and group the digits in fours starting from right to left. Convert each four binary digits to a hex digit and you have the number.