Part of a series on the | |
ALU | |
---|---|
Quick navigation | |
|
Type | Left | Right |
---|---|---|
Arithmetic shift | ||
Logical shift | ||
Rotate | ||
Rotate through carry |
0x123456
would be treated as a collection of three 8-bit fragments: 0x12
(MS), 0x34
, and 0x56
(LS). Since the size of a fragment exactly matches the ALU word size, the ALU can directly operate on this 'piece' of operand.|deadurl=
(help)Wikimedia Commons has media related to Arithmetic logic units. |
Selection | Active-low inputs & outputs | Active-high inputs & outputs | |||||
S3 | S2 | S1 | S0 | Logic (M = 1) | Arithmetic (M = 0) (Cn = 0) | Logic (M = 1) | Arithmetic (M = 0) (Cn = 1) |
0 | 0 | 0 | 0 | minus | |||
0 | 0 | 0 | 1 | minus | |||
0 | 0 | 1 | 0 | minus | |||
0 | 0 | 1 | 1 | Logical 1 | Logical 0 | ||
0 | 1 | 0 | 0 | plus | plus | ||
0 | 1 | 0 | 1 | plus | plus | ||
0 | 1 | 1 | 0 | minus minus | minus minus | ||
0 | 1 | 1 | 1 | minus | |||
1 | 0 | 0 | 0 | plus | plus | ||
1 | 0 | 0 | 1 | plus | plus | ||
1 | 0 | 1 | 0 | plus | |||
1 | 0 | 1 | 1 | minus | |||
1 | 1 | 0 | 0 | Logical 0 | plus | Logical 1 | plus |
1 | 1 | 0 | 1 | plus | plus | ||
1 | 1 | 1 | 0 | plus | plus | ||
1 | 1 | 1 | 1 | minus |
The earliest and most famous chip, the 74181 arithmetic logic unit (ALU), provided up to 32 functions of two 4-bit variables.
The study of computer architecture is often an abstract, paper exercise. Students cannot probe the inner workings of a single-chip microprocessor, and few discrete-logic machines are open to student inspection.