Fully solved problem book
Signed eight-bit values
Set 4 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 0097
Interpret 01100000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100000 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 0, so its signed contribution is 0.
- The lower seven bits contribute 96.
- Add those contributions: 0 + 96 = 96.
- As an unsigned pattern, the same eight bits represent 96.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10100000.
- Answer: signed(01100000) = 96.
Final answer: 96
Foundations · Problem 0098
Interpret 01100001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100001 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 0, so its signed contribution is 0.
- The lower seven bits contribute 97.
- Add those contributions: 0 + 97 = 97.
- As an unsigned pattern, the same eight bits represent 97.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011111.
- Answer: signed(01100001) = 97.
Final answer: 97
Foundations · Problem 0099
Interpret 01100010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100010 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 0, so its signed contribution is 0.
- The lower seven bits contribute 98.
- Add those contributions: 0 + 98 = 98.
- As an unsigned pattern, the same eight bits represent 98.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011110.
- Answer: signed(01100010) = 98.
Final answer: 98
Foundations · Problem 0100
Interpret 01100011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100011 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 0, so its signed contribution is 0.
- The lower seven bits contribute 99.
- Add those contributions: 0 + 99 = 99.
- As an unsigned pattern, the same eight bits represent 99.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011101.
- Answer: signed(01100011) = 99.
Final answer: 99
Foundations · Problem 0101
Interpret 01100100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100100 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 0, so its signed contribution is 0.
- The lower seven bits contribute 100.
- Add those contributions: 0 + 100 = 100.
- As an unsigned pattern, the same eight bits represent 100.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011100.
- Answer: signed(01100100) = 100.
Final answer: 100
Foundations · Problem 0102
Interpret 01100101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100101 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 0, so its signed contribution is 0.
- The lower seven bits contribute 101.
- Add those contributions: 0 + 101 = 101.
- As an unsigned pattern, the same eight bits represent 101.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011011.
- Answer: signed(01100101) = 101.
Final answer: 101
Foundations · Problem 0103
Interpret 01100110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100110 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 0, so its signed contribution is 0.
- The lower seven bits contribute 102.
- Add those contributions: 0 + 102 = 102.
- As an unsigned pattern, the same eight bits represent 102.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011010.
- Answer: signed(01100110) = 102.
Final answer: 102
Foundations · Problem 0104
Interpret 01100111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01100111 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 0, so its signed contribution is 0.
- The lower seven bits contribute 103.
- Add those contributions: 0 + 103 = 103.
- As an unsigned pattern, the same eight bits represent 103.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10011000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011001.
- Answer: signed(01100111) = 103.
Final answer: 103
Foundations · Problem 0105
Interpret 01101000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101000 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 0, so its signed contribution is 0.
- The lower seven bits contribute 104.
- Add those contributions: 0 + 104 = 104.
- As an unsigned pattern, the same eight bits represent 104.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10011000.
- Answer: signed(01101000) = 104.
Final answer: 104
Foundations · Problem 0106
Interpret 01101001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101001 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 0, so its signed contribution is 0.
- The lower seven bits contribute 105.
- Add those contributions: 0 + 105 = 105.
- As an unsigned pattern, the same eight bits represent 105.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010111.
- Answer: signed(01101001) = 105.
Final answer: 105
Foundations · Problem 0107
Interpret 01101010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101010 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 0, so its signed contribution is 0.
- The lower seven bits contribute 106.
- Add those contributions: 0 + 106 = 106.
- As an unsigned pattern, the same eight bits represent 106.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010110.
- Answer: signed(01101010) = 106.
Final answer: 106
Foundations · Problem 0108
Interpret 01101011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101011 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 0, so its signed contribution is 0.
- The lower seven bits contribute 107.
- Add those contributions: 0 + 107 = 107.
- As an unsigned pattern, the same eight bits represent 107.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010101.
- Answer: signed(01101011) = 107.
Final answer: 107
Foundations · Problem 0109
Interpret 01101100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101100 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 0, so its signed contribution is 0.
- The lower seven bits contribute 108.
- Add those contributions: 0 + 108 = 108.
- As an unsigned pattern, the same eight bits represent 108.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010100.
- Answer: signed(01101100) = 108.
Final answer: 108
Foundations · Problem 0110
Interpret 01101101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101101 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 0, so its signed contribution is 0.
- The lower seven bits contribute 109.
- Add those contributions: 0 + 109 = 109.
- As an unsigned pattern, the same eight bits represent 109.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010011.
- Answer: signed(01101101) = 109.
Final answer: 109
Foundations · Problem 0111
Interpret 01101110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101110 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 0, so its signed contribution is 0.
- The lower seven bits contribute 110.
- Add those contributions: 0 + 110 = 110.
- As an unsigned pattern, the same eight bits represent 110.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010010.
- Answer: signed(01101110) = 110.
Final answer: 110
Foundations · Problem 0112
Interpret 01101111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01101111 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 0, so its signed contribution is 0.
- The lower seven bits contribute 111.
- Add those contributions: 0 + 111 = 111.
- As an unsigned pattern, the same eight bits represent 111.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10010000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010001.
- Answer: signed(01101111) = 111.
Final answer: 111
Foundations · Problem 0113
Interpret 01110000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110000 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 0, so its signed contribution is 0.
- The lower seven bits contribute 112.
- Add those contributions: 0 + 112 = 112.
- As an unsigned pattern, the same eight bits represent 112.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10010000.
- Answer: signed(01110000) = 112.
Final answer: 112
Foundations · Problem 0114
Interpret 01110001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110001 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 0, so its signed contribution is 0.
- The lower seven bits contribute 113.
- Add those contributions: 0 + 113 = 113.
- As an unsigned pattern, the same eight bits represent 113.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001111.
- Answer: signed(01110001) = 113.
Final answer: 113
Foundations · Problem 0115
Interpret 01110010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110010 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 0, so its signed contribution is 0.
- The lower seven bits contribute 114.
- Add those contributions: 0 + 114 = 114.
- As an unsigned pattern, the same eight bits represent 114.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001110.
- Answer: signed(01110010) = 114.
Final answer: 114
Foundations · Problem 0116
Interpret 01110011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110011 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 0, so its signed contribution is 0.
- The lower seven bits contribute 115.
- Add those contributions: 0 + 115 = 115.
- As an unsigned pattern, the same eight bits represent 115.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001101.
- Answer: signed(01110011) = 115.
Final answer: 115
Foundations · Problem 0117
Interpret 01110100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110100 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 0, so its signed contribution is 0.
- The lower seven bits contribute 116.
- Add those contributions: 0 + 116 = 116.
- As an unsigned pattern, the same eight bits represent 116.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001100.
- Answer: signed(01110100) = 116.
Final answer: 116
Foundations · Problem 0118
Interpret 01110101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110101 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 0, so its signed contribution is 0.
- The lower seven bits contribute 117.
- Add those contributions: 0 + 117 = 117.
- As an unsigned pattern, the same eight bits represent 117.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001011.
- Answer: signed(01110101) = 117.
Final answer: 117
Foundations · Problem 0119
Interpret 01110110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110110 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 0, so its signed contribution is 0.
- The lower seven bits contribute 118.
- Add those contributions: 0 + 118 = 118.
- As an unsigned pattern, the same eight bits represent 118.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001010.
- Answer: signed(01110110) = 118.
Final answer: 118
Foundations · Problem 0120
Interpret 01110111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01110111 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 0, so its signed contribution is 0.
- The lower seven bits contribute 119.
- Add those contributions: 0 + 119 = 119.
- As an unsigned pattern, the same eight bits represent 119.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10001000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001001.
- Answer: signed(01110111) = 119.
Final answer: 119
Foundations · Problem 0121
Interpret 01111000 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111000 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 0, so its signed contribution is 0.
- The lower seven bits contribute 120.
- Add those contributions: 0 + 120 = 120.
- As an unsigned pattern, the same eight bits represent 120.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000111; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10001000.
- Answer: signed(01111000) = 120.
Final answer: 120
Foundations · Problem 0122
Interpret 01111001 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111001 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 0, so its signed contribution is 0.
- The lower seven bits contribute 121.
- Add those contributions: 0 + 121 = 121.
- As an unsigned pattern, the same eight bits represent 121.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000110; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000111.
- Answer: signed(01111001) = 121.
Final answer: 121
Foundations · Problem 0123
Interpret 01111010 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111010 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 0, so its signed contribution is 0.
- The lower seven bits contribute 122.
- Add those contributions: 0 + 122 = 122.
- As an unsigned pattern, the same eight bits represent 122.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000101; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000110.
- Answer: signed(01111010) = 122.
Final answer: 122
Foundations · Problem 0124
Interpret 01111011 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111011 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 0, so its signed contribution is 0.
- The lower seven bits contribute 123.
- Add those contributions: 0 + 123 = 123.
- As an unsigned pattern, the same eight bits represent 123.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000100; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000101.
- Answer: signed(01111011) = 123.
Final answer: 123
Foundations · Problem 0125
Interpret 01111100 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111100 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 0, so its signed contribution is 0.
- The lower seven bits contribute 124.
- Add those contributions: 0 + 124 = 124.
- As an unsigned pattern, the same eight bits represent 124.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000011; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000100.
- Answer: signed(01111100) = 124.
Final answer: 124
Foundations · Problem 0126
Interpret 01111101 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111101 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 0, so its signed contribution is 0.
- The lower seven bits contribute 125.
- Add those contributions: 0 + 125 = 125.
- As an unsigned pattern, the same eight bits represent 125.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000010; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000011.
- Answer: signed(01111101) = 125.
Final answer: 125
Foundations · Problem 0127
Interpret 01111110 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111110 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 0, so its signed contribution is 0.
- The lower seven bits contribute 126.
- Add those contributions: 0 + 126 = 126.
- As an unsigned pattern, the same eight bits represent 126.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000001; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000010.
- Answer: signed(01111110) = 126.
Final answer: 126
Foundations · Problem 0128
Interpret 01111111 as an 8-bit two’s complement value.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- Treat 01111111 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 0, so its signed contribution is 0.
- The lower seven bits contribute 127.
- Add those contributions: 0 + 127 = 127.
- As an unsigned pattern, the same eight bits represent 127.
- The signed range for eight bits is −128 through +127.
- Bitwise inversion alone yields 10000000; inversion plus one wraps modulo 256.
- The eight-bit negated pattern is 10000001.
- Answer: signed(01111111) = 127.
Final answer: 127