512
you need to find a subset of positive numbers from 1 to 1023 such that
let's denote the set as S
if A, B in S then A^B is not in the S.
pick any element A from S, S and S^A are two distinct set between 0 and 1023
So the size of S
Note that the integers between 1 and 1023 with odd number of bits set satisfy the above conditions. The number of such integers is 512.