Frustrating. [edit: In a good way

]
I figured out the second sequence, but I can't figure out a way to make an expression of it. For the integer 10:
A(2
0)+B(2
1)+C(2
2)+D(2
3)
I realize what A, B, C, and D represent as it relates to binary numbers (that A and C should be zero while B and D are one), but I cannot figure out how to make an expression realize it.
I would think A somehow represents that 10/2 has a remainder of zero, B that 5/2 has r=1, C that 2/2 has r=0, and D that 1/2 has r=1.
That's a guess, and I'm stuck.
~modest