Binary CS Thinking Example 2

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

Example 2

medium
Convert binary 11010211010_2 to decimal.

Solution

  1. 1
    Step 1: Write place values (right to left): 1,2,4,8,161, 2, 4, 8, 16.
  2. 2
    Step 2: Multiply each digit by its place value: 1ร—16+1ร—8+0ร—4+1ร—2+0ร—11 \times 16 + 1 \times 8 + 0 \times 4 + 1 \times 2 + 0 \times 1.
  3. 3
    Step 3: 16+8+0+2+0=2616 + 8 + 0 + 2 + 0 = 26.

Answer

2626
Each position in binary represents a power of 2. Converting to decimal means summing the powers of 2 where the binary digit is 1.

About Binary

Binary is a base-2 number system that uses only two digits, 0 and 1, to represent all values. Each digit position represents a power of 2, and computers use binary because electronic circuits have exactly two states: on and off.

Learn more about Binary โ†’

More Binary Examples