Friday, 25 May 2018

Which Is The Arithmetic logic Unit In Microprocessor ??

Which Is The Arithmetic logic Unit In Microprocessor ??



What Is The Function Of The Arithmetic Logic Unit In The Microprocessor And How Its Do A Logical Works In Microprocessor!!??  






• In addition to the Arithmetic & Logic circuits, the ALU includes the accumulator, which is part of every arithmetic & logic operation.

• Also, the ALU includes a Temporary Register used for holding data temporarily during the execution of the operation. This temporary register is not accessible by the programmer.


• Registers


– General Purpose Registers
• B, C, D, E, H & L (8 bit registers)
• Can be used singly
• Or can be used as 16 bit register pairs
– BC, DE, HL
• H & L can be used as a data pointer (holds memory address)
– Special Purpose Registers
• Accumulator (8 bit register)
– Store 8 bit data
– Store the result of an operation
– Store 8 bit data during I/O transfer





Flag Register


  • – 8 bit register – shows the status of the microprocessor before/after an operation
  • – S (sign flag), Z (zero flag), AC (auxillary carry flag), P (parity flag) & CY (carry flag)




– Sign Flag

• Used for indicating the sign of the data in the accumulator
• The sign flag is set if negative (1 – negative)
• The sign flag is reset if positive (0 –positive)





• Zero Flag

– Is set if result obtained after an operation is 0
– Is set following an increment or decrement operation of that register
10110011
+ 01001101
---------------
1 00000000


• Carry Flag

– Is set if there is a carry or borrow from arithmetic operation

1011 0101
+ 0110 1100
---------------
Carry 1 0010 0001


1011 0101
- 1100 1100
---------------
Borrow 1 1110 1001

• Auxillary Carry Flag

– Is set if there is a carry out of bit 3

• Parity Flag

– Is set if parity is even
– Is cleared if parity is odd

0 comments: