In the following instruction sequence, show the changed values of AL where indic
ID: 3827208 • Letter: I
Question
In the following instruction sequence, show the changed values of AL where indicated, in binary: mov al, 11001011b and al,00111011b;a mov al, 4Dh and al, 69h; b mov al,00101100b or al, 84h; c. mov al, 91h xor al, 57h; d Show the changed values of AL where indicated, in hexadecimal: mov a1, oACh not al; a mov al, 5Bh and al, 44h; b mov al, 96h or al, 52h; c. mov al, 62h xor al, 0B5h;d. Show the values of the Carry, Zero, and Sign flags where indicated: mov al,00110011b test al, 4; a. CF = ZF = SF = mov al, 4 cmp al, 5 b. CF = ZF = SF = mov al, 6 cmp al, 7; c. CF = ZF = SF =Explanation / Answer
1.a
mov al, 11001011b
AL = 11001011b
and al, 00111011b
AL = (11001011b) AND (00111011b)
= 00001011b
b.
mov al, 4Dh
AL = 4DH = 01001101B
and al,69H
AL = (01001101B) AND (01101001B)
= (01001001B)
C.
mov al, 00101100b
AL = 00101100b
or al, 84H
AL = (84H) OR (00101100b)
= (10000100B) OR (00101100b)
= (10101100B)
d.
mov al, 91H
AL = 91H = 10010001B
xor al, 57H
AL = (10010001B) XOR (57H)
= (10010001B) XOR (01010111B)
= 11000110B
2.a
mov al, 0ACh
AL = 0ACH = 10101100b
not al
AL = NOT(10101100b)
= 01010011B = 53H
b.
mov al, 5Bh
AL = 5BH = 01011011B
and al, 44h
AL = (01011011b) AND (44H)
= (01011011B) AND (01000100b)
= (01000000b) = 40H
C.
mov al, 96h
AL = 96H = 10010110b
or al, 52h
AL = (96H) OR (52H)
= (10010110b) OR (01010010b)
= (11010110b) = 0D6H
d.
mov al, 62h
AL = 62H = (0110 0010b)
xor al, 0B5h
AL = 62H XOR 0B5H
= (0110 0010b) XOR ( 1011 0101b)
= (1101 0111b) = 0D7H
3.a
mov al, 00110011b
AL = 00110011b
test al, 4
ANDing AL data with 4, result will not store anywhere, but flags will change.
CF = 0, ZF = 1, SF = 0, PF = 1
b.
mov al, 4
AL = 0000 0100B
cmp al, 5
Compare AL data with 5,
result is not stored anywhere, flags will change according to result.
CF = 0, ZF = 0, SF = 1, PF = 0
c.
mov al, 6
AL = 0000 0110b
cmp al, 7
Compare AL data with 7,
result is not stored anywhere, flags will change according to result.
CF = 0, ZF = 0, SF = 1, PF = 0
1.a
mov al, 11001011b
AL = 11001011b
and al, 00111011b
AL = (11001011b) AND (00111011b)
= 00001011b
b.
mov al, 4Dh
AL = 4DH = 01001101B
and al,69H
AL = (01001101B) AND (01101001B)
= (01001001B)
C.
mov al, 00101100b
AL = 00101100b
or al, 84H
AL = (84H) OR (00101100b)
= (10000100B) OR (00101100b)
= (10101100B)
d.
mov al, 91H
AL = 91H = 10010001B
xor al, 57H
AL = (10010001B) XOR (57H)
= (10010001B) XOR (01010111B)
= 11000110B
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.