Question: 1. For 8-bit 2s complement math, express each number as hexadecimal. For each set of numbers below, perform the logical operations: a. -5 AND -38

1. For 8-bit 2s complement math, express each number as hexadecimal. For each set of numbers below, perform the logical operations:

a. -5 AND -38

b. 120 AND 53

c. -45 AND -90

d. Use AND to clear bits 2, 3, 4 of 0x96, leaving other bits untouched. Show the result in hex.

e. -5 OR -38

f. 120 OR 53

g. -45 OR -90

h. Use OR to set bits 0, 3, 6, 7 of 0x96, leaving other bits untouched. Show the result in hex.

i. -5 XOR -38

j. 120 XOR 53

k. -45 XOR -90

l. Use XOR to flip bits 2, 4, 6 of 0x96, leaving others untouched. Show the result in hex.

5. Perform an arithmetic shift left, arithmetic shift right, logical shift left, and logical shift right for the following 8-bit numbers. Show the result in binary.

a. 0x73

b. 0x85

c. 0xFF

d. (16 bit number) 0x80AC

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!