Electrical Engineering ⇒ Topic : ALU and Flags
|
Gaurav
| |
ALU and Flags The arithmetic and logic operations are performed by ALU. The inputs to the ALU are the contents of accumulator and the temporary registers. The results are stored in accumulator after the operations. There are five flags or flip-flops which are set or reset as per the results of operation.The data conditions in the accumulator are indicated by the flags S-Sign Flag: If the contents of the accumulator become negative during the execution of an instruction, the sign flag is set. Z-Zero Flag: If 0 is resulted during the ALU operation, this flag is set. AC-Auxiliary Carry Flag: For BCD operation, this flag is used. When a carry is generated in digit D3 and it is passed onto D4, this flag is set. P-Parity Flag: The result of ALU is checked for parity when some instructions are executed. If there is an even number of 1 s, the P-Flag is set, otherwise it is reset. CY-Carry Flag: The carry occurs during the arithmetic operations. Then the Carry Flag is set, otherwise it is reset. The flag register is also called F register having 8 bits. Only 5 bits are used for the above 5 flags. The bit positions for these Flags are shown in Figure (a) figure (a) Flag register having 8 bits. 8085 has address bus, data bus and control bus as communication lines for the following purposes:
The following steps are necessary to communicate with memory and peripheral devices:
| |
| |
!! OOPS Login [Click here] is required for more results / answer