Question 412774

no. of possible code words when repetition allowed = 8 * 8 * 8 * 8 = 4096


no. of possible code, when repetition is not allowed = 8P4 = 1680

as repetition is not allowed, 

         no. of ways to arrange 4 letters out of 8 = 8P4 

another ways,  

no. of ways to choose  first letter for code = 8 

no. of ways to choose second letter for code = 7 (except the first one )

similarly, no. of ways to choose third and fourth letter are 6 and 5.

total no. of ways = 8*7*6*5 = 1680