GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
54 views
Consider the following assembly language instructions :

mov al, 15

mov ah, 15

xor al, al

mov cl, 3

shr ax, cl

add al, 90H

adc ah, 0

What is the value in ax register after execution of above instructions ?

(1) 0270H         (2) 0170H         (3) 01E0H         (4) 0370H
asked in CO & Architecture by Loyal (3.2k points) 4 41
recategorized by | 54 views

1 Answer

+1 vote
Best answer

it is 8086 question AX(16 bit) =AH( 8 bit) +AL (8 bit)

MOV AL  ,15    //  00001111 in AL

mov ah, 15    //  00001111 in AH   and AX =0000 1111 0000 1111

xor al, al    // AL is 0000 0000 now  and so AX  =0000 1111 0000 0000

mov cl, 3 // CL is 0000 0011

shr ax, cl   //AX  = 000 0000 1111 0000 0   or (01E0) h

add al, 90H   // AL= 1001 0000  add this to( AX=AH+AL)  , now AX =0170 h with carry 1


adc ah, 0 // add  0 to ah with carry which is one so final ans 0270 h 

so ans is A

answered ago by Veteran (46.9k points) 61 295 639
selected ago by


Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
Top Users Oct 2017
  1. Arjun

    23396 Points

  2. Bikram

    17078 Points

  3. Habibkhan

    8158 Points

  4. srestha

    6286 Points

  5. Debashish Deka

    5438 Points

  6. jothee

    4978 Points

  7. Sachin Mittal 1

    4772 Points

  8. joshi_nitish

    4344 Points

  9. sushmita

    3964 Points

  10. Rishi yadav

    3804 Points


Recent Badges

Great Question jothee
Notable Question Priyanka23
Great Question khushtak
Good Question Ishrat Jahan
Good Answer Arjun
Revival Arjun
Nice Question Kathleen
Nice Answer janakyMurthy
Renewal janakyMurthy
Renewal Bikram
27,316 questions
35,169 answers
84,075 comments
33,262 users