cpi compare immediate instruction the 8 bit


CPI Compare Immediate Instruction

The 8 bit  data  specified  in the  instruction is  compared with the  contents of the accumulator. The comparison  is done by  subtracting  the 8 bit data form  the contents of the accumulator the  contents of the accumulator d not  change. The flags are modified similar  to subtraction. The instruction format is

CPI 8 bit data                    (A- 8bit data )

Flags : All  flags are modified as they would  change  in subtract operation but the  content of  both  the operand do no to change.

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

IF A> 8 bit data CY and Z Flags are reset.

IF A =8 bit  data Z flag  is set and CY flag is reset.

IF A < 8 bit  CY is set and Z  flag is  reset.

Request for Solution File

Ask an Expert for Answer!!
Electrical Engineering: cpi compare immediate instruction the 8 bit
Reference No:- TGS0262484

Expected delivery within 24 Hours