Fully solved problem book
Signed eight-bit values
Set 5 of 8 · 32 worked questions. Predict your result before expanding the solution.
These worked traces are meant to build fluency through controlled variation. If several answers feel identical, try the next difficult value and look for the point where a carry, sign, branch, or selected memory address changes the outcome.
Foundations · Problem 0129
Interpret 10000000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000000 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 0.
- Add those contributions: -128 + 0 = -128.
- As an unsigned pattern, the same eight bits represent 128.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000000.
- Answer: signed(10000000) = -128.
Final answer: -128
Foundations · Problem 0130
Interpret 10000001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000001 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 1.
- Add those contributions: -128 + 1 = -127.
- As an unsigned pattern, the same eight bits represent 129.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111111.
- Answer: signed(10000001) = -127.
Final answer: -127
Foundations · Problem 0131
Interpret 10000010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000010 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 2.
- Add those contributions: -128 + 2 = -126.
- As an unsigned pattern, the same eight bits represent 130.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111110.
- Answer: signed(10000010) = -126.
Final answer: -126
Foundations · Problem 0132
Interpret 10000011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000011 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 3.
- Add those contributions: -128 + 3 = -125.
- As an unsigned pattern, the same eight bits represent 131.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111101.
- Answer: signed(10000011) = -125.
Final answer: -125
Foundations · Problem 0133
Interpret 10000100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000100 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 4.
- Add those contributions: -128 + 4 = -124.
- As an unsigned pattern, the same eight bits represent 132.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111100.
- Answer: signed(10000100) = -124.
Final answer: -124
Foundations · Problem 0134
Interpret 10000101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000101 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 5.
- Add those contributions: -128 + 5 = -123.
- As an unsigned pattern, the same eight bits represent 133.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111011.
- Answer: signed(10000101) = -123.
Final answer: -123
Foundations · Problem 0135
Interpret 10000110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000110 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 6.
- Add those contributions: -128 + 6 = -122.
- As an unsigned pattern, the same eight bits represent 134.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111010.
- Answer: signed(10000110) = -122.
Final answer: -122
Foundations · Problem 0136
Interpret 10000111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10000111 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 7.
- Add those contributions: -128 + 7 = -121.
- As an unsigned pattern, the same eight bits represent 135.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01111000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111001.
- Answer: signed(10000111) = -121.
Final answer: -121
Foundations · Problem 0137
Interpret 10001000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001000 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 8.
- Add those contributions: -128 + 8 = -120.
- As an unsigned pattern, the same eight bits represent 136.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01111000.
- Answer: signed(10001000) = -120.
Final answer: -120
Foundations · Problem 0138
Interpret 10001001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001001 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 9.
- Add those contributions: -128 + 9 = -119.
- As an unsigned pattern, the same eight bits represent 137.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110111.
- Answer: signed(10001001) = -119.
Final answer: -119
Foundations · Problem 0139
Interpret 10001010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001010 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 10.
- Add those contributions: -128 + 10 = -118.
- As an unsigned pattern, the same eight bits represent 138.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110110.
- Answer: signed(10001010) = -118.
Final answer: -118
Foundations · Problem 0140
Interpret 10001011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001011 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 11.
- Add those contributions: -128 + 11 = -117.
- As an unsigned pattern, the same eight bits represent 139.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110101.
- Answer: signed(10001011) = -117.
Final answer: -117
Foundations · Problem 0141
Interpret 10001100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001100 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 12.
- Add those contributions: -128 + 12 = -116.
- As an unsigned pattern, the same eight bits represent 140.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110100.
- Answer: signed(10001100) = -116.
Final answer: -116
Foundations · Problem 0142
Interpret 10001101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001101 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 13.
- Add those contributions: -128 + 13 = -115.
- As an unsigned pattern, the same eight bits represent 141.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110011.
- Answer: signed(10001101) = -115.
Final answer: -115
Foundations · Problem 0143
Interpret 10001110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001110 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 14.
- Add those contributions: -128 + 14 = -114.
- As an unsigned pattern, the same eight bits represent 142.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110010.
- Answer: signed(10001110) = -114.
Final answer: -114
Foundations · Problem 0144
Interpret 10001111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10001111 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 15.
- Add those contributions: -128 + 15 = -113.
- As an unsigned pattern, the same eight bits represent 143.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01110000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110001.
- Answer: signed(10001111) = -113.
Final answer: -113
Foundations · Problem 0145
Interpret 10010000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010000 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 16.
- Add those contributions: -128 + 16 = -112.
- As an unsigned pattern, the same eight bits represent 144.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01110000.
- Answer: signed(10010000) = -112.
Final answer: -112
Foundations · Problem 0146
Interpret 10010001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010001 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 17.
- Add those contributions: -128 + 17 = -111.
- As an unsigned pattern, the same eight bits represent 145.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101111.
- Answer: signed(10010001) = -111.
Final answer: -111
Foundations · Problem 0147
Interpret 10010010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010010 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 18.
- Add those contributions: -128 + 18 = -110.
- As an unsigned pattern, the same eight bits represent 146.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101110.
- Answer: signed(10010010) = -110.
Final answer: -110
Foundations · Problem 0148
Interpret 10010011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010011 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 19.
- Add those contributions: -128 + 19 = -109.
- As an unsigned pattern, the same eight bits represent 147.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101101.
- Answer: signed(10010011) = -109.
Final answer: -109
Foundations · Problem 0149
Interpret 10010100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010100 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 20.
- Add those contributions: -128 + 20 = -108.
- As an unsigned pattern, the same eight bits represent 148.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101100.
- Answer: signed(10010100) = -108.
Final answer: -108
Foundations · Problem 0150
Interpret 10010101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010101 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 21.
- Add those contributions: -128 + 21 = -107.
- As an unsigned pattern, the same eight bits represent 149.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101011.
- Answer: signed(10010101) = -107.
Final answer: -107
Foundations · Problem 0151
Interpret 10010110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010110 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 22.
- Add those contributions: -128 + 22 = -106.
- As an unsigned pattern, the same eight bits represent 150.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101010.
- Answer: signed(10010110) = -106.
Final answer: -106
Foundations · Problem 0152
Interpret 10010111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10010111 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 23.
- Add those contributions: -128 + 23 = -105.
- As an unsigned pattern, the same eight bits represent 151.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01101000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101001.
- Answer: signed(10010111) = -105.
Final answer: -105
Foundations · Problem 0153
Interpret 10011000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011000 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 24.
- Add those contributions: -128 + 24 = -104.
- As an unsigned pattern, the same eight bits represent 152.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01101000.
- Answer: signed(10011000) = -104.
Final answer: -104
Foundations · Problem 0154
Interpret 10011001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011001 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 25.
- Add those contributions: -128 + 25 = -103.
- As an unsigned pattern, the same eight bits represent 153.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100111.
- Answer: signed(10011001) = -103.
Final answer: -103
Foundations · Problem 0155
Interpret 10011010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011010 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 26.
- Add those contributions: -128 + 26 = -102.
- As an unsigned pattern, the same eight bits represent 154.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100110.
- Answer: signed(10011010) = -102.
Final answer: -102
Foundations · Problem 0156
Interpret 10011011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011011 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 27.
- Add those contributions: -128 + 27 = -101.
- As an unsigned pattern, the same eight bits represent 155.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100101.
- Answer: signed(10011011) = -101.
Final answer: -101
Foundations · Problem 0157
Interpret 10011100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011100 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 28.
- Add those contributions: -128 + 28 = -100.
- As an unsigned pattern, the same eight bits represent 156.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100100.
- Answer: signed(10011100) = -100.
Final answer: -100
Foundations · Problem 0158
Interpret 10011101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011101 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 29.
- Add those contributions: -128 + 29 = -99.
- As an unsigned pattern, the same eight bits represent 157.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100011.
- Answer: signed(10011101) = -99.
Final answer: -99
Foundations · Problem 0159
Interpret 10011110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011110 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 30.
- Add those contributions: -128 + 30 = -98.
- As an unsigned pattern, the same eight bits represent 158.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100010.
- Answer: signed(10011110) = -98.
Final answer: -98
Foundations · Problem 0160
Interpret 10011111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 10011111 as exactly eight bits.
- For signed 8-bit values the leftmost column has weight −128, not +128.
- The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
- The leading sign bit is 1, so its signed contribution is -128.
- The lower seven bits contribute 31.
- Add those contributions: -128 + 31 = -97.
- As an unsigned pattern, the same eight bits represent 159.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 01100000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 01100001.
- Answer: signed(10011111) = -97.
Final answer: -97