# Is it possible to compute -12 (decimal) in 4 bits binary

This is what I have so far

1 1 0 0

Switch values by 2s Complement

0 0 1 1 + 1

0 1 0 0

No, it's not possible, at least using the standard representations. An unsigned $n$-bit number can represent any integer in the interval $[0, 2^{n} - 1]$. A signed $n$-bit number using two's complement can represent integers in the interval $[-2^{n - 1}, 2^{n - 1} - 1]$. With $n = 4$, that gives an interval of $[-8, 7]$, which obviously doesn't include $12$. One's complement can use $n$ bits to represent the interval $[-(2^{n - 1} - 1), 2^{n - 1} - 1]$, giving the interval $[-7, 7]$ for four bits, which also doesn't work. You'd have to contrive a nonstandard representation to represent $-12$ in four bits.
• 5 bits would work, yes; 4 is insufficient using the standard forms. An example of a nonstandard representation that would work is a representation that assumes a negative sign in front, which would allow 4 bits to represent $[-15, 0]$, which includes $-12$; however, I don't know that anyone has ever used something like that. – DylanSp Feb 18 '16 at 20:59