You are on page 1of 17

ELE2120 Digital Circuits and Systems

Tutorial Note 6

Outline 1. Code converter . Decoder 3. Crossbar switch 2. Encoder & Code converter 4. De-multiplexer 5.

whose sole function is to provide a capability to connect any input to any output. . where the connection pattern changes from time to time. mechanical sorting machines with inputs. Telephony crossbar switch. 2 x 2 crossbar switch Applications: to be able to connect one set of switches to another set of wires.Crossbar switch N x K crossbar switch: A circuit that has N inputs and K outputs. etc.

Crossbar switch s 0 1 y1 x1 x2 Truth table y2 x2 x1 Circuit built by multiplexers .

otherwise. depicted below is a logic circuit with n inputs and 2ⁿ outputs When En=1. none of the output is asserted.Decoder Decoder circuits are used to decode encoded information. the pattern of the input determines which one of the outputs is asserted. . A binary decoder.

A 2-to-4 decoder is given below: (a) Graphical symbol (b) Truth table .Decoder One-hot encoded: only one input is asserted each time.

find out the function for each output. (c) Circuit Diagram . # of Input + 1 = # of input of AND gate. 2. # of Output = # of AND gate 4.Decoder Steps for implementing decoder circuit diagram (a) Graphical symbol 1. 6. 5. Draw the truth table. Implement the logic function. Identify input and output number. 3. From Truth table.

Decoder Extra part added to extract the input number Larger decoders can be built by smaller decoders. Example: two 2-to-4 decoders to build a 3-to-8 decoder .

En 0 1 y0 0 w0w1 y1 0 w0w1 y2 0 w0w1 y3 0 w0w1 1. The de-multiplexer can be implemented using a decoder circuit. namely.De-multiplexer A circuit that performs the opposite function of a multiplexer.Output of decoder = output of the de-multiplexer. placing the value of a single data input onto multiple data outputs. 2-to-4 decoder can be used as a 1-to-4 de-multiplexer. . 2. Input of de-multiplexer: En only. For example. is called a de-multiplexer.Input of decoder: except En.

Encoder A binary encoder encodes information from 2ⁿ inputs into an n-bit code. (a) A 2ⁿ inputs into an n-bit encoder (b) Truth table for the encoder Exactly one of the input signals should have a value of 1. . and the outputs present the binary number that identifies which input is equal to 1. as indicated below.

.Encoder (b) Truth table for the encoder (c) Circuit for the encoder Encoders are used to reduce the number of bits needed to represent given information. Application: encoders is for transmitting information in a digital system.

which converts one binary coded decimal into information suitable for driving 1 digit-oriented display.Code converter BCD-to-7 segment converter. LED (Light Emitting Diode) Code converter .

Code converter Truth Table for BCD-to-7 w3 0 0 0 0 0 0 0 0 1 1 w2 0 0 0 0 1 1 1 1 0 0 w1 0 0 1 1 0 0 1 1 0 0 w0 0 1 0 1 0 1 0 1 0 1 a 1 0 1 1 0 1 1 1 1 1 b 1 1 1 1 1 0 0 1 1 1 c 1 1 0 1 1 1 1 1 1 1 d 1 0 1 1 0 1 1 0 1 1 e 1 0 1 0 0 0 1 0 1 0 f 1 0 0 0 1 1 1 0 1 1 g 0 0 1 1 1 1 1 0 1 1 .

(2ⁿ to n --.encoder) Step I: Identify the input and output D0 D1 D2 D3 D4 D5 D6 D7 A0 A1 A2 .Exercise: Code Converter Design a octal-to-binary code converter.

Exercise: Code Converter Input Step II: truth table D7 0 0 0 0 0 0 D6 0 0 0 0 0 0 D5 0 0 0 0 0 1 D4 0 0 0 0 1 0 D3 0 0 0 1 0 0 D2 0 0 1 0 0 0 D1 0 1 0 0 0 0 D0 1 0 0 0 0 0 A2 0 0 0 0 1 1 A1 0 0 1 1 0 0 A0 0 1 0 1 0 1 Output 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 .

Exercise: Code Converter Step III: Function representation D7 0 0 0 0 0 0 D6 0 0 0 0 0 0 D5 0 0 0 0 0 1 D4 0 0 0 0 1 0 D3 0 0 0 1 0 0 D2 0 0 1 0 0 0 D1 0 1 0 0 0 0 D0 1 0 0 0 0 0 A2 0 0 0 0 1 1 A1 0 0 1 1 0 0 A0 0 1 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1 A2=D4+D5+D6+D7 A1=D2+D3+D6+D7 A0=D1+D3+D5+D7 .

Exercise: Code Converter Step IV: Circuit diagram .