Arithmetic Logic Unit (ALU)
Digital System Logic
Project Background
The Arithmetic Logic Unit (ALU) is one of the fundamental building blocks of a computer's Central Processing Unit (CPU). For this academic project, I designed an ALU to perform essential arithmetic calculations by using switches to determine what outcome of a 4-bit binary number it wants. This was done by performing a truth table-like operation on two 4-bit binary numbers.
Functions Explained
- If the switches are 00(OFF,OFF): The ALU acts like an addition button, so it adds A + B.
- If the switch is 01 (OFF,ON): The ALU acts like an subtractor button, so it subtracts A - B.
- If the switch is 10 (ON,OFF): The ALU acts like an AND log gate, meaning if both numbers are 1 then it brings out an 1, otherwise an 0.
- If the switches are 11(ON,ON): The ALU acts like an OR logic gate, meaning that if one of the numbers in the operation is 1, then the output is 1.
Output of Operation
- Result (F3,F2,F1,F0): After doing whatever math or logic you told it to do, the machine spits out a final 4-bit answer, that gets displayed on the LED board.
Technologies & Hardware
DE10-Lite Intel FPGA
Digital Logic Gates
Binary Arithmetic