Embedded Ex 3
Embedded Ex 3
Aim:
To find the greatest of two numbers using comparison operator in 8051 micro-controller
Algorithm:
Program:
INPUT OUTPUT
Result:
Thus the program for greater number using 8051 microcontroller was written , executed
and the output was verified successfully
Ex No :3b SMALLEST NUMBER USING COMPARISON
Date: OPERATION
Aim:
To find the smallest of two numbers using comparison operation in 8051 micro-controller.
Algorithm:
Program:
Output:
INPUT OUTPUT
Result:
Thus the program for smallest number using 8051 microcontroller was written,executed and output
was verified successfully
Ex No: 3c
RIGHT SHIFT USING SHIFT OPERATION
Date:
Aim:
To perform right shift operation on a number using 8051 micro-controller.
Algorithm:
1. Load the number into AX.
2. Perform right shift operation using SHR.
3. Store the result in memory.
4. Halt the program.
Program:
INPUT OUTPUT
Result:
Thus the program for right shift operation using 8051 microcontroller was written, executed
successfully.
Ex No:3d
LEFT SHIFT USING SHIFT OPERATION
Date:
Aim:
Algorithm:
Program:
Program
Output:
INPUT OUTPUT
Result:
Thus the program for left shift using 8051 microcontroller was executed
successfully.