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
Guarding Against Loss in Transformers Distribution transformers are expected to convert up to 95-98% of the input power into usable output power. A distribution transformers i

Metal-Oxide-Semiconductor Structure A traditional metal-oxide-semiconductor abbreviated as MOS structure is acquired by growing a layer of silicon dioxide (SiO 2 ) on top of

1.)  A three phase, D0 HP, 1765 rpm, BA0 V induction motor operating at three quarter load has an efficiency of 91% and a power factor of 87%. Determine active power, apparent pow

ELECTRICAL STARTER MOTOR This usually consists of a heavy duty, compound wound, DC motor, which draws its electrical supply from an external source. The motor works in conjunc

A circular ring of magnetic material has a mean length of 1m and a cross sectional area of .001m^2.A sawcut of 5mm width is made in the ring . calculate the magnetizing current req

Q. A diode is connected in series with a voltage source of 5 V and a resistance of 1 k. The diode's saturation current is given to be 10 -12 A and the I-V curve is shown in Find

explain dynamically induced emf and derive expression for it

Simulation of a pn Junction An n + p junction is fabricated on a p-type silicon substrate with N A = 8×10 15 cm -3 . The n+ region has a concentration of N D = 1.5×10 18

What are program-invisible registers? The local and global descriptor tables are determined into the memory system. So as to access and give the address of these tables, the pr

limitations and applications of following circuit theorems: telleans theorem superposition theorem norton theorem compensation theorem millman theorem reciprocity theorem maximum p