Question

In: Computer Science

a)The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________. b)The decimal...

a)The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________.

b)The decimal equivalent of the unsigned 8-bit hex number 0B4H is ______________.

c)The value of the expression ‘H’ – ‘B’ is less than / equal to / greater than that of the expression ‘L’ – ‘C’.

d)If the .data segment contains declarations

                        A    BYTE      2 DUP (‘a’), ‘+’

B    BYTE      3 DUP (‘b’), 0

C    BYTE      4 DUP (‘c’), ‘–’

D    BYTE      5 DUP (‘d’), 0

then the instruction

                              input     A, D, 6

will display a Windows dialog box with title _______________________________.

f)If eax = 302B59A1H, and ebx = 700CD37DH, then the instruction

                             add ax, bx

will leave the value ______________________________ in the eax register.

Solutions

Expert Solution

Solution:-

a) Given signed 2's complement of 8 bit binary number 11010101.

Identify whether the given bit is negative or positive. If the MSB is 1 then the binary number is negative and if it is 0 then the binary number is positive.

Find 1's complement of 11010101

11010101 - 1 = 11010100

Reverse all the bits

!(11010100) = 00101011

Assign power of 2 values

128 64 32 16 8 4 2 1

| | | | | | | |

0 0 1 0 1 0 1 1

Therefore, (11010101)binary = (32 + 8 + 2 + 1)

=43 decimal

Since this was a signed binary digits our asnwer will hold minus i.e. -(43) decimal.

b) 8 bit hex value to decimal value

First split all the bits as shown

0 B 4

Replace each bit with its equivalent 4 bit binay digits.

0 = 0000

B = 1011

4 = 0100

Now, combine all the binary digits obtained above

0B4 = 0000 1011 0100

Represent the power of 2's value, since we are working with 8 bit I am eleminating the 4 bits of MSB

128 64 32 16 8 4 2 1

| | | | | | | |

1 0 1 1 0 1 0 0

Therefore, add all the 1 with its 2's power value

(0B4) hex = (128 + 32 + 16+ 4)

= 180 decimal

Thus the decimal of 8 bit (0B4)H = (180)D

c) In this we are considering ASCII value and its equivalent hexadeciaml value.

So,

H - B = 72 - 66

because ASCII (H) = 72 Decimal

and ASCII (B) = 66 Decimal

Therefore, 72 - 66 = 6

L - C = 76 - 67

because ASCII (L) = 4C = 76 Decimal

and ASCII (C) = 67 Decimal

Therefore, 76 - 67 = 9

Thus, we can say that, 'H' - 'B' is less than 'L' - 'C'

f) The bx is getting added to ax, which produces the value as A0382D1E

with the window showing all the registers and flag, a screen similar to as shown below.

EAX 302B59A1 EBX 700CD37D ECX 00000101 EDX FFFFFFFF EAX=302B59A1 EBX=700CD37D ECX=00000101 EDX=FFFFFFFF ESI=00000000 EDI=00000000 EBP=0012FFF0 ESP=0012FFC4 EIP=00401024 EFL=00000206 CF=0 SF=0 ZF=0 OF=0

Note:- I am not completely aware of question 'd' concept. I will ready that concept and expalin it to you as soon as possible.


Related Solutions

ASSEMBLY LANGUAGE PROGRAMMING 1. The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B...
ASSEMBLY LANGUAGE PROGRAMMING 1. The decimal equivalent of the signed 2’s complement 8-bit binary number 11010101B is ______________. 2. The decimal equivalent of the unsigned 8-bit hex number 0B4H is ______________. 3. The value of the expression ‘H’ – ‘B’ is less than / equal to / greater than that of the expression ‘L’ – ‘C’. 4. If the .data segment contains declarations A BYTE 2 DUP (‘a’), ‘+’ B BYTE 3 DUP (‘b’), 0 C BYTE 4 DUP (‘c’),...
1) Convert negative fractional decimal number to 8-bit binary number: – 16.625 (use 2's complement binary...
1) Convert negative fractional decimal number to 8-bit binary number: – 16.625 (use 2's complement binary format) Hint: –17 + 0.375 Given the hint above, the fractional number will be divided into two parts, - Whole number, - Fractional part, must be positive (2) Proof to check that your calculation above is correct
What decimal number is represented by the binary 2’s complement 8-bit number 11100111? Show your work
What decimal number is represented by the binary 2’s complement 8-bit number 11100111? Show your work
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
Write -127 as 8 bit signed binary number both using 2'complement and sign/magnitude notation.
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system....
(a) Convert the decimal numbers, 70 and -26 to binary in the signed 2’s complement system. Make sure there are enough digits in the results to be able to perform arithmetic operations with these two numbers. (b) Perform in the signed 2’s complement system, (+70) + (-26) (c) Perform in the signed 2’s complement system, (-70) - (-26) (d) Perform in the signed 2’s complement system, (+70) + (+26)
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent...
Find the decimal equivalents for the following 8-bit two’s complement numbers. a. 0010 0100 Decimal Equivalent ___________ b. 1010 1001 Decimal Equivalent ___________ c. 1100 0011 Decimal Equivalent ___________ d. 0101 0101 Decimal Equivalent ___________
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate...
Convert decimal +47 and +31 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers. Then perform the binary equivalent of (+31)+(-47), (-31)+(+47), and (-31)+(-47). Convert the answers back to decimal and verify that they are correct.
(16%) Convert decimal +47 and +38 to binary, using the signed-2’s-complement representation and enough digits to...
(16%) Convert decimal +47 and +38 to binary, using the signed-2’s-complement representation and enough digits to accommodate the numbers, Then, perform the binary equivalent of (+47)+(-38) and (-47)+(-38) using addition. Convert the answers back to decimal and verify that they are correct.
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030...
Convert the following decimal numbers to 16-bit 2’s complement binary. Display your result in hexadecimal. a.3030 b.404 c.5050 d.-5050 e.-20000 Show work with steps
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
Convert -18 to 8-bit sign magnitude, 1's complement and 2's complement.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT