Bits and Bytes CS Thinking Example 1

Follow the full solution, then compare it with the other examples linked below.

Example 1

easy
How many different values can be represented with 3 bits? List all possible 3-bit binary patterns.

Solution

  1. 1
    Step 1: Each bit can be 0 or 1. With 3 bits, the number of combinations is 23=82^3 = 8.
  2. 2
    Step 2: The patterns are: 000, 001, 010, 011, 100, 101, 110, 111.
  3. 3
    Step 3: These represent the values 0 through 7 in decimal. In general, n bits can represent 2n2^n different values.

Answer

8 different values (0 to 7): 000, 001, 010, 011, 100, 101, 110, 111.
A bit is the smallest unit of data (0 or 1). The number of possible values doubles with each additional bit: 1 bit = 2 values, 2 bits = 4, 3 bits = 8, and so on.

About Bits and Bytes

A bit is a single binary digit (0 or 1), the smallest unit of digital data. A byte is a group of 8 bits that can represent 256 different values (0 to 255), enough to encode one text character. All digital storage and communication is measured in bits and bytes.

Learn more about Bits and Bytes โ†’

More Bits and Bytes Examples