Each of the first 8 digits is multiplied by the weights 9, 8, 7, 6, 5, 4, 3, 2 and the products are added. The remainder of the division by 11 decides the ninth digit: 0 or 1 gives 0, and any other remainder r gives 11 minus r. For 204716624 the sum is 139, the remainder is 7 and the digit is 4.