01102 = 6
11102 = -2
---------------
01002 = 4
Chat with our AI personalities
87
1
Using 4 bits the signed range of numbers is -8 to 7. When working with signed numbers one bit is the sign bit, thus with 4 bits this leaves 3 bits for the value. With 3 bits there are 8 possible values, which when using 2s complement have ranges: for non-negative numbers these are 0 to 7; for negative numbers these are -1 to -8. Thus the range for signed 4 bit numbers is -8 to 7.
To find the 2s complement, invert all the bits (to get the 1s complement) and add 1: 10001100 00111001 → 01110011 11000110 + 1 = 01110011 11000111 If you have an operator missing between the two numbers then if it is subtract: 10001100 - 00111001 = 10001100 + 11000111 = carry set & 01010011 & overflow set. If not subtract but some other operator, please re-ask your question with the operator written out as a word.
2s + 16 = 4s - 6 Subtract 2s from both sides: 16 = 2s - 6 Add 6 to both sides: 22 = 2s divide both sides by 2: s = 11