๐Ÿ“‘ CHAPTER PRACTICE

CS401 - Computer Architecture and Assembly Language Programming โ€“ Branching

Practice 10 verified multiple choice questions per batch with instant answer reveal and comprehensive solutions.

Showing 1 โ€“ 10 of 261 Questions
Page 1 of 27
Q1๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
When multiplying two 8-bit numbers in x86 assembly language, how many bits will the resulting product contain?
๐Ÿ’ป assembly Snippet
mov al, 0xFF
mov bl, 0x02
mul bl
Q2๐Ÿง  Long Problem๐Ÿ“‘ Lec 3Medium๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Write the algorithm for the Bubble Sort sorting technique in your own words.
๐Ÿ’ป assembly Snippet
mainloop:
    mov si, 0
    mov byte [swap], 0
innerloop:
    mov ax, [bx+si]
    cmp ax, [bx+si+2]
    jbe noswap
    xchg ax, [bx+si+2]
    mov [bx+si], ax
    mov byte [swap], 1
Q3๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Provide valid x86 assembly instruction(s) to divide the unsigned value in the AX register by 8.
๐Ÿ’ป assembly Snippet
mov cl, 3
shr ax, cl
Q4๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Medium๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Consider the following code segment: mov bl, 0x9B movsx cx, bl What is the resulting 16-bit hexadecimal value stored in the CX register?
๐Ÿ’ป assembly Snippet
mov bl, 0x9B
movsx cx, bl
Q5๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
The MOVZX (Move with Zero-Extend) instruction is strictly used with ________ integers.
๐Ÿ’ป assembly Snippet
mov bl, 0x85
movzx cx, bl
Q6๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Hard๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Calculate the new values of registers AX and DX after executing the instruction 'DIV BX' when DX = 0xFFFF, AX = 0xFFFC, and BX = 0x0003, or state if an overflow occurs.
๐Ÿ’ป assembly Snippet
mov dx, 0xFFFF
mov ax, 0xFFFC
mov bx, 0x0003
div bx
Q7๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Hard๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Calculate the new values of registers AX and DX after executing the instruction 'IDIV BX' when DX = 0xFFFF, AX = 0xFFFC, and BX = 0x0003, or state if an overflow occurs.
๐Ÿ’ป assembly Snippet
mov dx, 0xFFFF
mov ax, 0xFFFC
mov bx, 0x0003
idiv bx
Q8๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Medium๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Calculate the new values of registers AX and DX after executing the instruction 'DIV BX' when DX = 0x0000, AX = 0xFFFF, and BX = 0x0010, or state if an overflow occurs.
๐Ÿ’ป assembly Snippet
mov dx, 0x0000
mov ax, 0xFFFF
mov bx, 0x0010
div bx
Q9๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Medium๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Calculate the new values of registers AX and DX after executing the instruction 'DIV BX' when DX = 0x0000, AX = 0x0007, and BX = 0x0002, or state if an overflow occurs.
๐Ÿ’ป assembly Snippet
mov dx, 0x0000
mov ax, 0x0007
mov bx, 0x0002
div bx
Q10๐Ÿ“ Short Q๐Ÿ“‘ Lec 3Easy๐Ÿ”RepeatedโญHigh-Yield๐Ÿ’กConceptual
Which flag in the FLAGS register is NOT affected by the execution of INC and DEC instructions?
๐Ÿ’ป assembly Snippet
stc
inc ax