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

Pratice Question 1. In an 8-bit binary number, which is the most significant bit

ID: 3891016 • Letter: P

Question

Pratice Question

1. In an 8-bit binary number, which is the most significant bit (MSB)?

2. In the following code, the value in AL is intended to be a signed byte. Explain how the

Overflow flag helps, or does not help you, to determine whether the final value in AL falls

within a valid signed range.

mov al,-1

add al,130

3. Trace the following program:

1: main PROC

2: mov eax,5

3: add eax,6

4: sub eax, 6

5: mov ebx, eax

what is the value in eax= and in ebx=   

4. At which level/s can an assembly language program manipulate input/output?

5. In 64-bit mode, you can use up to eight floating-point registers.

6. What is a calling convention, and how is it used in assembly language declarations?

7. How do you reserve space for the stack in a program?

8. How is a source file different from a listing file?

9. How are data labels and code labels different?

10. Why is it not a good idea to use numeric addresses when writing instructions that access variables?

11. Find out if you can declare a variable of type DWORD and assign it a negative value. What does this tell you about the assembler’s type checking?

12. Given the number 456789ABh, list out its byte values in little-endian order.

  

13. Show the order of individual bytes in memory (lowest to highest) for the following doubleword

variable: val1 DWORD 87654321h

14. True or false: The following is a valid data definition statement:

var1 BYTE 0Ah, 255

15. Write an assembly program to compute the following expression:

AL = BL +val1

where Val1 is an 8-bit memory variable

Explanation / Answer

1. MSB is the bit with highest weight. So, for 8 bit number the MSB is 2^7 the right most bit.

2. When -1 and 130 is added 0x00 is stored in Al as it is a 8 bit integer. But the overflow flag sets and we can know that the result is not in valid signed range for 8 bit number.

3. eax = ebx = 5

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