Consider the polynomial
P(x)=\prod_{k=0}^{10}\left(x^{2^{k}}+2^{k}\right)=(x+1)\left(x^{2}+2\right)\left(x^{4}+4\right) \cdots\left(x^{1024}+1024\right) .
The coefficient of x^{2012} is equal to 2^{a}. What is a ?
Answer Choices
A. 5
B. 6
C. 7
D. 10
E. 24