Fully solved problem book
Bitwise logic
Set 9 of 9 · 14 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.
Boolean logic · Problem 0257
Calculate 11110001 XOR 00110110.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11110001.
- B is the eight-bit string 00110110.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 0) = 1.
- Position 6 (weight 64): XOR(1, 0) = 1.
- Position 5 (weight 32): XOR(1, 1) = 0.
- Position 4 (weight 16): XOR(1, 1) = 0.
- Position 3 (weight 8): XOR(0, 0) = 0.
- Position 2 (weight 4): XOR(0, 1) = 1.
- Position 1 (weight 2): XOR(0, 1) = 1.
- Position 0 (weight 1): XOR(1, 0) = 1.
- Concatenate the output bits from position seven to zero: 11000111.
- The output is 199 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 11000111
Boolean logic · Problem 0258
Calculate 11110010 OR 01100101.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11110010.
- B is the eight-bit string 01100101.
- The operation is OR, applied separately to each matching bit position.
- Position 7 (weight 128): OR(1, 0) = 1.
- Position 6 (weight 64): OR(1, 1) = 1.
- Position 5 (weight 32): OR(1, 1) = 1.
- Position 4 (weight 16): OR(1, 0) = 1.
- Position 3 (weight 8): OR(0, 0) = 0.
- Position 2 (weight 4): OR(0, 1) = 1.
- Position 1 (weight 2): OR(1, 0) = 1.
- Position 0 (weight 1): OR(0, 1) = 1.
- Concatenate the output bits from position seven to zero: 11110111.
- The output is 247 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise OR operation.
Final answer: 11110111
Boolean logic · Problem 0259
Calculate 11110010 OR 11010110.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11110010.
- B is the eight-bit string 11010110.
- The operation is OR, applied separately to each matching bit position.
- Position 7 (weight 128): OR(1, 1) = 1.
- Position 6 (weight 64): OR(1, 1) = 1.
- Position 5 (weight 32): OR(1, 0) = 1.
- Position 4 (weight 16): OR(1, 1) = 1.
- Position 3 (weight 8): OR(0, 0) = 0.
- Position 2 (weight 4): OR(0, 1) = 1.
- Position 1 (weight 2): OR(1, 1) = 1.
- Position 0 (weight 1): OR(0, 0) = 0.
- Concatenate the output bits from position seven to zero: 11110110.
- The output is 246 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise OR operation.
Final answer: 11110110
Boolean logic · Problem 0260
Calculate 11110111 XOR 10001101.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11110111.
- B is the eight-bit string 10001101.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 1) = 0.
- Position 6 (weight 64): XOR(1, 0) = 1.
- Position 5 (weight 32): XOR(1, 0) = 1.
- Position 4 (weight 16): XOR(1, 0) = 1.
- Position 3 (weight 8): XOR(0, 1) = 1.
- Position 2 (weight 4): XOR(1, 1) = 0.
- Position 1 (weight 2): XOR(1, 0) = 1.
- Position 0 (weight 1): XOR(1, 1) = 0.
- Concatenate the output bits from position seven to zero: 01111010.
- The output is 122 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 01111010
Boolean logic · Problem 0261
Calculate 11110111 XOR 10110000.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11110111.
- B is the eight-bit string 10110000.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 1) = 0.
- Position 6 (weight 64): XOR(1, 0) = 1.
- Position 5 (weight 32): XOR(1, 1) = 0.
- Position 4 (weight 16): XOR(1, 1) = 0.
- Position 3 (weight 8): XOR(0, 0) = 0.
- Position 2 (weight 4): XOR(1, 0) = 1.
- Position 1 (weight 2): XOR(1, 0) = 1.
- Position 0 (weight 1): XOR(1, 0) = 1.
- Concatenate the output bits from position seven to zero: 01000111.
- The output is 71 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 01000111
Boolean logic · Problem 0262
Calculate 11111000 AND 01110001.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111000.
- B is the eight-bit string 01110001.
- The operation is AND, applied separately to each matching bit position.
- Position 7 (weight 128): AND(1, 0) = 0.
- Position 6 (weight 64): AND(1, 1) = 1.
- Position 5 (weight 32): AND(1, 1) = 1.
- Position 4 (weight 16): AND(1, 1) = 1.
- Position 3 (weight 8): AND(1, 0) = 0.
- Position 2 (weight 4): AND(0, 0) = 0.
- Position 1 (weight 2): AND(0, 0) = 0.
- Position 0 (weight 1): AND(0, 1) = 0.
- Concatenate the output bits from position seven to zero: 01110000.
- The output is 112 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise AND operation.
Final answer: 01110000
Boolean logic · Problem 0263
Calculate 11111000 XOR 11011110.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111000.
- B is the eight-bit string 11011110.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 1) = 0.
- Position 6 (weight 64): XOR(1, 1) = 0.
- Position 5 (weight 32): XOR(1, 0) = 1.
- Position 4 (weight 16): XOR(1, 1) = 0.
- Position 3 (weight 8): XOR(1, 1) = 0.
- Position 2 (weight 4): XOR(0, 1) = 1.
- Position 1 (weight 2): XOR(0, 1) = 1.
- Position 0 (weight 1): XOR(0, 0) = 0.
- Concatenate the output bits from position seven to zero: 00100110.
- The output is 38 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 00100110
Boolean logic · Problem 0264
Calculate 11111001 AND 11110010.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111001.
- B is the eight-bit string 11110010.
- The operation is AND, applied separately to each matching bit position.
- Position 7 (weight 128): AND(1, 1) = 1.
- Position 6 (weight 64): AND(1, 1) = 1.
- Position 5 (weight 32): AND(1, 1) = 1.
- Position 4 (weight 16): AND(1, 1) = 1.
- Position 3 (weight 8): AND(1, 0) = 0.
- Position 2 (weight 4): AND(0, 0) = 0.
- Position 1 (weight 2): AND(0, 1) = 0.
- Position 0 (weight 1): AND(1, 0) = 0.
- Concatenate the output bits from position seven to zero: 11110000.
- The output is 240 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise AND operation.
Final answer: 11110000
Boolean logic · Problem 0265
Calculate 11111010 AND 01111111.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111010.
- B is the eight-bit string 01111111.
- The operation is AND, applied separately to each matching bit position.
- Position 7 (weight 128): AND(1, 0) = 0.
- Position 6 (weight 64): AND(1, 1) = 1.
- Position 5 (weight 32): AND(1, 1) = 1.
- Position 4 (weight 16): AND(1, 1) = 1.
- Position 3 (weight 8): AND(1, 1) = 1.
- Position 2 (weight 4): AND(0, 1) = 0.
- Position 1 (weight 2): AND(1, 1) = 1.
- Position 0 (weight 1): AND(0, 1) = 0.
- Concatenate the output bits from position seven to zero: 01111010.
- The output is 122 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise AND operation.
Final answer: 01111010
Boolean logic · Problem 0266
Calculate 11111011 XOR 00001001.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111011.
- B is the eight-bit string 00001001.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 0) = 1.
- Position 6 (weight 64): XOR(1, 0) = 1.
- Position 5 (weight 32): XOR(1, 0) = 1.
- Position 4 (weight 16): XOR(1, 0) = 1.
- Position 3 (weight 8): XOR(1, 1) = 0.
- Position 2 (weight 4): XOR(0, 0) = 0.
- Position 1 (weight 2): XOR(1, 0) = 1.
- Position 0 (weight 1): XOR(1, 1) = 0.
- Concatenate the output bits from position seven to zero: 11110010.
- The output is 242 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 11110010
Boolean logic · Problem 0267
Calculate 11111100 XOR 01101111.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111100.
- B is the eight-bit string 01101111.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 0) = 1.
- Position 6 (weight 64): XOR(1, 1) = 0.
- Position 5 (weight 32): XOR(1, 1) = 0.
- Position 4 (weight 16): XOR(1, 0) = 1.
- Position 3 (weight 8): XOR(1, 1) = 0.
- Position 2 (weight 4): XOR(1, 1) = 0.
- Position 1 (weight 2): XOR(0, 1) = 1.
- Position 0 (weight 1): XOR(0, 1) = 1.
- Concatenate the output bits from position seven to zero: 10010011.
- The output is 147 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 10010011
Boolean logic · Problem 0268
Calculate 11111101 XOR 01010010.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111101.
- B is the eight-bit string 01010010.
- The operation is XOR, applied separately to each matching bit position.
- Position 7 (weight 128): XOR(1, 0) = 1.
- Position 6 (weight 64): XOR(1, 1) = 0.
- Position 5 (weight 32): XOR(1, 0) = 1.
- Position 4 (weight 16): XOR(1, 1) = 0.
- Position 3 (weight 8): XOR(1, 0) = 1.
- Position 2 (weight 4): XOR(1, 0) = 1.
- Position 1 (weight 2): XOR(0, 1) = 1.
- Position 0 (weight 1): XOR(1, 0) = 1.
- Concatenate the output bits from position seven to zero: 10101111.
- The output is 175 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise XOR operation.
Final answer: 10101111
Boolean logic · Problem 0269
Calculate 11111110 AND 10000100.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111110.
- B is the eight-bit string 10000100.
- The operation is AND, applied separately to each matching bit position.
- Position 7 (weight 128): AND(1, 1) = 1.
- Position 6 (weight 64): AND(1, 0) = 0.
- Position 5 (weight 32): AND(1, 0) = 0.
- Position 4 (weight 16): AND(1, 0) = 0.
- Position 3 (weight 8): AND(1, 0) = 0.
- Position 2 (weight 4): AND(1, 1) = 1.
- Position 1 (weight 2): AND(1, 0) = 0.
- Position 0 (weight 1): AND(0, 0) = 0.
- Concatenate the output bits from position seven to zero: 10000100.
- The output is 132 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise AND operation.
Final answer: 10000100
Boolean logic · Problem 0270
Calculate 11111110 AND 10011000.
Try it on paper first. The worked answer is hidden below.
Reveal detailed solution →
- A is the eight-bit string 11111110.
- B is the eight-bit string 10011000.
- The operation is AND, applied separately to each matching bit position.
- Position 7 (weight 128): AND(1, 1) = 1.
- Position 6 (weight 64): AND(1, 0) = 0.
- Position 5 (weight 32): AND(1, 0) = 0.
- Position 4 (weight 16): AND(1, 1) = 1.
- Position 3 (weight 8): AND(1, 1) = 1.
- Position 2 (weight 4): AND(1, 0) = 0.
- Position 1 (weight 2): AND(1, 0) = 0.
- Position 0 (weight 1): AND(0, 0) = 0.
- Concatenate the output bits from position seven to zero: 10011000.
- The output is 152 when interpreted as unsigned decimal.
- No arithmetic carries occur in a bitwise AND operation.
Final answer: 10011000