Complex Logic Circuit Demo
Advanced multi-gate circuit using XNOR, AND, and various constants. Complex boolean logic implementation for advanced learners.
您将学到什么
- Trace signals through multi-stage combinational circuits.
- Convert a gate-level circuit into its Boolean expression.
- Build the truth table for a 4-input combinational network.
- Recognise that multi-level Boolean networks can be simpler than 2-level SOPs.
- Apply Karnaugh maps to simplify the resulting expressions.
工作原理
This circuit demonstrates composition of multiple combinational stages — chains of AND, OR, NOT, XOR gates working together to compute a more elaborate Boolean function. Each gate's output feeds the next stage, building a multi-level network.
Reading the circuit: 1. Start at the inputs and trace each signal through every gate it touches. 2. Write down the intermediate signal at each gate's output as a Boolean expression in the inputs. 3. The final output is the topmost expression — typically a sum-of-products or a more complex hierarchy.
For a circuit with 4 inputs, the truth table has 2⁴ = 16 rows. Filling in each row by tracing through the gates is the mechanical way to verify behaviour. Boolean simplification (Karnaugh maps, algebraic manipulation, or synthesis tools) shows whether the multi-stage circuit could be flattened into a smaller equivalent.
This kind of multi-stage composition is the bread-and-butter of combinational design: every Boolean function can be expressed as a 2-level SOP (sum of products) network, but multi-level networks are usually smaller, just slower (more gate delays).
真值表
Multi-stage circuits' truth tables follow from systematic gate-by-gate evaluation. Showing representative rows.
| 输入 | 输出 | |||||
|---|---|---|---|---|---|---|
| A | B | C | D | Y1 | Y2 | |
| 0 | 0 | 0 | 0 | 0 | 0 | All inputs low — outputs default |
| 1 | 1 | 0 | 0 | 1 | 0 | AB term fires Y1 |
| 0 | 0 | 1 | 1 | 0 | 1 | CD term fires Y2 |
| 1 | 1 | 1 | 1 | 1 | 1 | Both halves active — both outputs high |
布尔表达式
Sum of two product/XOR terms — multi-level expression with mixed gates.
AND of inverted-OR with another AND — three levels of logic.
逐步尝试
在上方嵌入式电路中设置输入,然后阅读预期结果并验证。
- 1A = 0 B = 0 C = 0 D = 0预期:
Y1=0, Y2=0您将看到: All inputs low — neither output fires. Default state. - 2A = 1 B = 1 C = 0 D = 0预期:
Y1=1, Y2=0您将看到: AB term wins — Y1 fires. The other half (C and D) is dormant. - 3A = 0 B = 0 C = 1 D = 1预期:
Y1=0, Y2=1您将看到: CD term wins on Y2; the XOR(C,D) is 0 (both high) so Y1 stays low. - 4A = 1 B = 1 C = 1 D = 1预期:
Y1=1, Y2=0您将看到: Both halves active. Y1 fires (AB true). Y2 doesn't fire because A+B is true → its inverted-OR is false → AND is false.
使用的组件
实际应用
ALU control logic. Decoding the operation field of an instruction into per-stage enables for adder, shifter, and logic units uses multi-stage Boolean networks.
Address decoders with enables. Multi-level decoders combine address bits, chip-select inputs, and bus-master enables to produce per-bank write strobes.
Permission and access logic. "Permit if (admin AND not-during-lockout) OR (owner AND read-only)" compiles into multi-stage Boolean networks.
Fault aggregation. "Critical fault if any of these specific subsets are tripped" — sums of products of fault flags.
Configuration logic. Hardware that selects between multiple modes based on configuration bits often has 4–6 input multi-level decision logic.