# Calculating direct sum of 2 binary numbers

If we have say,key=‘0110‘ and 𝑚=‘1100‘, how will 𝑚⊕key mod 2 be calculated and what will be the answer equal to?

The operation $$\oplus$$ is the same as bitwise XOR. The same symbol is used for direct sum, but there is otherwise absolutely no relation.

• Can this be also used when m has larger number of bits than key like m="101010" while key="101"? If so, how? – Deepika Bhargava May 5 '20 at 7:58
• Yes. You pad the smaller one with zeroes. – Yuval Filmus May 5 '20 at 7:58
• I warmly recommend experimenting with the XOR operation in any programming language that supports it. This will answer all your questions. – Yuval Filmus May 5 '20 at 8:00