Discussion
The number of bit strings of length eight that will either start with a 1 bit or end with two bits 00 shall be
Answer: D
Count the strings starting with 1: the first bit is fixed and the other seven are free, so there are 2^7 = 128. Strings ending with 00: the last two bits are fixed and six are free, so 2^6 = 64. Strings that do both (start with 1 and end with 00) have 5 free bits, so 2^5 = 32.
\[ 128 + 64 - 32 = 160 \]
By inclusion and exclusion, the number of strings is 160. The value 32 counts only the strings that do both, 64 is only those ending in 00, and 128 is only those starting with 1, so each of them leaves something out.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development