Sub subtract instruction, Electrical Engineering

Assignment Help:

SUB Subtract Instruction

This  instruction  is used to  subtract the contents of any  register  or memory location from  the contents of  accumulator. There are two  formats as follows:

a.Subtract the contents of Register The  contents of  register R are subtracted  from the contents of accumulator and  result of operation is  stored in the accumulator. Here register R  may be any  one  of the A, B, C,D, E,H or L registers.

SUBR                   ( A- A - R)

Flags : All  flags  are modified according to the results.

As we have already  discussed in chapter 1 that the subtraction is done  using 2 s  complement  method in microprocessor.  Followings  steps are followed  by the  8085 microprocessor while performing  subtract operations.

 Step1.  Converts subtrahend ( the  number to  be subtracted) into its 1 s complement form.

 Steps2.  Adds 1 to  the 1 complements  form to  obtain 2  complement  form the  subtrahend.

 Step3.  Adds 2 complements  to the minuend ( the  contents of the accumulator).

 Step 4.  Complements  the carry  flag.


Related Discussions:- Sub subtract instruction

Theoretical circuit, Theoretical Circuit The theoretical circuit is ava...

Theoretical Circuit The theoretical circuit is available in form 1.Passive materials with mediocre dimension is used by the manufacturer. In order to make a theoretical circuit

Illustrate bcd-to-decimal decoding, Q. Illustrate BCD-to-decimal decoding w...

Q. Illustrate BCD-to-decimal decoding with a 4-to- 16 decoder, and draw the corresponding truth table.

Check Sheets - Quality Tools for Improvement, Check Sheets - Quality Tools ...

Check Sheets - Quality Tools for Improvement This might be an easy listing of items that could represent information in an efficient, graphical format. If the system under ana

Bad effects of armature reactions, Q.  What is meant by armature reaction....

Q.  What is meant by armature reaction. Explain briefly the bad effects of armature reactions.   Sol. By armature reaction is meant the effect of magnetic field set up

Computes similarity between two histograms, Write an m-file "distan.m"  whi...

Write an m-file "distan.m"  which does all the following operations: (i) computes 10 dimensional histogram of an input image             h1=sum(hist(imn,10)'); (ii) computes

Common-base configuration, Common-base configuration:  The common-bas...

Common-base configuration:  The common-base that is abbreviated as CB transistor configuration, which is as well termed as the 'grounded base' configuration, is displayed in

Emf, State and explain three factors upon which the induced electromotive f...

State and explain three factors upon which the induced electromotive force depends

Explain light-emitting diode, Q. Explain Light-emitting diode? This is ...

Q. Explain Light-emitting diode? This is a reliable, rugged, and inexpensive semiconductor display device requiring about 10 mA of current flow for full illumination. An LED is

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