You are on page 1of 3

Page |1

Chittagong University of Engineering &Technology

Department of Mechatronics & Industrial Engineering.

Course No.: MIE 312

Course Title: Micro-controller and Interfacing for Mechatronic systems Sessional

EXPERIMENT NO.: 2

NAME OF THE EXPERIMENT:

Addition and Subtraction of two 16-bit number using EdSim51

Remarks Name: Shakline Habib

Student No: 1709020

Date of Performance: 05.09.2021

Date of Submission: 12.09.2021


Page |2

Experiment No: 02
Experiment Name: Addition and Subtraction of two 16-bit number using EdSim51.
Objectives:
1. To learn about MOV, ADD, ADDC and SUBB instructions.
2. To learn about arithmetic operations
3. To learn about the function of Accumulator.
Problem 1:
Add 16-bit number at R0-R1 (Lower byte at R0) to another 16-bit number at R2-R3 (Lower
byte at R2) and place the result at R4-R5 (Lower byte at R4).
Solution:

Problem 2:
Page |3

Subtract 16-bit number at R0-R1 (Lower byte at R0) from another 16-bit number at R2-R3
(Lower byte at R2) and place the result at R4-R5 (Lower byte at R4).
Solution:

You might also like