Program analysis , Electrical Engineering

Assignment Help:

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.


Related Discussions:- Program analysis

Insulators, various types of electrical insulators used in electrical engin...

various types of electrical insulators used in electrical engineering

Determine the mechanism of generation of the voltage, (a) Identify the semi...

(a) Identify the semiconductor type in the above diagram. (b) Explain the mechanism of generation of the voltage V AB in the above diagram. (c) An experimental setup like th

Can you explain about trapeziodal clippers, Q. Can you explain about Trapez...

Q. Can you explain about Trapeziodal Clippers? During The Positive half cycle, the diode D1 will be open circuited and the input appears as the output until, the applied bias v

Adc instruction, ADC   Instruction This instruction is used to add th...

ADC   Instruction This instruction is used to add the contents of any register of any register  memory location and carry  flag with the  contents of accumulator  and result  i

Matlab coding for powerflow analysis of fast decoupled metho, please give t...

please give the source coding of fast decoupled method

CMA instruction of 8051., if contents of accumulator are all one''s then re...

if contents of accumulator are all one''s then result would be zero so Z flag should be affected and same if all zero''s.....but here it is written that no flags is affected...

Zero flag - registers , Zero Flag - Registers If the  result of any  a...

Zero Flag - Registers If the  result of any  arithmetical  or logical  operation in the accumulator  is zero i ,e  all the bits  of accumulator  ( with  some exceptions )  are

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd