You are on page 1of 7

Public Authority of Applied Education and Training

Department of Electronics Engineering


ENT 237 - Microprocessor
Midterm 1 – Spring 2019
Name: Date:

You must read and accept the following exam rules:


- The exam is closed book and closed notes.
- No collaborations or what so ever with your classmates during the exam.
- Cheating or trying to cheat will result in expelled from school.
- The question will be explained before the exam but once the exam started, you may not ask any
questions of how to do this and that…etc.
- You must write your name and date on all of the pages before you start the exam.
- You must write again your name, signature, and date again on the bottom of this page as
indicated (acknowledged that you read and understood the exam rules and procedures)

Exam’s Grade Distribution


Question 1 Max Points Received Points
Q1 10
Q2 9
Q3 8
Q4 9
Q5 6
Q6 8
Total 50

Signature:--------------------------------------------------------

Date:---------------------------------------------------------------
Question 1: Numbering System (you must show your work):

a. In hex, Calculate 2BFC + 54A7

Answer:

b. In binary, Calculate 1110 - 101

Answer:

c. Convert 11001101 to decimal

Answer:

d. Convert -237 decimal to hex

Answer:

e. Convert 237 decimal to hex

Answer:
Question 2: Microprocessor Memory:

Determine the amount of ROM, EPROM, and RAM in kilobytes for the following
memory map shown in the figure below:

a. ROM from 0000 to 04FF hex.

b. EPROM from 0500 hex to 1627 hex.

c. RAM from 1628 hex to FFFF hex.


Question 3: Microprocessor Memory:

For each of the following memory sizes below, determine the minimum number
of address bits required. Show in hexadecimal the 5 highest addresses of each
memory size given:

a. 32k bytes.

b. 53k bytes.

c. 2.3k bytes.

d. 19800 decimal bytes.


Question 4: Assembly Language:

Given the following assembly language code:

MVI H, 22
MVI L, 44
SHLD 1200
LXI H, FFEE
SHLD 1202
LHLD 1200
MOV A, L
MOV B, H

a. What are the contents in memory locations 1200


hex to 1203 hex.
b. What are the contents of registers A, B, H, L after executing the code

A B H L

c. What is the addressing mode for each of the above instructions?

Instruction: Addressing Mode:


MVI H, 22

MVI L, 44

SHLD 1200

LXI H, FFEE

SHLD 1202

LHLD 1200

MOV A, L

MOV B, H
Question 5: Assembly Language:

What is the final result in registers A, D, E and memory after executing the
following assembly program:
Memory
MVI A, 20
STA 2001
20C4
MVI A, C1
STA 2000 20C3
LHLD 2000
MOV M, H 20C2
MOV A, L
XCHG 20C1
STAX D
MVI E, C2
STAX D
.

2003

2002
A D E
2001

2000
Question 6: Addressing Modes:

Write an assembly program to:

a) Load the A register with the immediate data 6F hex , then


b) Transfer it to registers B, and C using register addressing.
c) Load the HL register pair with the immediate data 2800 hex, and the
DE register pair with the immediate data 3520 hex then
d) Exchange the contents of DE register pair with the contents of HL
register pair using register addressing.

You might also like