Program to find the sum of all negative numbers stored in an array. This program finds the negative numbers in an array and adds them.Basically negative number is one whose carry bit is 1. Algorithm 1)Initializing register R0 with the array address and register R1 with counter. 2)Storing the first…
Tag: microcontroller program
GCD of two numbers using 8051 microcontroller.
This program finds the GCD of given two numbers and stores it in the register. Algorithm. 1) Store the num1 in R1 register and num2 in R2 register. 2) Compare whether num1>num2 and directly store result if num1=num2. 3) If num1>num2 assign numerator register to num1 and denominator register to…