Final answer:
In a binary code with 5 bits, there are 32 different code words. Out of these, 10 code words have exactly two 0s.
Step-by-step explanation:
A binary code with 5 bits can have two possible values, 0 or 1, in each position. Since there are 5 positions, the total number of different code words can be calculated by multiplying the number of possibilities for each position. In this case, that calculation is 2*2*2*2*2 = 32. So, there are 32 different code words.
To count the number of code words that have exactly two 0s, we can consider the positions where the 0s can occur. Since there are 5 positions and we want exactly two 0s, we can choose 2 positions out of the 5 to place the 0s. This can be calculated using the combination formula C(n, k), which represents the number of ways to choose k items from a set of n items without regard to their order. In this case, C(5, 2) = 5! / (2! * (5-2)!) = 10. So, there are 10 code words that have exactly two 0s.