As you supposed int is 8 bit i will be explaining whole thing considering int as 8 bit :
12 = 0000 1100 -12 is 1111 0100
when it comes to printing it first see MSB to find out +ve -ve if MSB = 1 the its -ve
Now comes magnitude after MSB whatever there is part of magtidude and is calculated again in terms of 2's compliment
111 0100 is magnitude part calculate its 2's compliment it will give 000 1100 so it will print -ve(sign) 12(magnitude)
here is your 2nd ques ~12 = ~(0000 1100) = 1111 0011
MSB = 1 sign = -ve
Magnitude = 2's compliment of 111 0011 = 000 1101 = 13
final answer -13
Hope it helps :D