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
analysis and detail working of bootstrap sweep circuit

Q. Consider a current element I 1 d ¯l 1 = 10 dz ¯az kA located at (0,0,1) and another I 2 d ¯ l 2 = 5dx ¯ax kA located at (0,1,0). Compute d ¯F 21 and d ¯F 12 experienced by

What is RXD? RXD- Receive Data Input This input pin of 8251A gets a composite stream of the data to be received by 8251A.

Q. Illustrate the operation performed by instruction OUT 47 h, AL. Ans:  It transfers contents of AL to I/O port 47h. Notice that I/O port number appears as 0047h on the 16 b

Figure shows two first-order triangular finite elements used to solve the Laplace equation for electrostatic potential.  Find a local S-matrix for each triangle, and a global S-mat

RAL Rotate Accumulator Left Through Carry Instruction This  instruction rotates the content  of the accumulator  towards left by one bit. The D 0 bit moves to D 1   bit moves

The covers of electrical machines are made of (A)  Soft magnetic materials.          (B) Hard magnetic materials. (C) Super conductors.                       (D) Semicond

For the 3-bit 2 n -R D/A converter of Figure, calculate the analog output voltage when the input is (a) 100, and (b) 010. Solution a. For the binary input 100, switches con

a) A 230 V/25V, 50 HZ transformer with a rated primary current of 1,2 Amps is used to supply a number of 25 V, 30 Watt halogen light bulbs. Assuming an ideal transformer and tha

OUT Output Instruction This instruction is used  send data byte  stored in the accumulator  to the  output  port  whose  address  specified in the instruction. The instruction