01How Computers Work

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 →
  1. Treat 10000000 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 0.
  6. Add those contributions: -128 + 0 = -128.
  7. As an unsigned pattern, the same eight bits represent 128.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111111; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 10000000.
  11. 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 →
  1. Treat 10000001 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 1.
  6. Add those contributions: -128 + 1 = -127.
  7. As an unsigned pattern, the same eight bits represent 129.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111110; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111111.
  11. 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 →
  1. Treat 10000010 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 2.
  6. Add those contributions: -128 + 2 = -126.
  7. As an unsigned pattern, the same eight bits represent 130.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111101; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111110.
  11. 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 →
  1. Treat 10000011 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 3.
  6. Add those contributions: -128 + 3 = -125.
  7. As an unsigned pattern, the same eight bits represent 131.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111100; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111101.
  11. 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 →
  1. Treat 10000100 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 4.
  6. Add those contributions: -128 + 4 = -124.
  7. As an unsigned pattern, the same eight bits represent 132.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111011; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111100.
  11. 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 →
  1. Treat 10000101 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 5.
  6. Add those contributions: -128 + 5 = -123.
  7. As an unsigned pattern, the same eight bits represent 133.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111010; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111011.
  11. 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 →
  1. Treat 10000110 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 6.
  6. Add those contributions: -128 + 6 = -122.
  7. As an unsigned pattern, the same eight bits represent 134.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111001; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111010.
  11. 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 →
  1. Treat 10000111 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 7.
  6. Add those contributions: -128 + 7 = -121.
  7. As an unsigned pattern, the same eight bits represent 135.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01111000; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111001.
  11. 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 →
  1. Treat 10001000 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 8.
  6. Add those contributions: -128 + 8 = -120.
  7. As an unsigned pattern, the same eight bits represent 136.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110111; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01111000.
  11. 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 →
  1. Treat 10001001 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 9.
  6. Add those contributions: -128 + 9 = -119.
  7. As an unsigned pattern, the same eight bits represent 137.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110110; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110111.
  11. 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 →
  1. Treat 10001010 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 10.
  6. Add those contributions: -128 + 10 = -118.
  7. As an unsigned pattern, the same eight bits represent 138.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110101; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110110.
  11. 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 →
  1. Treat 10001011 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 11.
  6. Add those contributions: -128 + 11 = -117.
  7. As an unsigned pattern, the same eight bits represent 139.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110100; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110101.
  11. 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 →
  1. Treat 10001100 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 12.
  6. Add those contributions: -128 + 12 = -116.
  7. As an unsigned pattern, the same eight bits represent 140.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110011; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110100.
  11. 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 →
  1. Treat 10001101 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 13.
  6. Add those contributions: -128 + 13 = -115.
  7. As an unsigned pattern, the same eight bits represent 141.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110010; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110011.
  11. 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 →
  1. Treat 10001110 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 14.
  6. Add those contributions: -128 + 14 = -114.
  7. As an unsigned pattern, the same eight bits represent 142.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110001; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110010.
  11. 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 →
  1. Treat 10001111 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 15.
  6. Add those contributions: -128 + 15 = -113.
  7. As an unsigned pattern, the same eight bits represent 143.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01110000; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110001.
  11. 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 →
  1. Treat 10010000 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 16.
  6. Add those contributions: -128 + 16 = -112.
  7. As an unsigned pattern, the same eight bits represent 144.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101111; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01110000.
  11. 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 →
  1. Treat 10010001 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 17.
  6. Add those contributions: -128 + 17 = -111.
  7. As an unsigned pattern, the same eight bits represent 145.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101110; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101111.
  11. 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 →
  1. Treat 10010010 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 18.
  6. Add those contributions: -128 + 18 = -110.
  7. As an unsigned pattern, the same eight bits represent 146.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101101; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101110.
  11. 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 →
  1. Treat 10010011 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 19.
  6. Add those contributions: -128 + 19 = -109.
  7. As an unsigned pattern, the same eight bits represent 147.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101100; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101101.
  11. 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 →
  1. Treat 10010100 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 20.
  6. Add those contributions: -128 + 20 = -108.
  7. As an unsigned pattern, the same eight bits represent 148.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101011; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101100.
  11. 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 →
  1. Treat 10010101 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 21.
  6. Add those contributions: -128 + 21 = -107.
  7. As an unsigned pattern, the same eight bits represent 149.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101010; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101011.
  11. 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 →
  1. Treat 10010110 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 22.
  6. Add those contributions: -128 + 22 = -106.
  7. As an unsigned pattern, the same eight bits represent 150.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101001; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101010.
  11. 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 →
  1. Treat 10010111 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 23.
  6. Add those contributions: -128 + 23 = -105.
  7. As an unsigned pattern, the same eight bits represent 151.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01101000; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101001.
  11. 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 →
  1. Treat 10011000 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 24.
  6. Add those contributions: -128 + 24 = -104.
  7. As an unsigned pattern, the same eight bits represent 152.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100111; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01101000.
  11. 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 →
  1. Treat 10011001 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 25.
  6. Add those contributions: -128 + 25 = -103.
  7. As an unsigned pattern, the same eight bits represent 153.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100110; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100111.
  11. 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 →
  1. Treat 10011010 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 26.
  6. Add those contributions: -128 + 26 = -102.
  7. As an unsigned pattern, the same eight bits represent 154.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100101; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100110.
  11. 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 →
  1. Treat 10011011 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 27.
  6. Add those contributions: -128 + 27 = -101.
  7. As an unsigned pattern, the same eight bits represent 155.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100100; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100101.
  11. 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 →
  1. Treat 10011100 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 28.
  6. Add those contributions: -128 + 28 = -100.
  7. As an unsigned pattern, the same eight bits represent 156.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100011; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100100.
  11. 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 →
  1. Treat 10011101 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 29.
  6. Add those contributions: -128 + 29 = -99.
  7. As an unsigned pattern, the same eight bits represent 157.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100010; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100011.
  11. 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 →
  1. Treat 10011110 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 30.
  6. Add those contributions: -128 + 30 = -98.
  7. As an unsigned pattern, the same eight bits represent 158.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100001; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100010.
  11. 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 →
  1. Treat 10011111 as exactly eight bits.
  2. For signed 8-bit values the leftmost column has weight −128, not +128.
  3. The remaining seven columns have weights 64, 32, 16, 8, 4, 2 and 1.
  4. The leading sign bit is 1, so its signed contribution is -128.
  5. The lower seven bits contribute 31.
  6. Add those contributions: -128 + 31 = -97.
  7. As an unsigned pattern, the same eight bits represent 159.
  8. The signed range for eight bits is −128 through +127.
  9. Bitwise inversion alone yields 01100000; inversion plus one wraps modulo 256.
  10. The eight-bit negated pattern is 01100001.
  11. Answer: signed(10011111) = -97.

Final answer: -97