multiplexerdemultiplexer
前置知识
[[位运算]]
Logic Gates
符号
Binary symbols
一大段为1和0(增加容错率),中间隔了一段不定义
多逻辑门
一个逻辑门可以有多个input,运算法则与两个一致
Binary Code Decimal (BCD)
- The most obvious way of representing/encoding digits is “natural BCD” (NBCD), where each decimal digit is represented by its corresponding four-bit binary value
- This is also called “8421” encoding
Encoder and Decoder
Definition
Encoder is a combinational circuit that changes a set of binary signals into a code (2n input lines with ‘n’ bits)
Decoder is the opposite of an encoder as it is a combinational circuit that changes a code into a set of binary signals (‘n’ input lines and maximum of 2n output lines)
Encoder
A Binary Encoder takes ALL its data inputs one at a time and then converts
them into a single encoded output
A binary encoder, is a multi-input combinational logic circuit that converts the logic level “1” data at its inputs into an equivalent binary code at its output
The output lines of a digital encoder generate the binary equivalent of the input line whose value is equal to “1” and are available to encode either a decimal or hexadecimal input pattern to typically a binary or BCD output code
Generally, binary encoders produce outputs of 2-bit, 3-bit or 4-bit codes depending upon the number of data input lines
An “n-bit” binary encoder has 2n input lines and n-bit output lines with common types that include 4-to-2, 8-to-3 and 16-to-4 line configurations
用output1和0不同的组合表示不同的input(input只能有一个输入)
因为D0是00,这样设计不论怎样都不影响
8路
有几路output就有几路或门
Decoder
- The Binary Decoder is the exact opposite to that of an “Encoder”
- The name “Decoder” means to translate or decode coded information from one format into another
- ‘n’ input lines and maximum of 2n out putlines
- A digital decoder transforms a set of digital input signals into an equivalent decimal code at its output
作用就是还原encoder的电信号
用了两个非门和四个三路与门来还原
Multiplexer and De-multiplexer
The multiplexer and de-multiplexer are used in many applications as a way to reduce the number of wires needed to communicate between subsystems
- The multiplexer and de-multiplexer are represented as trapezoids
- The short end of the trapezoid faces the outputs for a multiplexer and faces the inputs for a de-multiplexer.
Multiplexer
A multiplexer (MUX) is used to select which of the many input signals should be transferred to its output based upon the value of an equivalent binary number or sometimes the binary code decimal (BCD) on the select pins
类似于多个开关,信号如何来就如何去
A multiplexer selects information from an input line and directs the information to an output line
- A typical multiplexer has n control inputs called selection inputs, 2n information inputs (I2n − 1, … , I0), and one output Y
此处b,a是选择器(s1,s0)
demultiplexer
A de-multiplexer is a digital switch with a single input(source) and multiple outputs (destinations)
• The select pins determine which output the input connected to
Applications of Mux and De-mux
Telephone network: In telephone network, multiple audio signals are integrated on a single line for transmission with the help of multiplexers. At the other end of the network, a de-multiplexer is used to convert a particular signal back to its original form and transfer it to the phone that is supposed to receive the data.
Computer memory: Multiplexers are used to implement huge amount of memory into the computer, at the same time reduces the number of copper lines required to connect the memory to other parts of the computer circuit. In an Arithmetic Logic Unit (ALU) circuit, the output is stored in multiple registers with the help of de-multiplexer.
Serial to parallel converter: Used to reconstruct parallel data from incoming serial data stream. In this technique, data from the incoming serial data stream is the data input to the de-multiplexer at the regular intervals. A counter is attach to the control input of the de-multiplexer. This counter directs the data signal to the output of the de-multiplexer where the data signals are stored. When all data signals have been stored, the output of the de-multiplexer can be retrieved and read out in parallel.