Module 1: Foundations of Digital Logic · 1.5 Combinational Logic Building Blocks

Designing with Building Blocks

This article completes Module 1: Foundations of Digital Logic. In previous articles, we designed individual combinational blocks: multiplexers, decoders, encoders, and comparators. This article explains how digital designers assemble these modular blocks into larger computational architectures. We analyze abstraction hierarchies, decompose a 4-bit Arithmetic Logic Unit (ALU), and evaluate shared bus topologies.

Hierarchical Abstraction in Digital Design

Complex digital systems contain millions of logic gates. Engineers manage this complexity through hierarchical abstraction. Instead of designing with individual NAND and NOR gates, engineers treat circuits as functional building blocks with defined interfaces.

A multiplexer is not viewed merely as a collection of AND-OR gates. At the architecture level, a multiplexer is a data routing element characterized by:

  1. Input-to-output propagation delay.
  2. Select-to-output propagation delay.
  3. Word bit-width.
  4. Functional behavior ($Y = \text{select} \ ? \ B : A$).

Hardware Description Languages (HDLs) such as Verilog and SystemVerilog enforce this abstraction. A designer defines an interface using port lists (input, output) inside a module definition. The designer can instantiate this module throughout a system without exposing internal gate networks. Automated synthesis tools translate the behavioral description into logic gates.

System Decomposition: A 4-Bit Arithmetic Logic Unit (ALU)

To demonstrate architectural decomposition, we design a 4-bit Arithmetic Logic Unit (ALU) based on a functional specification.

Functional Specification

The ALU accepts two 4-bit data operands ($A$ and $B$) and a 3-bit operation code (opcode[2:0]). It computes a 4-bit result (Y[3:0]) based on Table 1:

Opcode ([2:0]) Operation Description
000 $A + B$ Unsigned binary addition
001 $A - B$ Unsigned binary subtraction ($A + \overline{B} + 1$)
010 $A$ Pass operand $A$ directly
011 $A \ & \ B$ Bitwise AND
100 $A \ | \ B$ Bitwise OR
101 $A \oplus B$ Bitwise XOR
110 $A = B$ Equality comparison (0001 if equal, else 0000)
111 $A > B$ Magnitude comparison (0001 if greater, else 0000)

Structural Block Decomposition

We partition the system into modular sub-blocks:

  1. Adder/Subtractor Unit: Computes $A + B$ and $A - B$. Subtraction uses two’s complement inversion: $A + \overline{B} + 1$. An inverter and a control line toggle the addition/subtraction mode.
  2. Bitwise Logic Units: Implement parallel bitwise operations using dedicated AND, OR, and XOR gates.
  3. Magnitude and Equality Comparators: Implement comparison logic using the MSB-first techniques developed in Section 1.5.4.
  4. Output Multiplexer: An 8-to-1 4-bit multiplexer selects the final output based on opcode[2:0].

Figure 1 shows the system block diagram:

ALU block diagram
Figure 1: 4-bit ALU block diagram with parallel functional blocks and output multiplexer

All functional blocks evaluate their results in parallel. The 8-to-1 multiplexer routes the requested operation result to output Y. Decomposing the architecture into modular blocks allows engineering teams to design, optimize, and test sub-blocks independently.

Levels of Hardware Hierarchy

Table 2 outlines the standard levels of hardware hierarchy used in digital engineering:

Abstraction Level Primary Components Implementation Medium
Transistor Level NMOS and PMOS switches Silicon diffusion and polysilicon
Standard Cell Level NAND, NOR, inverters, D-flip-flops Transistor layouts
Functional Block Level Adders, multiplexers, decoders Interconnected standard cells
Subsystem Level ALUs, register files, cache controllers Interconnected functional blocks
System-on-Chip (SoC) CPU cores, GPUs, memory controllers Integrated on-chip subsystems
System Level Microprocessors, DRAM modules, motherboards Printed Circuit Boards (PCBs)

Each hierarchical layer encapsulates internal implementation details. System architects design microprocessor datapaths without directly manipulating silicon standard cells.

Shared System Bus Architectures and Tri-State Buffers

Connecting $N$ independent hardware modules directly with dedicated point-to-point connections requires $O(N^2)$ signal lines. To conserve routing area, systems use a shared communication bus. A bus consists of a common set of wires shared among multiple transmitting and receiving devices.

If two devices drive conflicting logic levels (logic 0 and logic 1) onto a shared wire simultaneously, electrical contention occurs. This creates low-resistance paths between power supplies and ground, causing device overheating and signal corruption. Systems resolve contention using tri-state buffers (Section 1.3). A tri-state buffer provides three states: logic high (1), logic low (0), and high-impedance ($Z$). In the $Z$ state, the buffer output disconnects electrically from the wire.

Figure 2 shows a shared system bus controlled by an address decoder:

Bus with tri-state drivers
Figure 2: Shared bus architecture with tri-state drivers controlled by an address decoder

The address decoder enables exactly one tri-state driver at a time. All inactive devices remain in the high-impedance state.

Modern ASIC and FPGA devices avoid internal tri-state buses because high-impedance lines complicate static timing analysis and automated test pattern generation. Instead, on-chip designs use wide multiplexers to combine parallel signals. Tri-state buffers remain standard for external physical chip interfaces.

Summary of Module 1: Foundations of Digital Logic

Module 1 established the theoretical and physical foundations of digital systems:

  1. Number Systems (Section 1.1):
    • Binary, octal, decimal, and hexadecimal representations.
    • Fixed-width two’s complement signed arithmetic and overflow detection.
  2. Boolean Algebra (Section 1.2):
    • Axiomatic identities, Boolean theorems, and the principle of duality.
    • De Morgan’s laws and canonical Sum-of-Products (SOP) and Product-of-Sums (POS) representations.
  3. Logic Gates (Section 1.3):
    • Operation of basic gates (AND, OR, NOT) and compound gates (NAND, NOR, XOR, XNOR).
    • Functional universality of NAND and NOR gates in CMOS transistor implementations.
  4. Karnaugh Maps & Minimization (Section 1.4):
    • Gray-code geometric mapping and boundary wrap-around minimization.
    • Exploitation of don’t-care conditions and algorithmic reduction using the Quine-McCluskey method.
  5. Combinational Building Blocks (Section 1.5):
    • Multiplexers, decoders, priority encoders, and magnitude comparators.
    • Universal function generation and FPGA Look-Up Table (LUT) architectures.

Core Competencies and Knowledge Checklist

Verify your mastery of Module 1 concepts using the following checklist:

  • Number Representation: Convert numbers between binary, decimal, and hexadecimal bases. Calculate two’s complement signed values and detect arithmetic overflow.
  • Boolean Simplification: Apply De Morgan’s laws to expand and simplify complex logic equations. Prove circuit equivalence algebraically.
  • Gate Universality: Construct arbitrary Boolean functions using only NAND or NOR gate topologies.
  • Karnaugh Maps: Construct 2-, 3-, and 4-variable Karnaugh maps from minterm specifications. Identify essential prime implicants and apply don’t-care states.
  • Combinational Design: Implement logic functions using multiplexers and decoders. Formulate priority encoder equations with valid flags. Design equality and MSB-first magnitude comparators.
  • Architectural Decomposition: Partition multi-function logic specifications into parallel functional blocks routed by multiplexer networks.

Practice Exercises

Problem 1: A 4-bit ALU supports four operations: ADD, AND, OR, and PASS_A. The unit uses a 4-to-1 multiplexer to select the output. Specify the signal connections to each multiplexer input and identify the select line inputs.

View Solution
  • Input $I_0$: 4-bit output of the binary adder ($A + B$).
  • Input $I_1$: 4-bit output of the bitwise AND unit ($A \ & \ B$).
  • Input $I_2$: 4-bit output of the bitwise OR unit ($A \ | \ B$).
  • Input $I_3$: 4-bit operand $A$ connected directly (PASS_A).
  • Select Lines: 2-bit operation code (opcode[1:0]) connected to select inputs $S_1$ and $S_0$.

Because the datapath is 4 bits wide, this configuration represents four 4-to-1 multiplexers operating in parallel under a shared 2-bit select bus.

Problem 2: Three peripheral devices connect their outputs to a shared 4-bit data bus without tri-state buffers. Explain the electrical and logical consequences.

View Solution

If multiple devices drive a shared wire without tri-state isolation, signal contention occurs. When one device attempts to drive logic 1 ($V_{DD}$) while another device attempts to drive logic 0 ($GND$), a direct low-resistance path connects power to ground through the conducting transistors. This causes:

  1. Excessive current draw and thermal damage to output buffer stages.
  2. Intermediate voltage levels that fail to meet logic threshold margins ($V_{IL}, V_{IH}$).
  3. Logic evaluation errors reported as undefined states ($X$) during digital simulation.

Problem 3: Explain why a 4-input FPGA Look-Up Table (LUT4) can be modeled as a 16-to-1 multiplexer.

View Solution

A 4-input Boolean function produces $2^4 = 16$ truth table output bits. An FPGA LUT4 stores these 16 output bits in static RAM (SRAM) memory cells. The 16 SRAM outputs connect directly to the 16 data inputs of an internal 16-to-1 multiplexer. The four logic input variables drive the four multiplexer select lines. When an input address is applied, the multiplexer passes the stored SRAM bit at that address to the output pin. Therefore, a single LUT4 can implement any 4-variable Boolean function without changing physical wiring.

In Module 2, we begin arithmetic circuit design. We start with half adders and full adders, and build high-speed ripple-carry and carry-lookahead arithmetic units.

← Comparators