Digital Logic
Pull-up sizing, RC edge times, CMOS power and logic fanout calculators, plus logic-family, pull-up and gate-symbol reference tables with wiring diagrams.
Open-Drain Pull-Up
RC Rise Time & Bandwidth
CMOS Dynamic Power
Logic Fanout
๐ Logic Diagrams
Open-drain bus pull-up, a CMOS inverter pair, a NAND gate with its truth table and a clocked D flip-flop.
Open-drain bus โ Every node can only pull the shared line low; when all transistors are off the pull-up Rp restores it to VDD. This wired-AND bus works for I2C, 1-Wire and reset lines.
CMOS inverter โ The PMOS pulls the output to VDD when Vin is low; the NMOS pulls it to GND when Vin is high. Only one transistor conducts at a time, so steady-state current is near zero.
NAND gate โ Output is low only when every input is high, and high otherwise. Universal in a sense: with a NAND you can build any other gate, which is why flash memories are made of them.
D flip-flop โ On every rising clock edge the output Q copies D and holds it until the next edge. Setup/hold times around the edge must be met: the input must be stable before tsu and held after th.
Tri-state bus โ Each driver can drive high, low or release (High-Z). Only one cell drives at a time; the others float so their outputs share a single wire without contention.
Push-pull vs open-drain โ A push-pull output actively drives both rails; an open-drain can only sink low and must be pulled up โ ideal for a shared bus or for level-shifting to a higher rail.
๐ Logic Reference Tables
Family electricals, pull-up/termination guidance and common gate functions. Values are typical at VDD = 5 V or 3.3 V โ confirm with each datasheet.
Logic Families (typical)
| Family | VCC | VIH | VIL | tpd | IO | CMOS out |
|---|---|---|---|---|---|---|
| 74LS / TTL | 5 V | 2.0 V | 0.8 V | ≈10 ns | ±0.4 mA | needs pull-up |
| 74HC | 2–6 V | 0.7·VCC | 0.3·VCC | 7–20 ns | ±4 mA | full rail CMOS |
| 74HCT | 4.5–5.5 V | 2.0 V | 0.8 V | 8–20 ns | ±4 mA | TTL input, CMOS out |
| 74LVC | 1.65–3.6 V | 0.6·VCC | 0.3·VCC | 2–4 ns | ±16–24 mA | fast, 3.3 V |
| 74AHC | 2–5.5 V | 0.65·VCC | 0.35·VCC | 3–8 ns | ±8 mA | fast, drive |
| CD40xx | 3–15 V | 0.7·VDD | 0.3·VDD | 30–120 ns | ±1–6 mA | slow, high swing |
Pull-up & Termination
| Item | Common value | Use |
|---|---|---|
| I2C pull-up | 1–4.7 kΩ | bus capacitance trades with speed |
| SPI / GPIO pull-up | 10 kΩ | idle state, default weak |
| Reset pull-up | 10 kΩ | keep MCU out of reset |
| LED resistor | 330–1 kΩ | limit diode current |
| Series termination | 22–50 Ω | match Z0, damp ringing |
Common Gate Functions
| Symbol | Output rule | Typical use |
|---|---|---|
| AND | Y = AยทB | gating / enable, all-high conditions |
| OR | Y = A+B | any-one triggers, combiner |
| NAND | Y = AยทB | universal gate, memory cells |
| NOR | Y = A+B | universal gate, active-low logic |
| XOR | Y = A⊕B | parity, comparator, adder |