The component bar contains Arithmetic and Logic Unit (ALU) components, which are available in 8, 16, and 32-bit sizes, as shown in the figure below.
The symbols below represent ALUs when placed in the schematic.
The functions of ALUs, which remain consistent across all bit sizes, are detailed in the table below.
Deeds - Arithmetic and Logic Units ('ALU 8', 'ALU 16' and 'ALU 32') |
||
ALU 8:
A = A07..A00, B = B07..B00, F = F07..F00
S4 .. S0:
Function Selection lines |
||
S4 .. S0 |
Function |
Notes |
00000 |
F = 0 |
|
00001 |
F = +1 |
|
00010 |
F = -1 |
|
00011 |
F = - Negative Minimum |
-231 (32-bits version), -215 (16-bits v.), or -27 (8-bits v.) |
00100 |
F = A |
|
00101 |
F = B |
|
00110 |
F = not A |
Ones’ complement of A |
00111 |
F = not B |
Ones’ complement of B |
01000 |
F = A and B |
(Bitwise) |
01001 |
F = A and (not B) |
(Bitwise) |
01010 |
F = (not A) and B |
(Bitwise) |
01011 |
F = A nor B |
(Bitwise) |
01100 |
F = A or B |
(Bitwise) |
01101 |
F = A or (not B) |
(Bitwise) |
01110 |
F = (not A) or B |
(Bitwise) |
01111 |
F = A nand B |
(Bitwise) |
10000 |
F = A exor B |
(Bitwise) |
10001 |
F = not (A exor B) |
(Bitwise) |
10010 |
F = (not A) + 1 |
Two’s Complement of A |
10011 |
F = (not B) + 1 |
Two’s Complement of B |
10100 |
F = A + 1 |
Increment of A |
10101 |
F = B + 1 |
Increment of B |
10110 |
F = A - 1 |
Decrement of A |
10111 |
F = B – 1 |
Decrement of B |
11000 |
F = A + B |
Addition |
11001 |
F = A + B + Ci |
Addition, with carry input |
11010 |
F = Sat(A + B) |
Addition, with saturation |
11011 |
F = A - B |
Subtraction |
11100 |
F = A - B – Ci |
Subtraction, with borrow input |
11101 |
F = Sat(A - B) |
Subtraction, with saturation |
11110 |
F = B – A |
Reverse subtraction |
11111 |
F = B - A – Ci |
Reverse subtraction, with borrow input |
Below is a test circuit of a 16-bit ALU. Click the figure to open it in the Deeds-DcS.