I'm studying encryption in class and we're doing "One-Time-Pad" encryption and I've come across this situation. I want to code $1100$, where my key is $0110$). In my book it says that the cipher is $1010$ - done through binary addition.
$$1100+0110=1010$$
but how does that make sense. In a $4$-bit system the numbers can only go to $2^4-1=15$ digits. So $1100+0110=10010$ ($12+6=18$). Am I missing something?
The usual encryption for a one-time pad is not addition, but the XOR (exclusive or) operation where you
line up the digits
If they're both one or both zero, they make a zero.
If one is zero and the other is one, they make a one
You can see that this is consistent with what your book has for the answer.