CHAPTER 11 ARITHMETIC AND LOGIC UNIT
The ALU is used for performing arithmetic operations, logical operations, bit evaluations, comparison evaluations,
and rotations on 4-bit data.
11.1 ALU BLOCK CONFIGURATION
Figure 11-1 shows the configuration of the ALU block.
As shown in Figure 11-1, the ALU block consists of the main 4-bit data processor, temporary registers A and B,
the status flip-flop for controlling the status of the ALU, and the decimal conversion circuit for use during arithmetic
operations in BCD.
As shown in Figure 11-1, the status flip-flop consists of the following flags: Zero flag FF, carry flag FF, compare
flag FF, and the BCD flag FF.
Each flag in the status flip-flop corresponds directly to a flag in the program status word (PSWORD: addresses
7EH, 7FH) located in the system register. The flags in the program status word are the following: Zero flag (Z), carry
flag (CY), compare flag (CMP), and the BCD flag (BCD).
11.2 FUNCTIONS OF THE ALU BLOCK
Arithmetic operations, logical operations, bit evaluations, comparison evaluations, and rotations are performed
using the instructions in the ALU block. Table 11-1 lists each arithmetic/logical instruction, evaluation instruction,
and rotation instruction.
By using the instructions listed in Table 11-1, 4-bit arithmetic/logical operations, evaluations and rotations can be
performed in a single instruction. Arithmetic operations in decimal can also be performed in a single instruction.
11.2.1 Functions of the ALU
The arithmetic operations consists of addition and subtraction. Arithmetic operations can be performed on the
contents of the general register and data memory or on immediate data and the contents of data memory. Operations
in binary are performed on four bits of data operations in decimal are performed on one place (BCD operation).
Logical operations include ANDing, ORing, and XORing. Their operands can be general register contents and data
memory contents, or data memory contents and immediate data.
Bit evaluation is used to determine whether bits in 4-bit data in data memory are 0 or 1.
Comparison evaluation is used to compare contents of data memory with immediate data. It is used to determine
whether one value is equal to or greater than the other, less than the other, or if both values are equal or not equal.
Rotation is used to shift 4-bit data in the general register one bit in the direction of its least significant bit (rotation
to the right).
85
Summary of Contents for mPD17120 Subseries
Page 15: ... x MEMO ...
Page 23: ... MEMO 8 ...
Page 45: ... MEMO 30 ...
Page 49: ... MEMO 34 ...
Page 55: ... MEMO 40 ...
Page 93: ... MEMO 78 ...
Page 99: ... MEMO 84 ...
Page 102: ...CHAPTER 11 ARITHMETIC AND LOGIC UNIT 87 MEMO ...
Page 119: ... MEMO 104 ...
Page 175: ... MEMO 160 ...
Page 199: ... MEMO 184 ...
Page 265: ... MEMO 250 ...
Page 281: ...266 MEMO ...
Page 285: ... MEMO 270 ...
Page 289: ... MEMO 274 ...