Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

12. What will be the value of BX after the following instruction sequences? mov

ID: 3733615 • Letter: 1

Question

12. What will be the value of BX after the following instruction sequences? mov bx, 329Bh and bx, 00FFh a. CD64h b. 00FFh c. 3298h d. 009Bh 13. What is the resulting value of AL after the following instruction sequence? mov al, 01101011b xor al, 00101101b a. 01001110b b. 10110001b c. 01000110t d. 00100001 14. What is value of ax after the following instructions are execui ed? Mov ax, 15 , 10 Ja else Add ax, 1 Jmp done else: Sub ax, 1 done: add ax, 3 l. b. 9 c. 15. What will be the final value in ax after these instructions execute? mov ax, 10 mov cx, 2 L1: neg ax add ax, cx loop L1 b. 9 16. What is the values of the Carry, Sign, Zero, and Overflow flags after these instructions are executed mov ax, OA560h add al, 0A0h 17. What will be the final value in ax after these instructions exec te? Push 7 Push 6 Pop ax Pop ax c. 13 d. 0

Explanation / Answer

Answer is as follows:

A) First we move 329Bh and than and with 00FF h

So we get the result after perfoming operatoin = 009B h i.e. option d

So correct option is d.

B) First we move 01101011 and perform XOR operation with 00101101

Opeartion set 1 where both inputs are different else set to 0, So we get the result after performing operation is 01000110 i.e. match with option c

So the correct option is c.

C) First we move 15 to ax and perform cmp operation on ax and 10 i.e. 10 - 15 = -5

Now on Ja instruction we get flags i.e. CF = 1 and ZF = 0 so it can't takes jump because ja takes jump when both flags are set to 0.

Than 1 is add to ax i.e. 5 + 1 = 6 and than junp to label done where it is added with 3 i.e. 6 + 3 = 9 i.e. option b

So correct answer is b.

D) First we move 10 and 2 to registers ax and cx respectively and then perform neg means create 2's complement of ax i.e.

ax contain 10 i.e. 1010 in binary and it's 2's complement is 0101 + 1 = 0110 = 6 in decimal or hexadecimal

and than add it to the contents of cx i.e. 2

So 6 + 2 = 8 i.e. same as option c

So the correct option is c.

E) First move 0A560 h in ax in which AH(higher) contains 0A5 and AL(lower) contains 060 h.

Than perform add operation on register al with data 0A0 h

So we have

60 h = 0110 0000 in binary

A0 h = 1010 0000 in binary

after adding we get 1 00000000 where carry is 1, So CF = 1 and register got clear so ZF = 1, there is no sign effected so SF = 0 and there is no overflow with addition so OF = 0 that match with option a.

So the correct option is a.

F) First 7 is pushed and than 6 is pushed and than pop operation is perfomed so 6 get poped out and than agian pop operation is perfomed so 7 is pooped out.

NO any element in the ax means it creatres 0 i.e. option d

So Correct option is d

if there is any query please ask in coments...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote