Question

Get into DEBUG and enter the following assembly language instructions using the A command: mov ax,...

Get into DEBUG and enter the following assembly language instructions using the

A command:

mov ax, -11

mov bh, -21

mov bl –15

nop

Run the program using the T command. a. Notice the value placed in ax.

CLEARLY EXPLAIN how was that hexadecimal value arrived at?

Show your work. b. How is the final value arrived at in BX?

Again, show

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer is as follows :

As we know that when we have to convert negative decimal number to any binary number than we have to find the 2's complement of that particular number.

So as according to question.

The AX contains the hexadecimal number as :

We know that ax is 16 bit register.

Mov ax,-11

So -11 is moved to register ax.

So it's binary representation is :

11 is written as 1011

and if it is 16 bit than 11 is written as 0000 0000 0000 1011

and it's 2's complement is 1111 1111 1111 0100 + 1

= 1111 1111 1111 0101 i.e. written as FFF5 in hexadecimal.

So we get that ax contains FFF5 in hexadecimal.

For BX :

As we see that we have 2 registers i.e. bh and bl. Where bh represent the higher bits of bx and bl represent the lower bits of bx. Both bh and bl are 8 bit registers

So bh contains -21

So , 21 is written as 10101 and if it is 8 bit number than it is write as 00010101 and it's 2's complement is

11101010 + 1 = 11101011 (higher bits for bx)

As bl contains -15

So, 15 is written as 1111 and if it is 8 bit number than it is write as 00001111 and it's 2's complement is

11110000 + 1 = 11110001 (lower bits of bx)

So bx contains

1110 1011 1111 0001 i.e. equal to FBF1

So BX contains FBF1.

If there is any query please ask in comments..

Add a comment
Know the answer?
Add Answer to:
Get into DEBUG and enter the following assembly language instructions using the A command: mov ax,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT