3.2 Accumulator
The accumulator is an 8-bit register (can store 8 bit data) that is a part of arithmetic/logic unit (ALU). In general after performing logical or arithmetical operations, result is stored in accumulator. Accumulator is also identified as Register A.
3.3 Flags
ALU of 8085 have five flip flops whose states (set/reset) are determined by the result data of other registers and accumulator. They are called as Zero, Carry, Sign, Parity and Auxiliary-Carry flags.
- Zero Flag (Z): When an arithmetic operation results in zero , the flip-flop called the Zero flag - which is set to one.
- Carry flag (CY): After an addition of two numbers, if the sum in the accumulator is larger than eight bits, then the flip-flop uses to indicate a carry called the Carry flag – which is set to one.
- S-Sign (S): It is set to 1, if bit D7 of the result = 1; otherwise reset. D7 is the first digit of a binary number.
- P-Parity (P): If the result has an even number of 1s, the flag is set to 1; for an odd number of 1s the flag is reset.
- AC-Auxiliary Carry (AC): In an arithmetic operation, when a carry is generated by digit D3 and passed to digit D4, the AC flag is set. Generally this flag is used internally for Binary Coded Decimals (BCD).
Figure 3.2.2 shows a 8-bit flag register, adjacent to the accumulator. It is not used as a register. Out of eight bit-positions, five positions are used to store the outputs of five flip-flops. These flags play an important role in decision-making process of the microprocessor.
3.4 Instruction Register/Decoder
Before execution of an instruction, it is sent to the Instruction Register. Instruction register stores current instruction of any program. Decoder takes the instruction from memory, decodes it and then passes it to the next stage.
3.5 Memory Address Register
Memory Address Register (MAR) holds the address of next instruction to be executed.
3.6 Control Generator
In microprocessor, the Control Generator generates a signal that executes the operations in accordance to the decoded instructions. In fact it creates a signal (information) which have details about connections between different blocks of the microprocessor so that data reaches to the respective place.
3.7 Register Selector
Register selector is basically a logical controller which directs switching between different registers of microprocessor.
3.8 General Purpose Registers
Microprocessor has few extra registers which can be used to store additional data during a program.