Combinatorial Logic - Logic Without Memory
đĄ What Is Combinatorial Logic?â
Combinatorial logic circuits are circuits where the output depends only on the current inputs. There is no memory or state - past inputs don't affect the current output.
Think of it like a calculator: you put in numbers, press a button, and get an immediate result based only on your current inputs.
đ§ Common Combinational Circuitsâ
Multiplexers (MUX)â
A multiplexer selects one of several input signals and forwards it to a single output. It's like a switch with multiple positions!
- 2-to-1 MUX: Selects between 2 inputs
- 4-to-1 MUX: Selects between 4 inputs
Demultiplexers (DEMUX)â
A demultiplexer takes a single input and routes it to one of several outputs. It's the opposite of a multiplexer!
Decodersâ
A decoder takes a binary number and activates one specific output line corresponding to that number.
Example: 3-to-8 decoder takes a 3-bit input and activates one of 8 outputs.
Encodersâ
An encoder is the opposite of a decoder. It takes multiple input lines and generates a binary code representing which input is active.
Addersâ
Adders are combinational circuits that perform binary addition.
- Half Adder: Adds two 1-bit numbers, produces sum and carry
- Full Adder: Adds two 1-bit numbers plus carry-in, produces sum and carry-out
- Ripple Carry Adder: Chains full adders to add larger numbers
Comparatorsâ
Comparators compare two binary numbers and output whether they are equal, greater than, or less than each other.
đ Designing Combinational Logicâ
Step 1: Create a Truth Tableâ
Define what output you want for each possible input combination.
Step 2: Simplify the Logicâ
Use techniques like Karnaugh Maps (K-Maps) or Boolean Algebra to simplify the logic expression.
Step 3: Implement with Logic Gatesâ
Build the circuit using the simplified logic expression.
The key property of combinational logic is that it is stateless - there are no feedback loops. This means:
- The output at any time is solely determined by the inputs at that time
- No memory elements are involved
- Signal propagates from inputs to outputs without delay (in theory)
In practice, real circuits have propagation delays, but the logic function itself is memoryless.
đ Classroom Exampleâ
Build a Simple Alarm System:
Inputs:
- Window sensor (0=closed, 1=open)
- Door sensor (0=closed, 1=open)
- Alarm enable switch (0=off, 1=on)
Output:
- Alarm (0=off, 1=on)
Logic: Alarm = (Window OR Door) AND Enable
This simple system uses OR and AND gates and is a great example of combinational logic in action!
đĄ Summaryâ
- Combinational logic: Output depends only on current inputs
- Stateless: No memory, no feedback loops
- Common circuits: Multiplexers, decoders, adders, comparators
- Design process: Truth table â Simplification â Gate implementation