Chapter 2: Combinational Logic Circuits
Introduction
Combinational logic circuits are the foundation of all decision-making in digital systems. Unlike sequential circuits, combinational circuits produce outputs solely based on current input values. They do not rely on any internal memory or past states. This chapter explores a variety of fundamental combinational logic structures essential for digital design.
You'll learn how these circuits operate, how to analyze and implement them, and how they are applied in computing hardware like CPUs, memory decoders, ALUs, and more.
2.1 Basic Logic Gates
Logic gates are the building blocks of digital circuits. Each gate performs a basic logical operation on one or more binary inputs to produce a single binary output.
Gate | Symbol | Function | Expression |
---|---|---|---|
AND | ∧ | True if both A and B are 1 | A ∧ B |
OR | ∨ | True if A or B is 1 | A ∨ B |
NOT | ¬ | Inverts the input | ¬A |
XOR | ⊕ | True if A ≠ B | A ⊕ B |
2.2 Adders and Subtractors
Adders are used to perform binary addition. The two most basic types are half adders and full adders.
Half Adder
Adds two bits: A and B.
- Sum = A ⊕ B
- Carry = A ∧ B
Full Adder
Adds three bits: A, B, and Carry-In (Cin).
- Sum = A ⊕ B ⊕ Cin
- Cout = (A ∧ B) ∨ (Cin ∧ (A ⊕ B))
2.3 Multiplexers and Demultiplexers
Multiplexers (MUX) select one input from many and forward it to the output. Demultiplexers (DEMUX) take a single input and route it to one of many outputs.
See the detailed section earlier in this chapter.
2.4 Decoders and Encoders
A decoder takes an n-bit input and activates exactly one of 2n outputs. It is used to enable memory, select data lines, etc.
An encoder does the opposite—it takes multiple inputs and encodes the active one into binary.
Example: 2-to-4 Decoder
I1 | I0 | Output |
---|---|---|
0 | 0 | Y0 = 1 |
0 | 1 | Y1 = 1 |
1 | 0 | Y2 = 1 |
1 | 1 | Y3 = 1 |
2.5 Comparators
A comparator checks the relationship between two binary numbers and determines if one is greater than, less than, or equal to the other. These are frequently used in control logic and conditional branching.
A = B
: Output HIGH if all bits matchA > B
: Output HIGH if the leftmost unmatched bit in A is 1A < B
: Output HIGH if the leftmost unmatched bit in B is 1
2.6 Arithmetic Logic Units (ALUs)
An ALU is a digital circuit that performs arithmetic and logical operations on binary numbers. It can perform addition, subtraction, AND, OR, and other bitwise operations depending on control inputs.
- Inputs: Two operands (A, B), and function select lines
- Output: Result of the operation
- Status Flags: Zero, Carry, Overflow, Negative, etc.
Summary
In this chapter, you explored the essential components of combinational logic circuits:
- Basic logic gates that form the foundation of all digital operations
- Binary adders and subtractors for arithmetic
- Multiplexers and demultiplexers for data routing
- Decoders and encoders for address translation and signal selection
- Comparators to evaluate magnitude
- ALUs that combine multiple functions into a powerful processing unit
Mastery of these topics prepares you for understanding sequential logic, memory systems, and processor design in later chapters.
🧪 MicroSim
✅ Quiz: Check Your Understanding
1. What logic gate outputs 1 only when both inputs are 1?
- A) OR
- B) XOR
- C) AND
- D) NOT
Show Answer
Correct answer: C) AND
Explanation: The AND gate only outputs 1 when all inputs are 1.
2. What is the sum output of a half adder for A = 1, B = 1?
- A) 0
- B) 1
- C) Undefined
- D) 2
Show Answer
Correct answer: A) 0
Explanation: Sum = A ⊕ B = 1 ⊕ 1 = 0
3. What is the purpose of a decoder in a digital circuit?
- A) Compress multiple signals into fewer lines
- B) Route one input to many outputs
- C) Select one output line based on input combination
- D) Compare binary values
Show Answer
Correct answer: C) Select one output line based on input combination
Explanation: A decoder activates a single output based on its binary input.
4. Which operation is NOT typically performed by an ALU?
- A) Addition
- B) Bitwise AND
- C) Memory storage
- D) Subtraction
Show Answer
Correct answer: C) Memory storage
Explanation: Memory storage is handled by memory units, not the ALU.