What will be the value of least significant byte?

Let N be the sum of all numbers from 1 to 1023 except the five prime numbers 2, 3, 11, 17 , 31, all numbers are represented by two bytes, what is the value of least significant byte? My approach is sum of N natural number up to 1023 is $\frac{n(n+1)}{2}=\frac{2^{10} (2^{10}-1)}{2}$ which, once I subtract 64 from the given number, gives $(2^{19}-2^9-2^6)$ which gives me 01000000 as the value of least significant byte, but the answer is 11000000. I think I am doing something wrong. For not having any doubts I am giving the image of original question.

• Hint: $\sum_{n=1}^{1023} n = \frac{(1023)(1024)}{2} = 1023 \cdot 512$, and because $512$ is divisible by $256 (= 100000000_2)$, the last $8$ bits of the sum of all numbers from $1$ to $1023$ are all $0$. Now, subtract $64 (= 1000000_2)$, which is the sum of the five prime numbers. Commented Dec 10, 2016 at 6:29
• Am I not doing the same thing, I mean where I am doing wrong? Commented Dec 10, 2016 at 6:36
• Either you added $1000000_2$ or thought you were subtracting it from $...10000000_2$ when you were supposed to subtract it from $...00000000_2$. Those are my guesses anyway. Commented Dec 10, 2016 at 18:05

This is another way of saying , what will be the remainder when $N$ is divided by $2^8=256$?
Here $$N = \frac{1023\times 1024}{2} - (2+3+11+17+31)$$ $$= 1023\times 512 - 64$$ $$= 1022\times 512 + (512-64)$$ $$= 1022\times 512 + 448$$
Now $448\pmod{256} =192 = 11000000_{2}.$