Description
III year A section – UCS1512 – Microprocessors Lab
Semester: V
Experiment No 2: 16-bit Arithmetic Operations
2 a) 16 bit addition
Input : Two 16 bit values
Output: Sum in 2 locations, carry in another location
Hint:
Eg instruction:
ADD AX,BX ; AX=AX+BX
2 b) 16 bit subtraction
Input : Two 16 bit values
Output: Difference in 2 memory locations, indication of sign in another location
Hint:
Eg instructions:
SUB AX,BX ; AX=AX-BX
NEG AX; AX=2’s complement of AX
2 c) 16 bit multiplication
Input : Two 16 bit values
Output: Product in 32 bits
Main instructions that can be used:
MUL BX ; DXAX = AX x BX, AX is the default operand register for this instruction for one operand.
2 d) 16 bit division
Input : Two 16 bit values
Output: Quotient in two locations, reminder in another two locations
Main instructions that can be used:
DIV BX ; it will perform DXAX / BX , after execution , quotient will be stored in AX, reminder will be stored in DX
Hints:
No dedicated instruction available in 8086 to perform 16 bit / 16 bit;
So the above instruction can be used, but ensure that DX is loaded with 0000H before execution.




Reviews
There are no reviews yet.