PICmicro MCUs contain an 8-bit ALU and an 8-bit working register.
The ALU is a general purpose arithmetic and logical unit.
It performs arithmetic and Boolean functions between the data in the working register and any register file.
The ALU is a general purpose arithmetic and logical unit.
It performs arithmetic and Boolean functions between the data in the working register and any register file.
Figure : Operation of the ALU and working register
Unless otherwise mentioned, arithmetic operations are two's complement in nature.
In two-operand instructions, typically one operand is the working register (W register).
The other operand is a file register or an immediate constant.
In single operand instructions, the operand is either the W register or a file register.
The working register is an 8-bit working register used for ALU operations.
It is not an addressable register.
Depending on the instruction executed, the ALU may affect the values of the Carry (C), Digit
Carry (DC), and Zero (Z) bits in the STATUS register.
The C and DC bits operate as a borrow bit and a digit borrow out bit, respectively, in subtraction.
No comments:
Post a Comment