• Accomulator (Reg A): It is an 8 bit register, it is the focus of all operations i.
e
in an arithmetic or logical operation one data is always present in
accumulator, after the operation result is stored in to the accumulator.
• General purpose registers (Reg B,C,D,E,H,L): These are called general purpose
registers. They can be used individually as 8 bit data registers , they can also
be used in pair to form 16 bit memory register. B-C, D-E and H-L are only
allowed pairs.
• Register W and Z (Temp reg) : These are temporary registers internally used
by microprocessor to store temporary data during the execution of
instructions.
• Temporary register : It is just an 8 bit temporary storage used to hold second
operand.
• Flag register : It is an 8 bit register out of which only 5 bits are used to show
status of current result and 3 bits are not used. It is also called as status
register. There are five flags. Carry flag, Parity flag, Auxiliary carry flag, Zero
flag and Sign flag.
Flag Format :
D7 D6 D5 D4 D3 D2 D1 D0
SF ZF X AC X PF X CY
• CARRY FLAG : It is affected by arithmetic operations. In arithmetic operation is
carry/borrow is generated out of MSB than carry flag is set otherwise it is reset.
• PARITY FLAG : After the operation if the result (accumulator) contains even
number of 1’s then parity flag is set otherwise it is reset.
• AUXILIARY CARRY FLAG: If there is a carry (borrow)from bit D3 to D4 then AC is
set otherwise it is reset.
• ZERO FLAG : If the result of any arithmetic or logical operation is zero then ZF is
set otherwise it s reset.
• SIGN FLAG : Set sign flag represents negative number where as reset sign flag
represents positive number. It is affected by MSB of accumulator.
• Instruction register & instruction decoder: When the first byte of instruction is
fetched from program memory it is transferred to instruction register,
instruction register transfers it to the instruction decoder. Instruction decoder
decodes the instruction and generates sequence of steps to be follow for the
execution of the instruction.
• ALU(Arithmetic and logic unit): All the arithmetic and logical operations are
performed in this unit. It includes Accumulator , flag register and temporary
register
• Timing and control unit : This unit is used to synchronize all the operations
with the clock. It also generates control signals to communicate between
microprocessor and other devices .
• Serial I/O control : This unit is used for serial communication , it has two pins.
SID : Serial input data, Used to receive data serially.
SOD : Serial output data, Used to send data serially.
• Stack Pointer: A stack is a data structure (set of data) used by the
programmer to store data. It follows the Last In First Out (LIFO) method of
data access. If the programmer wants to store data, the first choice should
always be the registers (as they are in the microprocessor, they can be
accessed the fastest). A stack is preferred over ordinary memory because it is
always sequential in nature. For example, the messenger app on a cell phone
always stores the messages in a continuous form – the last received message
is always displayed first (LIFO pattern). Hence, we don’t need to remember
all the individual addresses. The only relevant address we need is the Top of
Stack. This address is stored in a special purpose 16-bit register known as the
Stack Pointer. The value of the Stack Pointer can be incremented or
decremented when data is removed or added, respectively. The process of
adding data in the stack is known as PUSH and the process of removing data
from a stack is known as POP.
• Incrementer / Decrememter: The value of the Stack Pointer can be
incremented and the value of the Stack pointer can be incremented or
decremented using the 16-bit Incrementer / Decrementer.