You are on page 1of 5

Republic of the Philippines

University of Rizal System


Morong, Rizal

College of Engineering
BS ECE

CASE PROJECT DESIGN FOR PRELIM


ECE 10 – DE 2
DIGITAL ELECTRONICS 2:
MICRO PROCESSOR & MICRO CONTROLLER
SYSTEM AND DESIGN

Submitted by:
Leader:
SIMON, JAY MICHAEL R.

. Members:
JARIN HANNAH JAZZ RIEL L.
LEQUIGAN, EMAN C.
PABRUALINAN, JHAZZREL SHARMAINE
SAN LUIS, YARRI ANNIEL R.

Submitted to:
PROF. FERDINAND FERNANDO
PROBLEM NARRATIVE
A. Given the following problems:

1. Assume X = -217,770 and Y = 12,810. Write a program to calculate.


Z = 4X - 8Y + X/Y.
2. Write and run a single program which will:
a. Place decimal 45 in the accumulator
b. Add 2F to the number in the accumulator.
c. Use a mask to invert every bit in the lower nibble of the sum yet not alter the upper
nibble.
d. Subtract binary 0001 1100 from the last result.
e. Create another mask (using AND instruction) which will allow all bits of the last
result to remain unchanged except the least significant 3 bits which should be
cleared.
3. The ASCII value for numbers 0, 1, 2, ..., 9 respectively, are 30, 31, 32, …, 39. Write a
program that will place the hex 23 in the accumulator and will then take the upper
nibble, change it to its ASCII value, and store it in a RAM address. The program should
then take the lower nibble, change it to its ASCII value, and store it in another RAM
location. Restrictions: (1) You cannot use shift instructions but rotate command
instead. (2) You must make the program so that it will work for any original value, not
just F3H. Hint: (1) You should store the original value in a RAM address so that you
can use it more than once. (2) You will need to use rotate instructions, masks, and
arithmetic instructions. (3) You need to set aside 3 RAM addresses for the original
value given, for the upper as well as for the lower nibble from the original value.

You might also like