Skip to content
BetterDL

Select lines

Also called: select inputs, selection lines, select code, select signals, select bits

The control inputs of a multiplexer or demultiplexer. Read as a binary number, they choose which data input or output is connected.

Select lines are the steering inputs of a multiplexer or demultiplexer. They carry no data themselves. Instead, the pattern on them, read as a binary number, names one data line.

n select lines can form 2ⁿ different codes, so they can choose among 2ⁿ lines:

  • 1 select → 2 inputs (a 2:1 MUX)
  • 2 selects → 4 inputs
  • 3 selects → 8 inputs
  • 6 selects → 64 inputs

Going the other way, N data inputs need ⌈log₂N⌉ select lines. A 10-input selector needs 4, because 3 only reach 8.

They are numbered like the bits of a binary number: S0 has weight 1, S1 weight 2, S2 weight 4, and so on. So the select line with the highest number is the MSB.

This is the same counting as a decoder's inputs and a memory's address bits: in each case n bits pick one of 2ⁿ things.

1
4
0
2
1
1

Worked examples

Example

Which input does `101` select?

An 8:1 MUX has S2 S1 S0 = 1, 0, 1 (S2 is the MSB). The diagram shows the weights.

  1. 1.

    Weights: S2 = 4, S1 = 2, S0 = 1.

  2. 2.

    Code = 4 + 0 + 1 = 5.

  3. 3.

    The output copies I5.

Example

How many selects?

Find the select lines for a 64:1 MUX and for a 1-to-16 DEMUX.

  1. 1.

    64 = 2⁶ → 6 select lines.

  2. 2.

    16 = 2⁴ → 4 select lines. A DEMUX counts its outputs the same way a MUX counts its inputs.

Common mistakes

  • Counting one select per input. Select lines grow with log₂ of the inputs: 8 inputs need 3, not 8.

  • Reading the code with S0 on the left. S0 is the LSB, so S1 S0 = 10 means 2.

  • Assuming a select value passes through to the output. Selects only choose; the output is a data input's value.

Practice Select lines

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Select lines is taught in Combinational Logic.