How many $1$s are in the first $1023$ binary numbers? How many $1$s are in the first $1023$ binary numbers?
I'm not to sure how to approach this question. An idea, formula, or solution is appreciated!
 A: Hint: For how many of those numbers will the one's bit be a $1$ (in other words: how many of those numbers are odd)? For how many of them will the two's bit be a $1$? For how many of them will the four's bit be a $1$? And so on. Also, it will probably be advantageous to include $0$ (and thus look at a collection of $1024$ binary numbers) to make the counting a bit easier. Or, if $0$ is already included, include $1023$ initially, then correct for it when you're done counting.
A: Any such number can be represented by a string of 10 0s and 1s.  The number of such strings with $n$ ones is $10$ choose $n$.  Thus, the number of ones which appear is 
$$
\sum_{n=0}^{10} n{10 \choose n}=5\cdot 2^{10}.
$$ 
A: As an addendum to Arthur's answer - if you count to, say, $2^{4} - 1 = 15$, you can easily figure out a pattern in the columns:
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111

So if you count to $2^{n} - 1$, you have $2^{n} * n$ digits ("rows * columns"), of which 50% are 1's.
For your example: Counting to $1023 =2^{10} - 1$, gets you $2^{10} * 10 * \frac{1}{2} = 5120$ binary 1's in total.
A: Assuming the "first" binary number is $1$ note that the first $1023$ binary numbers, plus $0$, are all the binary numbers you can write with exactly $10$ binary digits or bits (prepending $0$s to "short" numbers, as in $0000101010_2$). Between all of them, you then have $1024 \cdot 10=10240$ bits, and for symmetry reasons exactly half of those, $5120$, are $1$s.
A: It's easy to calculate. There is a pattern with any number used as pow of tow:
You have 2^x, where x> 0 and you will have a binary number as:
2^0 = 1 (Dec) = 1 (Binary)
2^1 = 2 (Dec) = 10 (Binary)
2^2 = 4 (Dec) = 100 (Binary)
...
2^10 = 1024 (Dec) = 100 0000 0000(Binary)
If you pay attention you will notice this:
2^10 - 1 = 1023 (Dec) = 011 1111 1111(Binary)
...
2^2 - 1 = 3 (Dec) = 011 (Binary)
2^1 = 1(Dec) = 01 (Binary)
2^0 - 1 = 0 (Dec) = 0 (Binary)
In this case, your question, the Number of ones matches with the number that is used for pow.
