1. Combinational vs. Sequential Circuits

Definition – Combinational Circuit

A combinational circuit is made of logic gates whose outputs at any time depend only on the present inputs. It is fully specified by a set of Boolean functions.

It has inputs, outputs, and switching functions, each mapping the input combinations to one output.

flowchart LR
    I["m Boolean inputs"] --> C["Combinational<br/>logic circuit"] --> O["n Boolean outputs"]

Definition – Sequential Circuit

A sequential circuit adds storage elements (memory). Its outputs depend on the inputs and the stored state — which depends on past inputs — so its behaviour is described by a time sequence of inputs and internal states.

CombinationalSequential
Memorynonestorage elements
Output depends onpresent inputspresent inputs + past inputs (state)
Specified byBoolean functions / truth tablesequence of inputs and states

2. Functional Blocks

Designers reuse a few standard circuits as building blocks: decoders, encoders, multiplexers, code converters, arithmetic circuits. They are common in real designs, simplify the design process, and support hierarchy and replication.

Rudimentary Functions of One Variable

FunctionNameImplementation
00value fixingtie to ground
11value fixingtie to /
01transferringwire
10invertinginverter

Enabling Functions

  • Enabling lets an input pass through to the output.
  • Disabling blocks it and replaces it with a fixed value.
EN (disabled → 0) (disabled → 1)
0–01
1000
1111

XENF = X·ENXENF = X + EN’disabled → 0disabled → 1


3. Decoders

Definition – Decoding

Decoding converts an -bit input code into an -bit output code, with , such that each valid input gives a unique output. An -to--line decoder typically has inputs and outputs; the output whose index equals the input code is 1 and all others are 0 (one-hot code). In other words, a decoder generates the minterms of its inputs.

1-to-2-Line Decoder

010
101

, .

2-to-4-Line Decoder

001000
010100
100010
110001

when : , , , .

It is made of two 1-to-2-line decoders (the inverters) and 4 AND gates:

A1A0A1’A0’D0 = A1’A0’D1 = A1’A0D2 = A1A0’D3 = A1A0

Decoder Expansion

Larger decoders are built from smaller ones by splitting the inputs as evenly as possible and ANDing every output of one with every output of the other:

DecoderBuilt fromOutput ANDs
3-to-82-to-4 + 1-to-28
4-to-162-to-4 + 2-to-416
6-to-643-to-8 + 3-to-864 ()
7-to-1284-to-16 + 3-to-8128
flowchart LR
    A0["A0"] --> D24["2-to-4 decoder<br/>(A1,A0)"]
    A1["A1"] --> D24
    A2["A2"] --> D12["1-to-2 decoder<br/>(A2)"]
    D24 -->|"4 minterms"| G["8 two-input ANDs"]
    D12 -->|"A2', A2"| G
    G --> O["D0 … D7"]

Implementing Functions with a Decoder + OR

Since a decoder produces all minterms and every function is a sum of minterms, OR the decoder outputs of the function’s minterms.

Example –

4-to-16decoder2³A2²B2¹C2⁰D0123456789101112131415F = Σm(2,3,8,9,14,15)

⚠️ “Is this a good idea?” — a 4-to-16 decoder (16 four-input ANDs) to use only 6 outputs is wasteful. A K-map gives : three 3-input ANDs and one OR. Decoder + OR pays off when several functions share the same decoder.

Decoder with Enable

Add an enable input EN to every output AND. When EN = 0 all outputs are 0; when EN = 1 the decoder works normally.

EN
0XX0000
1001000
1010100
1100010
1110001

(X = 0 or 1; a row with two X stands for four input combinations.)

Viewed differently, the value of EN is routed to one of the four outputs selected by — the circuit is then a demultiplexer.

Example – Enable Used for Expansion

A 3-to-8 decoder from two 2-to-4 decoders with enable: enables one decoder (through an inverter) and the other directly; go to both. For : the upper decoder is enabled with input 00 → , all others 0.

flowchart LR
    A2["A2"] -->|"A2'"| E0["2-to-4 (EN)<br/>→ D0–D3"]
    A2 -->|"A2"| E1["2-to-4 (EN)<br/>→ D4–D7"]
    A10["A1 A0"] --> E0
    A10 --> E1

4. Encoders

Definition – Encoding

Encoding is the opposite of decoding: an -bit input code → an -bit output code (). An encoder has (or fewer) inputs and outputs; typically it converts a one-hot input into the binary index of the active line.

Example 1 – 8-to-3 Binary Encoder

Inputs (one-hot), outputs = binary index of the 1. E.g. → .

Each output bit ORs the inputs whose index has a 1 in that bit:

D1D3D5D7A0D2D3D6D7A1D4D5D6D7A2

Example 2 – Decimal-to-BCD Encoder

Inputs (one-hot), outputs (BCD). Rule: appears in if bit of is 1.

⚠️ A plain encoder gives garbage if more than one input is 1 (e.g. and → ), and gives the same output as “no input”. The priority encoder fixes both problems.

Priority Encoder

Accepts any input combination: among the active inputs it encodes the highest-priority one (most significant here). An extra output (valid) = 1 when at least one input is 1.

Example – 5-Input Priority Encoder ( highest)

# minterms
100000XXX0
1000010001
20001X0011
4001XX0101
801XXX0111
161XXXX1001

Input X’s mean 0 or 1, so each row is a product term; the rows cover all minterms. Reading the equations directly from the table:

(The simplified forms use .)


5. Multiplexers

Definition – Multiplexer (MUX)

A multiplexer selects one of several information inputs and routes it to a single output. It has:

  • selection inputs ,
  • information inputs ,
  • one output : when .

2-to-1-Line MUX

SI0I1Y = S’I0 + S·I1

Structure: a 1-to-2-line decoder (the inverter) + 2 enabling circuits (ANDs) + a 2-input OR. The ANDs and the OR together form a 2 × 2 AND-OR. In general:

4-to-1-Line MUX

00
01
10
11

I0S1’S0’I1S1’S0I2S1S0’I3S1S0Ydecoder minterms of S1S0 enable one Ii

Width Expansion (Quad MUX)

To select whole buses instead of single bits, use several AND-OR sections in parallel sharing one decoder. A quad 2-to-1 MUX selects a 4-bit bus from source A or source B; a 4-to-1 quad MUX selects one of four 4-bit vectors.


6. Implementing Functions with Multiplexers

Approach 1 – Variables with a -to-1 MUX

The decoder inside the MUX generates the minterms of the select inputs; each information input decides whether minterm reaches the OR (value fixing: attaches it, removes it).

Design:

  1. Write the truth table, inputs in counting order.
  2. Connect the function’s variables to (in order).
  3. Value-fix each to the function’s value on row (0 or 1; either for a don’t-care).
  4. For outputs, use an -wide MUX (or MUXes).

Example – 3-Bit Gray → Binary Converter

Rearranged in counting order of the Gray input :

(Gray) (binary)
000000
001111
010011
011100
100001
101110
110010
111101

directly. and use two 8-to-1 MUXes with on :

8-to-1MUX0011213040516170S2AS1BS0CY8-to-1MUX0011213041506071S2AS1BS0CZ

⚠️ In the slide’s first (unsorted) conversion table, the last row reads “001 → 101”; it should be 001 → 111, as in the sorted table. (In this example is the most significant Gray bit, which is why .)

Approach 2 – Variables with a -to-1 MUX + One Inverter

Design:

  1. Truth table in counting order.
  2. Using the first variables, group the rows in pairs (the pair differs only in the last variable).
  3. For each pair, express the output as a rudimentary function of the last variable: , , or .
  4. Feed those rudimentary functions to the information inputs, with the first variables on the selects.

Example – Gray → Binary Again

: :
000, 01, 1
011, 10, 0
100, 11, 0
111, 00, 1

4-to-1MUX0C1C’2C3C’S1AS0BY4-to-1MUX0C1C’2C’3CS1AS0BZ

Two 4-to-1 MUXes + one inverter instead of two 8-to-1 MUXes — about half the cost. More generally, a function of many variables is split into sub-functions of a subset of variables, and the MUX selects among them.

Example – with a 4-to-1 MUX

rows ()
00,
01,
10,
11,

4-to-1MUX0z1z’2031S1xS0yF

Example – with an 8-to-1 MUX

000001010011100101110111
minterms ()0, 12, 34, 56, 78, 910, 1112, 1314, 15
0011

8-to-1MUX0D1D2D’30405D6171S2AS1BS0CF


Exercises: none assigned separately — the worked examples (decoder + OR for ; Gray→binary with Approaches 1 and 2; ; ) are the practice set.