Certified Entry-Level Python Programmer (PCEP-30-02) — Question 54
What is the decimal value of the following binary number?
1010
Answer options
- A. 8
- B. 4
- C. 12
- D. 10
Correct answer: D
Explanation
The binary number 1010 converts to decimal as follows: 1*2^3 + 0*2^2 + 1*2^1 + 0*2^0, which equals 8 + 0 + 2 + 0 = 10. The other options (A, B, and C) do not represent the correct conversion of the binary number into decimal.