4-Bit ALU

Official

Digital

·

Generic

·

Curated by CircuitSim

About this component

Transparent four-bit arithmetic logic unit with eight active-high operations selected by OP2:OP1:OP0. It provides F0–F3 plus Zero, Carry/no-borrow, and signed Overflow flags for undergrad datapath lessons.

Parameters

Logic levels
2 parameters
ParameterNameDescriptionDefault

VTH

Input threshold

Voltage at or above which each operand and opcode input is interpreted as logic high.

2.5 V

VHIGH

High output voltage

Voltage driven for every active logic-high result or flag output.

5 V

Pins

Pins
18 pins
NumberNameDescription

1

A0

Least-significant bit of four-bit operand A.

2

A1

Bit 1 of four-bit operand A.

3

A2

Bit 2 of four-bit operand A.

4

A3

Most-significant and two's-complement sign bit of operand A.

5

B0

Least-significant bit of four-bit operand B.

6

B1

Bit 1 of four-bit operand B.

7

B2

Bit 2 of four-bit operand B.

8

B3

Most-significant and two's-complement sign bit of operand B.

9

OP0

Least-significant opcode bit.

10

OP1

Middle opcode bit.

11

OP2

Most-significant opcode bit.

12

F0

Least-significant result bit.

13

F1

Result bit 1.

14

F2

Result bit 2.

15

F3

Most-significant and two's-complement sign bit of the result.

16

ZERO

Active-high flag indicating F3:F0 equals zero for every opcode.

17

CARRY

Arithmetic carry flag: carry-out for ADD/INC and active-high no-borrow for SUB/DEC; low for Boolean operations.

18

OVERFLOW

Active-high two's-complement signed-overflow flag for arithmetic operations; low for Boolean operations.

Public circuits using this component

No public circuits are using this component yet.

Drop 4-Bit ALU into your circuit

Official component · simulated with full SPICE accuracy · free to get started.