78FC005216048489160
78FC005216048489160
78FC005216048489160
The Intel 8085 has six general-purpose registers to store 8-bit data and these registers are
identified as B, C, D, E, H and L. When two registers are combined, 16-bit data can be stored
in a register pair. The only possible combinations of register pairs are BC, DE and HL. These
register pairs are used to perform 16-bit operations. There is an accumulator register and
one flag register. The accumulator is an 8-bit register. Arithmetic and logical operations are
performed in the accumulator and after operation; the result will be stored in the
accumulator. In addition with the above registers, there are two 16-bit registers, namely,
● Instruction register
● Temporary register
The accumulator is an 8-bit register, which is part of the Arithmetic Logic Unit (ALU). This is
identified as register A or ACC. It is used to store 8-bit data and to perform arithmetic as
well as logic operations. The final result of an operation performed in the ALU is also stored
in the accumulator.
General-purpose registers:
shown in the figure. These registers are used to store 8-bit operands. To hold a 16-bit data
or 16-bit memory address location, two 8-bit registers can be combined. The combination of
two 8-bit registers is known as a register pair. The only possible combination register pairs
of the 8085 microprocessor are B-C, D-E and H-L. The programmer cannot form a register
pair by selecting any two registers of his choice. The H-L register pair can be used as the
address of memory location whereas B-C and D-E register pairs are used to store 16-bit
data. During the execution of the program, all general-purpose registers can be accessed by
Special-purpose registers:
special-purpose registers, namely, Program Counter (PC), Stack Pointer (SP), Flags/Status
Registers (SR), Instruction Register (IR), Memory Address Register (MAR), Temporary
address of the next instruction which will be executed. Actually, this register keeps track of
memory locations of the instructions during execution of program. The microprocessor uses
this register to execute instructions in sequence. For this, the microprocessor increments
The stack pointer is a 16-bit register, which is used to point the memory location called the
stack. The stack is a sequence of memory locations in the R/W memory. The starting of the
stack is defined by loading a 16-bit address into the stack pointer. Generally, the
programmers use this register to store and retrieve the contents of the accumulator, flags,
The Arithmetic Logic Unit (ALU) includes five flip-flops, which are set or reset after an ALU
operation according to data conditions of the result in the accumulator and other
general-purpose registers. The status of each flip-flop is known as a flag. Therefore, there
are five flags, namely, Carry flag (CY), Parity flag (P), Auxiliary Carry flag (AC), Zero flag (Z),
and Sign (S) flags. The most commonly used flags are Carry(CY), Zero(Z) and Sign(S).
For example, after addition of two 8-bit numbers, if the sum in the accumulator is larger
than eight bits, the flip-flop, which is used to indicate a carry, is set to one. So the Carry flag
(CY) is set to1. If the result is zero after any arithmetic operation, the Zero (Z) flag is set to
one.
Below figure shows an 8-bit register, which indicates bit positions of different flags. This
eight-bit register, only five bit positions out of eight are used to store the outputs of the five
flip-flops. The flags are stored in the 8-bit register so that the programmer can check these
flags through an instruction. These flags are used in the decision-making process of the
microprocessor.
Carry Flag (CY): The arithmetic operation generates a carry in case of addition or a borrow in
case of subtraction after execution of an arithmetic instruction and the carry flag is set to 1.
When the two 8-bit numbers are added and the sum is larger than 8 bits, a carry is produced
and the carry flag is set to 1. During subtraction, if borrow is generated, the carry flag is also
Parity Flag (P): After an arithmetic or logical operation, if the number of 1s in the result is
even (even parity), this parity status flag (P) is set, and if the number of 1s is odd (odd
parity), this flag is reset. For example, if the data byte is 1 1 1 1 1 1 1 1, the number of 1s in
the data byte is eight (even parity) and the parity flag (P) is set to 1.
Auxiliary Carry Flag (AC): In arithmetic operations of numbers, if a carry is generated by bit
D3 and passed on to D4, the auxiliary carry flag (AC) is set. Actually this flag is used for
internally Binary Coded Decimal (BCD) operations and this is not available for the
Zeor Flag (Z): When an 8-bit ALU operation results in zero, the Zero (Z) flag is set; otherwise
it is reset. This flag is affected by the results of the accumulator and general-purpose
registers.
Sign Flag (S): The sign flag has its importance only when a signed arithmetic operation is
performed. In arithmetic operations of signed numbers where the bit D7 is used to indicate
The most significant bit of an 8-bit data is the sign bit. When a number is negative, the sign
bit is 1. If the number is positive, the sign bit is 0. For an 8-bit signed operation, the
remaining 7 bits are used to represent the magnitude of a number. After execution of a
signed arithmetic operation, the MSB of the result also represents its sign.
Program Status Word (PSW): In a flag register five bits (D7 D6 D4 D2 D0) indicate the five
status flags and three bits D5 D3 and D1 are undefined. The combination of these 8 bits is
known as Program Status Word (PSW). The PSW and the accumulator can be used as a
The instruction register holds the operation code (opcode) of the current instruction of a
program during an arithmetic/logical operation. The instruction is fetched from the memory
prior to execution. The decoder takes the instruction and decodes it. After that, the
The Memory Address Register holds the address of the next program instruction. Then MAR
feeds the address bus with addresses of the memory location of the program instruction
This is an 8-bit register, which is associated with ALU. This register holds data during
arithmetic and logical operation. This register can be used by the microprocessor but is not