Ch 03: Branching, Loops and Program Flow

261 Questions261 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS401 - Computer Architecture and Assembly Language Programming Examination Practice

Timed practice exam simulation for CS401 - Computer Architecture and Assembly Language Programming.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 1 โ€“ 10 of 261 Questions
Page 1 of 27
Q1
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.6. Sorting ExampleMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.3. Bitwise Shift InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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
Q5
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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
Q6
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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
Q7
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.2. Multiplication and DivisionHard๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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
Q8
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Data Movement OperationsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The MOVZX (Move with Zero-Extend) instruction is strictly used with ________ integers.
๐Ÿ’ป assembly Snippet
mov bl, 0x85
movzx cx, bl
Q9
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.1. Data Movement OperationsMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
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
Q10
๐Ÿ“ Short Q๐Ÿ“˜ CS401๐Ÿ“‘ Lec 3๐Ÿท๏ธ 3.5. Arithmetic InstructionsEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which flag in the FLAGS register is NOT affected by the execution of INC and DEC instructions?
๐Ÿ’ป assembly Snippet
stc
inc ax