# Consider a binary code with 4 bits (0 or 1) in each code word. In each

Consider a binary code with 4 bits (0 or 1) in each code word. In each code word, a bit is a zero with probability 0.6, independent of any other bit.
(a) What is the probability of the code word 0101?
(b) What is the probability that a code word contains exactly two ones?

• Questions are typically answered in as fast as 30 minutes

### Plainmath recommends

• Get a detailed answer even on the hardest topics.
• Ask an expert for a step-by-step guidance to learn to do it yourself.

Coldst
Step 1
Given data:
The probability of 0 bit is $$\displaystyle{P}{\left({0}\right)}={0.6}$$.
The expression for the probability of 1 bit is,
$$\displaystyle{P}{\left({1}\right)}={1}-{P}{\left({0}\right)}$$
Substitute the given values in the above expression.
$$\displaystyle{P}{\left({1}\right)}={1}-{0.6}$$
$$\displaystyle={0.4}$$
a) The expression for the probability of code-word 0101 is,
$$\displaystyle{P}{\left({a}\right)}={P}{\left({0}\right)}\times{P}{\left({1}\right)}\times{P}{\left({0}\right)}\times{P}{\left({1}\right)}$$
Substitute the given and above-calculated values in the expression.
$$\displaystyle{P}{\left({a}\right)}={\left({0.6}\right)}{\left({0.4}\right)}{\left({0.6}\right)}{\left({0.4}\right)}$$
$$\displaystyle={0.0576}$$
Thus, the probability of code-word 0101 is 0.0576.
Step 2
b) The expression for the probability that the code-word contains exactly 2 ones is,
$$\displaystyle{P}{\left({b}\right)}=^{{{4}}}{C}_{{{2}}}{\left({P}{\left({1}\right)}\right)}^{{{2}}}{\left({P}{\left({0}\right)}\right)}^{{{2}}}$$
Substitute the given values in the above expression.
$$\displaystyle{P}{\left({b}\right)}=^{{{4}}}{C}_{{{2}}}{\left({0.4}\right)}^{{{2}}}{\left({0.6}\right)}^{{{2}}}$$
$$\displaystyle={\frac{{{4}!}}{{{\left({2}!\right)}{\left({2}!\right)}}}}{\left({0.4}\right)}^{{{2}}}{\left({0.6}\right)}^{{{2}}}$$
$$\displaystyle={6}\times{\left({0.4}\right)}^{{{2}}}{\left({0.6}\right)}^{{{2}}}$$
$$\displaystyle={0.3456}$$
Thus, the probability that the code-word contains exactly 2 ones is 0.3456.