Question: 1. For 8-bit 2s complement math, express each number as hexadecimal. For each set of numbers below, perform the logical operations (ALSO list the value
1. For 8-bit 2s complement math, express each number as hexadecimal. For each set of numbers below, perform the logical operations (ALSO list the value of the four flags where applicable with True/False [ CF: carry flag OF: overflow flag ZF: zero flag SF: sign flag ]).
[a.] -5 AND -38
[b.] -50 AND -80
[c.] Use AND to clear bits 2, 3, 4 from the right of 01010110, leaving other bits untouched. Show the result in hex.
[d.] -5 OR -38
[e.] -50 OR -80
[f.] Use OR to set bits 1, 3, 6, 7 of 01010110, leaving other bits untouched. Show the result in hex.
[g.] -5 XOR -38 h. 120 XOR -45
[i.] Use XOR to flip bits 2, 4, 6 of 01010110, leaving others untouched. Show the result in hex.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
