Compare with register, Electrical Engineering

Assignment Help:

Compare with Register

The contents  of the register  are compared with  the contents  of the accumulator  here  register  may be  any one  of the  A, B, C, D E, H, or L  registers. The instruction format is

CMPR                          (A-R)

Actually the comparison is done  by subtracting  the contents  of the register from the  contents  of the  accumulator. The contents of the  register  and  the accumulator do not  change the  flags  are modified similar  to subtraction.

Flags : All flags  are modified  as they  would  change  in subtract  operation. But the  contents of both the  operand do  not change.

Although  all flags  are modified  but the  conclusion can be made only by CY and Z flag as shown  below

If A> R : CY  and Z flags  are reset.

IF A= R: Z Flag is set and  CY flag is reset.

IF A < R : CY  is set  and Z  flag s reset.

 


Related Discussions:- Compare with register

Single phase full wave controlled rectifier , Single Phase Full Wave Contro...

Single Phase Full Wave Controlled rectifier The single  phase  half  wave controlled  rectifier  produce only one pulse  of load  current  during  one cycle  of supply voltage

Hlt halt instruction , HLT Halt Instruction The microprocessor halts  ...

HLT Halt Instruction The microprocessor halts  the execution  of the  program and enters into  the wait  state  the address  and data bus are placed in the  high  impedance st

Flag registers , Flag Registers Flag  register  is also an  8 bit  reg...

Flag Registers Flag  register  is also an  8 bit  register. Out of 8 bit  five are  defined as flags to indicate status  of the accumulator  hence it is also called status reg

Design a multiplexer and anomalous signals, 1. The size of the multiplexer ...

1. The size of the multiplexer used to implement a truth table can be cut in half (e.g. 4 inputs instead of 8) if one of the variables is used as an input instead of being connecte

Diode schematic symbol, Diode Schematic Symbol The diode in figure is ...

Diode Schematic Symbol The diode in figure is a unidirectional device. Electron current just only flows in one direction, against the arrow, corresponding to forward bias. The

Concept of flux density, We can illustrate the direction and strength of a ...

We can illustrate the direction and strength of a magnetic field by means of drawing 'flux lines'. These have arrows to show the direction of the magnetic field at any point and th

Number of holes in valence band, Number of holes in valence band: Der...

Number of holes in valence band: Derive the expression for number of holes in valence band and Fermi level in an intrinsic semiconductor. (b) By that percentage does the

Power system, what is speed governing frenqency control

what is speed governing frenqency control

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