1. A character in a ASCII system has size 1 byte or 8 bit (1 or 0)

A). How many bit patterns are formed?

B). How many bit patterns have 3 bits 1?

C). How many bit patterns have an even number of bits 1?

## Expert Answer

**Solution :**

**A) Number of bit patterns that can be formed :** 2^{8} bit patterns can be formed using 8 bits.

With n bits, 2^{n} bit patterns are possible. So with 8 bits 2^{8} bit patterns possible.

**B) Number of bit patterns that have 3 bits 1 :**

out of 8 bits , any 3 bits are selected to be 1 and other bits has to be 0.

There are ways to select 3 bits out of 8 bits. (we are selecting 3 bits to be 1 out of 8 bits. Which means rest 5 bits are 0 and we choose 3 bits to be 1).

hence there are bit patterns possible which has exactly 3 bits 1.

**C) Bit patterns with even number of bits 1 :**

even number of bits 1 = 0 number of bits 1 + 2 number of bits 1 + 4 number of bits 1 + 8 number of bits 1

= 1+ 28 + 70 + 1

= 100

hence there are 100 bit patterns that have an even number of bits 1.

if you have any doubts, you can ask in comment section.