UMBC CMSC 211

UMBC | CSEE |


Bit Operations Practice Answers

All values are hexidecimal. For the shifts and rotates, the count is given in paraenthses.
F301
AND 00FF
0001

F301
SHL(4)         
3010

7316
ROR(4) 7316
ROR(4)         
6731

F080
SAR(4)         
FF08

63E7
OR 8418
E7FF

63E7
XOR 3333
50D4

937F
NOT         
6C80

F008
SAL(1)         
E010

Assembly Language Practice

What is the value of the AX register after the instruction:
mov ax, 0B7E2h ax= B7E2
mov cl, 2
shr ax, cl ax= 2DF8
and ax, 00FFh ax= 00F8
rol ax, 1 ax= 01F0
xor ax, 7 ax= 01F7
or ax, 3 ax= 01F7
not ax ax= FE08
mov ah, 4 ax= 0408
and al, 0Fh ax= 0408


UMBC | CSEE