0% found this document useful (0 votes)
63 views

Name: Department: Com, It and SW Date

1. The exam consists of 8 multiple choice and short answer questions to be completed within 150 minutes. Questions cover topics like binary conversions, instruction functions, flag states after operations, and register values after a series of instructions. 2. Question 7 asks the examinee to determine the values of various registers and flags after a series of instructions including shifts, additions, subtractions and pushes/pops are executed. 3. The final question provides register definitions and asks the examinee to determine register values after a series of operations are performed using those registers.

Uploaded by

Amer Albasser
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

Name: Department: Com, It and SW Date

1. The exam consists of 8 multiple choice and short answer questions to be completed within 150 minutes. Questions cover topics like binary conversions, instruction functions, flag states after operations, and register values after a series of instructions. 2. Question 7 asks the examinee to determine the values of various registers and flags after a series of instructions including shifts, additions, subtractions and pushes/pops are executed. 3. The final question provides register definitions and asks the examinee to determine register values after a series of operations are performed using those registers.

Uploaded by

Amer Albasser
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Name:

Department: Com , IT and SW Date :

Microprocessors
Final Exam
Instructor: Ebrahim Alssrary

Read the Following Instructions Carefully:


1. The duration of the exam is strictly 150 minutes. No extra time will be given.
2. You are allowed to ask questions regarding the exam questions during the first 45 minutes
only.
3. Answer each question to the same of Exam page .
QUESTIONS
----------------------------------------------------------------------------------------------------
1. (18)Complete the sentences :
a. In an 8-bit operand, bit……….is used for the sign bit, whereas in a 16-bit
operand, bit….. is used for the sign bit.
b. Convert 16H to its 2‟s complement representation………………………….
c. The range of byte-sized signed operands is -………….to+………..The range of
word sized signed operands is -…………..to +……………..
d. The instruction for signed multiplication is ………….The instruction for signed
division is …………….
e. In unsigned multiplication of a byte in Data1 with a byte in AL, the product will
be placed in register(s)……………
f. In unsigned multiplication of AX with BX, the product is placed in
register(s)……...
g. In unsigned multiplication of CX with a byte in AL, the product is placed in
register(s)............
h. In unsigned division of a byte in AL by a byte in DH, the quotient will be placed
in ………….and the remainder in ………..
i. In unsigned division of a word in AX by a word in Data1 , the quotient will be
placed in ………
j. In unsigned division of a word in AX by a byte in Data2, the quotient will be
placed in ………
k. In unsigned division of a double-word in DXAX by a word in CX ,the quotient
will be placed in …………and the remainder in …………………
2. (8)Match the following instruction mnemonic with its function .
………. DAA (a) ASCII addition
………..DAS (b) ASCII subtraction
………..AAS (c) BCD subtraction
………..AAA (d) BCD addition
3. (4) Explain the purpose of the CBW and CWD instructions .Demonstrate the effect of
CBW on AL=F6H.Demonstrate the effect of CWD on AX=124CH

…………………………………………………………………………………………
…………………………………………………………………………………………
…………………………………………………………………………………………
………………..............................................................................................................
4. (10) Observe the result of the following : OF,CF,SF
a. MOV DL,-128 b. MOV AL,-2 c. MOV BL,25 d. MOV DX,3FA2
MOV CH,-2 MOV CL,-5 MOV CL,4 MOV CL,7
ADD DL,CH ADD CL,AL ROR BL,CL ROL DX,CL
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
5. (2)Why does “ROR BX,4” give an error in the 8086? How would you change the
code to make it work ?
…………………………………………………………………………………………
…………………………………………………………………………………………
6. (12)What is the value of BH after the following ?
a. SUB BH,BH b. MOV BX,FFFFH c. DATA1 DW 7777H
STC MOV CL,5 TIMES EQU 4
RCR BH,1 CLC MOV CL,TIMES
STC RCL BX,CL SHR DATA1,CL
RCR BH,1 MOV BX,DATA1
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………………………………
……………………………………………………………………………………………………………………..........................
7. (12)What will be the values of the specified registers and flags after the execution of the
following instructions?
a) MOV AX,9A3FH b) MOV DL,63H c) MOV AX,389CH d) SUB AX,AX
MOV CX,3603H MOV DH,DL MOV BX,1A8CH SUB AX,1
SHL AX,CL INC DH SHL BL,1 PUSH AX
ADD AX,CX SUB DL,DH ADC AH,BL POP AX
ADC DX,9B00H
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………….
8. (12)Given the definition of the following data segment, where A and B are ASCII numbers.
.DATA
A DB „28‟
B DB „54‟
ORG 0100H
C DB ?
Write the required code segment that converts these ASCII numbers to packed BCD and add
them up to calculate sum in pack BCD form. Save the result in variable C.
Hint: The resulting BCD number is assumed to be a byte
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
……………………………………………………………………………………………..........
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
......................................................................................................................................................
9. (12) Find the elements in ARRAY1, ARRAY2, and RESULT after the execution of the
following
program.
…………………..
DTSEG SEGMENT
ARRAY1 DB A2H, 13H, B2H, 23H
ARRAY2 DB 97H, 21H, 59H, 29H
RESULT DB (?)
DTSEG ENDS
..…………………..
MOV CX,4
MOV BX,OFFSET ARRAY1
MOV DI,OFFSET ARRAY2
MOV SI,OFFSET RESULT
BACK: MOV AL,[BX]
MOV AH,[DI]
CMP AL,AH
JB NEXT1
MOV [SI],AL
JMP NEXT2
NEXT1: MOV [SI],AH
NEXT2: MOV [BX],AH
MOV [DI],AL
INC BX
INC DI
INC SI
LOOP BACK
……………………………………….
ARRAY1, ARRAY2 & RESULT=?
CX BX DI SI [BX] [DI] [SI] AL AH

4 1
3 2
2 3

1 4

ARRAY1 = …………………………………………………………………..
ARRAY2 = ……………………………………………………………………
RESULT = ……………………………………………………………………..

You might also like