An int is many more digits than 4, it's actually got a bunch of 0's before what you put.
Negative numbers on computers are usually represented as starting with ones. a -1 is generally all ones, -2 is ..11111111111111110, -3 is ..1111111111111101, etc.\
So what you got was a negative number because you changed all those zeros to ones.
If you want to see your number, use ~a & 0xf
0xf will give you a "mask" of ...000001111
Anything anded with that will only retain the last 4 bits, all the rest will be zeroed out.
GREAT question, glad to see people still experiment with / think of this stuff.