our number 10001111 what is this value? 1's comp 01110000 2's comp + 1 --------- 01110001 1*2^6 + 1*2^5 + 1*2^4 + 0 + 0 + 0 + 1*2^0 = 64 + 32 + 16 + 0 + 0 + 0 + 1 = 113 -113 Say that we sign extend our number 11111111 10001111 1's comp 00000000 01110000 2's comp + 1 ------------------ 00000000 01110001 = 113 -113 ------ 15 0000 1111 ------ a = 5 b = 6 ; exchahge a and b's values ; a beginner might say: a = b b = a ; does not work temp = a a = b b = temp ; this will exchange the values