# How many bit strings of length eight either start with a 1 bit or end with the two bits 00?

**bit strings of length**8 that

**start**with

**1**and

**end**with

**00**: 25 = 32. Applying the subtraction rule, the number is 128 + 64 − 32 = 160.

Click to see full answer

Also to know is, how many bit strings of length ten either start with a 1 bit or end with the two bits 00?

**Bits** are **either 1** or 0, so there are 2 choices per **bit**, and 8 **bits** to choose. Therefore, there are 28 = 256 **bit strings of length ten** that **begin** and **end** with a **1**.

Similarly, how many bit strings of length 8 or less are there? There are 28 which is 256. That means there are 256 different values you can store in a byte, since a byte is eight bits. There are **256 eight**-bit ascii codes, for instance.

Considering this, how many bit strings of length 8 begin and end with a 1?

My answer would be: 26. Because we know, that the **bit starts** with **1** and **ends** with **1**: Which means, that 2 of the **length 8** is used, also there are 6 positions remaining, which is 26=64.

How many 8 bit strings have at least two consecutive 0's or two consecutive 1's?

There are only two 8-bit strings in which the bits alternate: **10101010** and 01010101. The total number of 8-bit strings with no restrictions is 2^8. Therefore the number of 8-bit strings which have at least two consecutive 0's or at least two consecutive 1's is 2^8 - 2.