The probability of getting a code with exactly three 0s is number of codes with three 0s/total number of codes The Fundamental Principle of Counting states that if there are mm ways for one event to occur and nn ways for a second event to occur, then there are mnmn ways of both events occurring.

By the Fundamental Principle of Counting, to find the total number of possible codes we need to multiply the number of options there are for each digit. Since each digit can be either a 1 or a 0, then there are 2 options for each digit. Since the code is 4 digits, then the total possible number of codes is \(\displaystyle{2}\times{2}\times{2}\times{2}={2}^{{{4}}}={16}\)

The possible codes with three 0s are 0001, 0010, 0100, and 1000. There are then 4 possible codes with three 0s.

The probability of getting a code with exactly three 0s is then \(\displaystyle{\frac{{{4}}}{{{16}}}}\) which simplifies to \(\displaystyle{\frac{{{1}}}{{{4}}}}\)

By the Fundamental Principle of Counting, to find the total number of possible codes we need to multiply the number of options there are for each digit. Since each digit can be either a 1 or a 0, then there are 2 options for each digit. Since the code is 4 digits, then the total possible number of codes is \(\displaystyle{2}\times{2}\times{2}\times{2}={2}^{{{4}}}={16}\)

The possible codes with three 0s are 0001, 0010, 0100, and 1000. There are then 4 possible codes with three 0s.

The probability of getting a code with exactly three 0s is then \(\displaystyle{\frac{{{4}}}{{{16}}}}\) which simplifies to \(\displaystyle{\frac{{{1}}}{{{4}}}}\)