Program analysis , Electrical Engineering

Program Analysis

We have to find the greater of two given  number. We  can store the given  numbers  in two  different  registers ( suppose register A and B). Then we will compare the  contents  of  register B with  the contents of accumulator A. If the contents A are greater than B  Both  CY and Z  flag is reset.  If  the contents of A are equal  to B, Z  flag is  set and CY  flag is  reset. Here we assume for simplicity  of the  program that the  given  numbers are not  equal   then only carry flag can decide that which  number is greater. F carry flag  is set  the content of accumulator  A are less  than the contents  of B otherwise  the contents  of B  are greater  than the contents  of accumulator A.

Flow chart   : it is better  to draw  the flow  chart before  writing the program.

Posted Date: 4/5/2013 1:21:33 AM | Location : United States







Related Discussions:- Program analysis , Assignment Help, Ask Question on Program analysis , Get Answer, Expert's Help, Program analysis Discussions

Write discussion on Program analysis
Your posts are moderated
Related Questions
Faraday conducted a series of experiments on coils in a magnetic field. He found that if the magnetic flux density threading a coil were changed, a voltage was induced in the co

what are the limitations of superposition theroem

Discuss BIOS function call with one example. BIO stands for Basic Input Output System: This is a set of programs to give most basic low-level services as services keyboard, s

transfer function of Lube Oil Cooler Temperature

Q. A three-phase, 50-Hz induction motor has a full load speed of 700 r/min and a no-load speed of 740 r/min. (a) How many poles does the machine have? (b) Find the slip and t

Module of the rated currents - transformer: The transformer of the Face(Figure) 2 is a transformer of type Delta-Y (the neutral of Y is grounded). The rated output is of 1500

contribution of circuit theory on the health and quality of life of the citizen

Calibration and Testing of Energy Meters and Meter Laboratory Energy meters form a vital instrument of revenue realization for the distribution utilities. Based on the meter r

Binary Subtraction Negative numbers are represented in 2 complement form and subtraction is also  per formed  using  2 complement  method in microprocessor. Hence we will  dis

Charge density In a semiconductor