Page 131 - Digital Electronics by harish
P. 131

  Auxiliary Carry (AC): Auxiliary Carry flag is set (1) if there is a carry from
                   bit position D of result in the accumulator, otherwise it is reset (0). This flag
                                   3
                   is used for BCD operations.

                 Parity (P) flag: Parity flag is set (1) if the result in the accumulator has even
                   number of 1s, otherwise it is reset (0).

                 Carry (CY) flag: Carry flag is set (1) if the result of an arithmetic operation
                   results in a carry from bit position D , otherwise it is reset (0). This flag is
                                                              7
                   also used to indicate a borrow condition during subtraction operations.

               5.  Instruction register

                   When an instruction is fetched from memory, it is stored in the Instruction
               register. It is an 8-bit register. This resister cannot be used in the programs.

               6.  Instruction Decoder and Machine cycle encoding

                   This  unit  decodes  the  instruction  stored  in  the  Instruction  register.  It
               determines the nature of the instruction and establishes the sequence of events
               to be followed by the Timing and control unit.


               7.  General purpose registers

                   There are six 8-bit general purpose registers namely B, C, D, E, H and L
               registers. B and C registers are combined together as BC register pair for 16-bit
               operations. Similarly D and E registers can be used as DE resister pair and H
               and L as HL register pair. The HL register pair is also used as memory pointer
               (M-register) for storing 16-bit address in some instructions.There are two more
               8-bit temporary registers W and Z. These registers are used to hold data during
               the  execution  of  some  instructions.  W  and  Z  registers  cannot  be  used  in
               programs.

               8.  Stack Pointer (SP)

                   Stack  is  a  portion  of  memory  (RAM)  used  as  FILO  (First  In  Last  Out)
               buffer. This is mainly used during subroutine operations. Stack Pointer is a 16-
               bit  register  used  as  a  memory  pointer  (16-bit  address)  for  denoting  the  stack
               position in memory. The Stack pointer is decremented each time when data is
               loaded into the  stack  and incremented  when  data is  retrieved  from  the  stack.
               Stack pointer always points to the top of the stack memory.






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