Bit selector

A bit selector extracts a single bit from an input bus. The value on the selector lines is an index into the bus, and the output is the addressed bit. It is effectively a multiplexer whose data inputs are the individual wires of one bus, and it is the natural way to test or route one bit of a word.

Basic

Picking one of four bits

For a 4-bit bus the selector needs 2 lines. The index maps to a single bit: 00 to b0, 01 to b1, 10 to b2, 11 to b3. Selector 10 reads bit b2.

SelectorOutput
00b0
01b1
10b2
11b3
Intermediate

Indexing a wider bus

An 8-bit bus needs 3 selector lines. The selector width must be at least log2 of the bus width. Selector 010 addresses bit b2, and the same component scales up to 32-bit buses.

Indexing a wider bus
Advanced

Reading a status flag

Processor status registers pack flags such as carry, zero, negative and overflow into one word. A bit selector pulls out a single flag for a branch or test without extra masking gates, keeping condition logic compact.

Reading a status flag

Citations

  • Shannon, C. E. (1938). A symbolic analysis of relay and switching circuits. Reference 1
  • Mano, M. M., & Ciletti, M. D. (2018). Digital design: With an introduction to the Verilog HDL, VHDL, and SystemVerilog (6th ed.). Pearson.
  • Wakerly, J. F. (2018). Digital design: Principles and practices (5th ed.). Pearson.