Decoder and Encoder
Decoder and Encoder
Decoder and Encoder
Decoders Discrete quantities of information are represented in digital systems with binary codes. A binary code of n bits is capable of representing up to 2 n distinct elements of the coded information. A decoder is a combinational circuit that converts binary information from n inout lines to a maximum of 2 n unique output lines. The decoders presented here are called ntom line decoders, where m !2n. Their purpose is to generate the 2n minterms of n input variable. The name decoder is also used in con"uction with some code converters as a #$Dtoseven segment decoders. A binary decoder converts coded inputs into coded outputs, where the input and output codes are different and decoders are available to %decode% either a #inary or #$D &'(2) code* input pattern to typically a Decimal output code. An example of a 2+to+( line decoder along with its truth table is given below. ,t consists of an array of four -A-D gates, one of which is selected for each combination of the input signals A and #.
,n this simple example of a 2+to+( line binary decoder, the binary inputs A and # determine which output line from D. to D/ is %0,10% at logic level %)% while the remaining outputs are held %234% at logic %.% so only one output can be active &0,10* at any one time. Therefore, whichever output line is %0,10% identifies the
Page )
Page 2
Page /
5ome binary decoders have an additional input labelled %6nable% that controls the outputs from the device. This allows the decoders outputs to be turned %3-% or %377% and we can see that the logic diagram of the basic decoder is identical to that of the basic demultiplexer. Therefore, we say that a demultiplexer is a decoder with an additional data line that is used to enable the decoder. An alternative way of loo8ing at the decoder circuit is to regard inputs A, # and $ as address signals. 6ach combination of A, # or $ defines a unique address which can access a location having that address.
5ometimes it is required to have a Binary Decoder with a number of outputs greater than is available, or if we only have small devices available, we can combine multiple decoders together to form larger decoder networ8s as shown. 0ere a much larger (+to+)9 line binary decoder has been implemented using two smaller /+to+' decoders.
Page (
Page :
Page 9
$or an %&to&' binary encoder with inputs #(&#) the logic expressions of the outputs *(&*+ are, *( - #. / #' / #0 / #) *.- #+ / #' / #1 / #) *+ - #2 / #0 / #1 /#)
Page ;
Page '