MOULDLKnowledge BaseElectrical Knowledge Base3D Model DownloadsMembership
中文版Model Store »
Knowledge Base › Electrical Knowledge Base › Implementing logic functions with a data selector
HomeModels
Table of contents

On this page

Electrical & Electronic Basics (600 articles)

Quick Reference

  • PLC & Programming
  • Electrical & Electronic Basics (monthly)(每月更新中)
  • Electrical Control & Drawings (monthly)(每月更新中)
  • Drives & Actuators (monthly)(每月更新中)
  • Sensors & Detection (monthly)(每月更新中)
  • Industrial Communication & Networks (monthly)(每月更新中)
  • HMI & Host Systems (monthly)(每月更新中)
  • Industrial Robots & Motion Control (monthly)(每月更新中)
  • Mechatronic System Integration (monthly)(每月更新中)
  • Fault Diagnosis & Standards (monthly)(每月更新中)

Implementing logic functions with a data selector

A multiplexer uses address as variables and data as coefficients, systematically building any combinational function. This page gives the standard design steps.

1. How it works

An n address MUX has 2 to the n data inputs and is essentially a lookup table of that many entries: the address selects which Di drives the output. Map the target function truth table straight onto Di, each address combination being one input assignment and its function value (0 or 1) written into the matching Di. With no extra gates, filling Di with 0 or 1 realizes the function.

2. Practice and pitfalls

Steps: decide variable count and pick address bits at least equal to it (tie spare addresses low or use for enable expansion); list the truth table ordered by address; fill each row function into its Di (1 to high, 0 to ground); connect address to input variables and strobe ST. If variables are fewer than address bits, fix the spare bits or use enable expansion. Compared with decoder method, MUX is more direct.

3. MUX logic

StepDoNote
Pick MUXaddr >= varsspare bits
Truthby addressrow order
Fill Difunction val1 high 0 gnd
Addressto varsmap right
EnableST lowdont off
TrapDi floatunstable

4. Notes

A MUX is a lookup table: address to input variables, Di filled by the truth table with 0 or 1, realizing the function with no extra gates. Key is correct variable to Di mapping, Di tied high or ground never floating, ST enabled, Y/W not mixed. For fewer variables fix the spare bits or use enable.

5. References

The quantities and component characteristics discussed here follow current national standards and the corresponding IEC documents: Data select design per GB/T 4728; control to GB/T 5226.1 and IEC 60204-1. Always check the device datasheet and the product design file for ratings and derating.

6. Cautions

⚠️ Three common pitfalls:
① Wrong variable to Di mapping shifts the whole table.
② Floating Di picks noise and output is undefined; tie high or ground.
③ Treating MUX as a plain switch wastes its lookup ability.

Locate the issue with the approach above, then confirm with measurements; safety-related circuits must follow the standards and manufacturer requirements.

Related reading

Related 3D models: Ready to build it? Download free 3D models & CAD drawings at MOULDL »
MOULDL · Electrical Knowledge Base · free self-study reference for electrical & automation engineers, 3D CAD models at MOULDL