You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project involves redesigning the 74181 4-bit ALU at the functional level as part of the Verilog learning process. The logic circuits were constructed according to each function, and the transistor-level circuit was implemented using Logisim simulation.
The newly designed ALU provides the same functions as the 74181 ALU but differs in the function arrangement based on the selection signals defined in the datasheet. A new arrangement was designed with optimization at both the logic and transistor levels in mind.
Circuit
Input
S : Selection - 4 bit
M : Mode - 1 bit
A : Number A - 4 bit
B : Number B - 4 bit
C_in : Carry In - 1 bit
S (Selection, 4-bit)
A 4-bit selection signal that determines which operation to perform.
It ranges from 0000 to 1111 (16 different operations).
If M=1, logical operations are performed.
If M=0, arithmetic operations are performed.
M (Mode, 1-bit)
A mode selection signal.
M=1 → Logical operation mode.
M=0 → Arithmetic operation mode.
A (Number A, 4-bit)
A 4-bit operand.
Used as a primary input in most operations.
B (Number B, 4-bit)
A 4-bit operand.
Used as a secondary input in some operations.
C_in (Carry In, 1-bit)
A carry-in signal.
Only affects arithmetic operations (M=0).
If C_in=0, normal addition/subtraction is performed.
If C_in=1, operations consider an initial carry.
Output
F : Output Number - 4 bit
same : Same Flag - 1 bit
C_out : Carry Out - 1 bit
GG : Group G - 1 bit (CLA)
GP : Group P - 1 bit (CLA)
F (Output Number, 4-bit)
The final result of the operation.
It stores the result of either a logical or an arithmetic operation.
same (Same Flag, 1-bit)
Indicates whether A and B are equal.
same = 1 → A and B are the same.
same = 0 → A and B are different.
C_out (Carry Out, 1-bit)
Represents the carry-out (or borrow in subtraction) from an arithmetic operation.
Only meaningful when M=0 (arithmetic mode).
It signals an overflow from addition or a borrow from subtraction.
GG (Group Generate, 1-bit, CLA)
A signal used in the Carry Lookahead Adder (CLA) to indicate group carry generation.
GG = 1 → A carry is always generated within the group.
GG = 0 → No carry is generated in the group.
GP (Group Propagate, 1-bit, CLA)
A signal used in the CLA to indicate group carry propagation.
GP = 1 → The group may propagate a carry from the previous stage.