DIGITAL LOGIC LAB
4-BIT ARITHMETIC CIRCUIT LABORATORY Common Ripple Carry Adder with Multiplexed Operands (Total = A + Y + Cin)
Circuit Ready
Selection Lines ADDITION
Select S1 Toggle 0 / 1
Select S0 Toggle 0 / 1
S1 S0 Selected Y Cin Operation
00B0Addition (A + B)
01B̅1Subtraction (A + B̅ + 1)
1000001Increment (A + 1)
1111110Decrement (A - 1)
Operand A Input 0 to 15
A [A3:A0] 5 (0101)
A3 (MSB)
A2
A1
A0 (LSB)
Operand B Input 0 to 15
B [B3:B0] 3 (0011)
B3 (MSB)
B2
B1
B0 (LSB)
Active operand B
Stages:
1. MUX
→
2. FA0
→
3. FA1
→
4. FA2
→
5. FA3
→
6. Result
1.0s / stage
Single 4-Bit Arithmetic Circuit Architecture (Gate-Level Implementation)
Input A
Input Y (MUX)
Carry Chain
Control S1, S0
Logic 1
Logic 0
Circuit Output Results Digital Register
S3 (MSB)
1
S2
0
S1
0
S0 (LSB)
0
Cout
0
Decimal Result 8 4-Bit Vector Value
CARRY (C)
0
OVERFLOW (V)
0
ZERO (Z)
0
SIGN (S)
1
Full Adder Stage Gate Signals P, G, H, Sum, Cout
Stage A Y Cin P (A⊕Y) G (A·Y) Sum Cout
FA0 (LSB) 1 1 0 0 1 0 1
FA1 0 1 1 1 0 0 1
FA2 1 0 1 1 0 0 1
FA3 (MSB) 0 0 1 0 0 1 0
Total = A + Y + Cin = 5 + 3 + 0 = 8 | S[3:0] = 8 (Cout = 0)
Loading circuit calculations...
Verification Suite (1,024 Automated Test Cases) 100% PASSED (1,024 / 1,024 TESTS)
Exhaustive verification across all 16 values of A × 16 values of B for Addition, Subtraction, Increment, and Decrement.
Modular Python Implementation Architecture Repository Reference Code