...
Question 7878 – Digital-Logic-Design
May 30, 2024
Question 6786 – Computer-Organization
May 30, 2024
Question 7878 – Digital-Logic-Design
May 30, 2024
Question 6786 – Computer-Organization
May 30, 2024

Question 3745 – Computer-Organization

What will be the hexadecimal value in the register ax (32-bit) after executing the following instructions?
mov al, 15
mov ah, 15
xor al, al
mov cl, 3
shr ax, cl

Correct Answer: C

Question 462 Explanation: 
Step-1: mov al, 15 ← Move 15 to lower part of ‘ax’ register
Step-2: mov ah, 15 ← Move 15 to higher part of ‘ax’ register
Step-3: xor al,al ← Perform Xor operation.
convert 15 into binary number is 00001111
00001111 ← al
00000000 ← al
————-
00000000
————–
Step-4: move cl,3 ← Move 3 to lower part of ‘cx’ register
Step-5: shr ax, cl ← It will shift right and rotate content of ‘ax’ register
Before shifting ‘ax’ value is 0000 1111 0000 0000
After 3 shift right operations then ‘ax’ will become 0000 0001 1110 0000
The value is nothing but 01E0 h (or) (01E0)​ 16
A
0F00 h
B
0F0F h
C
01E0 h
D
FFFF h
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!