Machine-translated by Google. Questions are authored in English.
Top

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

  • A.32
  • B.64
  • C.128
  • D.160

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.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.