CS401 Midterm Past Paper Spring 2007
- Type
- Midterm past paper
- Course
- CS401 Computer Architecture and Assembly Language Programming
- Size
- PDF 53 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
Preview text
Text from pages 1, 2 of 2. Download the file for all 2 pages.
MIDTERM EXAMINATION
SPRING 2007 CS401 - COMPUTER ARCHITECTURE AND ASSEMBLY LANGUAGE PROGRAMMING (Session - 1 ) Marks: 45 Time: 90min
Q: Give the new values of AX and DX for each of the following instructions, or tell if the overflow occurs. [2.5 x 4]
a. DIV BX, if DX contains 0x0000, AX contains 0x0007, and BX contains 0x0002 b. DIV BX, if DX contains 0x0000, AX contains 0xFFFF, and BX contains 0x0010 c. IDIV BX, if DX contains 0xFFFF, AX contains 0xFFFC, and BX contains 0x0003 d. DIV BX, if DX contains 0xFFFF, AX contains 0xFFFC, and BX contains 0x0003
Q: Fill in the Blanks [5]
- In the MOV instruction both operands i.e. source and the destination cannot be _______________ operands.
- The MOVZX instruction can be used only with _____________ integers.
- Consider the following code segment
mov bl,9B movsx cx,bl
Write down the 16-bit value for cx in the space below
cx
Q4. Name any two basic type of operands
Q: Consider the following pseudo-code and write the corresponding assembly code for it. [10] Note: Try to write a shorter code.
If ( al>bl) AND (bl> cl)
cx = 1
Q: Give the value of the zero flag, the carry flag, the sign flag, and the overflow flag after each of the following instructions if AX is initialized with 0x1254 and BX is initialized with 0x0FFF. [10] a. add ax, 0xEDAB b. add ax, bx add bx, 0xF001
Q:Write a program to swap every pair of bits in the AX register. [10] For example If AX = 1001100110011001(binary) Or AX= 0x9999 (hex) Then after the program execution it must contain this value AX = 0110011001100110 (binary) or AX= 0x6666 (hex)
Related CS401 files
All CS401 files →- CS401 Midterm Solved MCQs 2012 Midterm PDF 2 MB
- CS401 Midterm MCQs by VU Topper RM Midterm PDF 1.1 MB
- CS401 Midterm Solved Paper Midterm DOC 79 KB
- CS401 Midterm Solved Subjective with References by Moaaz Midterm PDF 188 KB
- CS401 Highlighted Handouts Highlighted PDF 1.5 MB
- CS401 Short Notes Chapter 1 Quiz PDF 4.1 MB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.