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
a. Explain State Transition Diagram and define the various SDL symbols used in state transition diagram. b. Draw the signal exchange diagram for a local call used to show the se

really need help how to run the veener press line for wood-based panels?

Q. Explain from the drain characteristics that a JFET has  infinite resistance? When V GS = 0v when a positive voltage Vds has been applied across the channel and the gate

Q. Explain Time-invariant versus time-varying systems? When the parameters of a control systemare stationary with respect to time during the operation of the system, the system

Thermal considerations: At continuous current, the voltage across the emitter-base junction V BE of a bipolar transistor get decreases 2 mV (silicon) and 1.8mV (germanium) fo

State the function of RS1 and RS0 bits in the flag register of intel 8051 microcontroller? RS1 , RS0 - Register bank select bits RS1   RS0 BankSelection 0        0   Bank

Ferromagnetic materials have some 'residual magnetism' even when the current (proportional to H) is zero. Material with strong residual magnetism are useful for making permanent ma

Uses of FET IGBTs (Insulated-gate bipolar transistor) see application in switching internal combustion engine ignition coils, in which fast switching and voltage blocking cap

advantage and disadvantage of alloying steel with silicon

why armature lamination notched in outer periphery