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

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

Complete instruction set of 8085 microprocessor , Complete Instruction Set ...

Complete Instruction Set of 8085 Microprocessor There are  total 256 instructions in  8085 microprocessor. These instructions are classified  into  seven categories  according

What is stored program control, Q. What is Stored Program Control ? Sto...

Q. What is Stored Program Control ? Stored Program Control:Modern digital computers use stored programmed concept. Here, a program or a set of instructions to the computer is s

Simplify the following boolean expressions, Q. Using K maps, simplify the f...

Q. Using K maps, simplify the following Boolean expressions: (a) F = A · ¯ B + A · B (b) F = A · C + C · D + B · C · D (c) F = A·B · ¯ C +B ·C +A·B ·D +B ·C ·D

Power Engineering, A three-phase transposed line is composed of one ACSR co...

A three-phase transposed line is composed of one ACSR conductor per phase with flat horizontal spacing of 11 meters as shown in Figure (a). The conductors have a diameter of 3.625

Constant frequency system, Constant Frequency System In this  system c...

Constant Frequency System In this  system chopping period  T is kept constant but the  on time T om is varied. This  system is also referred to pulse with modulation or time

Requirement for an intrinsically safe circuit, Compute the ampacity of a 25...

Compute the ampacity of a 250 AWG copper conductor with type UF insulation that will be used in an area with an ambient temperature of 79°F (26°C). State the ampacity and explain h

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