Page 130 - Digital Electronics by harish
P. 130

1.  Accumulator (A-register)

                   It  is  an  8-bit  register.  It  is  associated  with  ALU.  The  accumulator  is  also
               called A-register. During the arithmetic / logic operations, one of the operand is
               available in Accumulator. The result of the arithmetic / logic operations is also
               stored in the Accumulator.

               2.  Temporary (TEMP) register

                   It is an 8-bit register. It is also associated with ALU. This register is used to
               hold  one  of  the  data  (from  memory  or  general  purpose  registers)  during  an
               arithmetic / logic operation.

               3.  Arithmetic and Logic Unit (ALU)

                   The Arithmetic and Logic Unit includes Accumulator, Temporary register,
               arithmetic and logic circuits and flag register. The ALU can perform arithmetic
               (such as addition and subtraction) and logic operations (such as AND, OR and
               EX-OR)  on  8-bit  data.  It  receives  the  data  from  accumulator  and  or  TEMP
               register.  The  result  is  stored  in  the  accumulator.  The  conditions  of  the  result
               (such as carry, zero) are indicated in the flags.

               4.  Flag register

                   It is an 8-bit register. But only five bits are used. The flag positions in the
               flag register are shown in figure 5.6.

                                      D   D   D   D   D   D   D   D
                                                   5
                                                                         1
                                                              3
                                        7
                                                        4
                                                                    2
                                                                               0
                                              6
                                       S    Z     -  AC  -        P     -    CY

                                          Figure 5.6 : Flag register of 8085

                   The flags are affected by the arithmetic and logic operations in the ALU. The
               flag register is also known as Status register or Condition code register. There
               are five flags namely Sign (S) flag, Zero (Z) flag, Auxiliary Carry (AC) flag,
               Parity (P) flag and Carry (CY) flag.

                 Sign (S) flag: Sign flag is set (1) if the bit D  of the result in the accumulator
                                                                     7
                   is 1, otherwise it is reset (0). This flag is set when the result is negative. This
                   flag is used only for signed numbers.
                 Zero (Z) flag: Zero flag is set (1) if the result in the accumulator is zero,
                   otherwise it is reset (0).





                                                           130
   125   126   127   128   129   130   131   132   133   134   135