HD6417660 RENESAS [Renesas Technology Corp], HD6417660 Datasheet - Page 159

no-image

HD6417660

Manufacturer Part Number
HD6417660
Description
Renesas 32-Bit RISC Microcomputer
Manufacturer
RENESAS [Renesas Technology Corp]
Datasheet
Negative Value Mode: CS[2:0] = B'001: The DC flag indicates the same value as the MSB of the
operation result. When the result is a negative number, the DC bit shows 1. When it is a positive
number, the DC bit shows 0. The ALU always executes 40-bit arithmetic operation, so the sign bit
to detect whether positive or negative is always got from the MSB of the operation result
regardless of the destination operand. Some examples are shown in figure 3.12.
Zero Value Mode: CS[2:0] = B'010: The DC flag indicates whether the operation result is 0 or
not. When the result is 0, the DC bit shows 1. When it is not 0, the DC bit shows 0.
Overflow Mode: CS[2:0] = B'011: The DC bit indicates whether or not overflow occurs in the
result. When an operation yields a result beyond the range of the destination register, except the
guard-bit parts, the DC bit is set. Even though guard bits are provided in the destination register,
the DC bit always indicates the result of when no guard bits are provided. So, the DC bit is always
Figure 3.11 DC Bit Generation Examples in Carry or Borrow Mode
Figure 3.12 DC Bit Generation Examples in Negative Value Mode
+)
–)
+)
0000
0000
0000 0001 0000 0000 0000 0000
0000
0000
0000 0000 0000 0000 0000 0000
Guard bits
Guard bits
1100
0000
1100 0000 0000 0000 0000 0001
Guard bits
Borrow is not detected
0000
0000
0000
0000
Carry is detected
0000
0000
Sign bit
Example 1
Example 3
Negative value
1111
0000
0000
0000
Example 1
0000
0000
1111
0000
0000
0000
Carry detecting point
Borrow detecting point
0000
0000
1111
0000
0000
0000
0000
0000
1111
0001
0001
0001
0000
0001
+)
(1)
–)
+)
Guard bits
1111
0011
0011
Guard bits
0000
0000
111111111111111111111111
Guard bits
0011
0000
0011 0000 1000 0000 0000 0001
Carry is not detected
1111
1111
11101000 0000 0000 0000
0000
0000
Borrow is detected
0000
0000
Sign bit
Example 2
Example 4
0111
0001
0001
0001
Positive value
Example 2
0000
1000
Rev. 1.00, 02/04, page 121 of 804
0000
0000
0000
0000
Carry detecting point
Borrow detecting point
0000
0000
0000
0000
0000
0000
0000
0000
0000
0000
0001
0010
0000
0001

Related parts for HD6417660