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

Level4, What are the three modes of operation of rotating machines

What are the three modes of operation of rotating machines

Why is an emitter bypass capacitor in amplifier, Q.  Why is an emitter bypa...

Q.  Why is an emitter bypass capacitor used in an RC coupled amplifier? If an emitter resistor Re is used for self-bias in an amplifier and if it is desired to avoid the degene

Define memory for a digital computer, Q. Define Memory For a digital comput...

Q. Define Memory For a digital computer? For a digital computer which stores both programs and data, memory can be divided into three types: random-access memory, mass storage,

Explain operation modes of programmable interval timer 8254, Explain modes ...

Explain modes of operation of programmable interval timer 8254. Mode 0 - Interrupt upon terminal count Mode 1 - Programmable one-shot Mode 2 - Rate Generator Mode 3 -

Discuss the closed-loop behavior, Q. Discuss the closed-loop behavior? ...

Q. Discuss the closed-loop behavior? Consider an elementary feedback control system, as shown in Figure, with H = 1. The output variable c and the input e to the direct transmi

Gas hazards in the laboratory, GAS HAZARDS IN THE LABORATORY : As mentione...

GAS HAZARDS IN THE LABORATORY : As mentioned in the introduction of this unit, the gas hazards in a laboratory arise from LPG and other compressed gases. Though the use of gas for

Lki load register pair immediate instruction , LKI  Load Register pair  ...

LKI  Load Register pair  Immediate  Instruction This instruction is used to copy or  load  16 bit  data specified  in the  instruction  directly into  the register pair. The i

Basic principles of electrical engineering, What is ideal and real sources?...

What is ideal and real sources? Source conversion? Nodal voltage method for d.c circuit?

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