Sub subtract instruction, Electrical Engineering

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.

Posted Date: 4/4/2013 7:06:46 AM | Location : United States







Related Discussions:- Sub subtract instruction, Assignment Help, Ask Question on Sub subtract instruction, Get Answer, Expert's Help, Sub subtract instruction Discussions

Write discussion on Sub subtract instruction
Your posts are moderated
Related Questions
Execution Unit receives program instruction codes and data from BIU, implements these instructions and store the result in general registers.

For a discrete time unit step input x(kT), the output  y(kT) of a system is shown below,   Part (a)  Obtain the Z-transform of the output signal y(kT).   Part (b)   F

Problem : a) What is an "Embedded System"? Discuss the characteristics of Embedded Systems. b) Describe three downfalls of "Embedded Systems". c) Explain the difference b

a rectangular surge of 2us duration and magnitude of 100Kv travels along a line of surge impedance 500 ohms. The latter is connected to another line of equal impedance through an i

For Parity Flag PRE ( Return on Parity Even)  and RPO ( Return on Parity Odd) Instructions RPE returns from the  subroutine to the  calling  program if parity flag is not s

Consider the basic MOSFET circuit shown in Figure with variable gate voltage. The MOSFET is given to have very large V A , V T = 4V,and I DSS = 8 mA. Determine i D and v DS for

Explain implicit data addressing mode (with examples) available in microprocessors. Implicit Mode: Does not exactly give an operand. Instruction implicitly gives the o

Q. A tank is filled with water to a height of 12.5cm.The apparent depth of a needle lying at the bottom of the tank is measured by a microscope to be 9.4cm.What is the refractive i

Draw a logic diagram to implement F=ABCDE using only 3 input AND gates

What are the advantages of modern ac generators and Integrated Drive Generators? There are two questions here. I''d really like it if somebody could help me. I''m an AE student.