Skip to content
VUBuddy

CS401 Midterm Past Paper Spring 2007

Computer Architecture and Assembly Language Programming PDF 53 KBUpdated 23 Oct 2026
Midterm past paper CS401 Midterm Past Paper Spring 2007 PDF 53 KB
vubuddy.com
Type
Midterm past paper
Course
CS401 Computer Architecture and Assembly Language Programming
Size
PDF 53 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 53 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

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]

  1. In the MOV instruction both operands i.e. source and the destination cannot be _______________ operands.
  2. The MOVZX instruction can be used only with _____________ integers.
  3. 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

  1. ___________
  2. ___________
  3. The INC and Dec instruction do not effect the __________ flag

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)

All CS401 files →
CS401 Computer Architecture and Assembly Language Programming All CS401 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.