encoders decoders example of using decoders with mux conclusion

26

Upload: ansley-buffum

Post on 30-Mar-2015

256 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Encoders Decoders Example of using decoders with MUX Conclusion
Page 2: Encoders Decoders Example of using decoders with MUX Conclusion

Encoders

Decoders

Example of using decoders with MUX

Conclusion

Page 3: Encoders Decoders Example of using decoders with MUX Conclusion

An encoder is a device that is used to convert a signal or certain data into code.

This kind of conversion is done for a variety of reasons, the most common being data compression.

Other reasons for using encoders include: data encryption for making the data secure translating data from one code to another

new or existing code.

Page 4: Encoders Decoders Example of using decoders with MUX Conclusion

Encoders may be analog or digital devices.

In analog devices, the encoding is done using analog circuitry

While in digital encoders the encoding is

done using program algorithms

Page 5: Encoders Decoders Example of using decoders with MUX Conclusion

An encoder refers to a device that is used to change a signal or data into a code.

Whereas

A Multiplexer or mux is a device which performs multiplexing or it takes information from more than one channels and outputs into a single channel.

Page 6: Encoders Decoders Example of using decoders with MUX Conclusion

Inputs Output

Page 7: Encoders Decoders Example of using decoders with MUX Conclusion

Draw:1. 2 input encoder2. 4 input encoder3. 16 input encoder

Page 8: Encoders Decoders Example of using decoders with MUX Conclusion

If in an encoder the following input was given, the output/address would be as indicated:

A B C D E F G H S0 S1 S2

1 0 0 0 0 0 0 0 0 0 0

000

Page 9: Encoders Decoders Example of using decoders with MUX Conclusion

If in an encoder the following input was given, the output/address would be as indicated:

A B C D E F G H S0 S1 S2

0 0 0 0 0 1 0 0 1 0 1

101

Page 10: Encoders Decoders Example of using decoders with MUX Conclusion

Encoders

Decoders

Example of using decoders with MUX

Conclusion

Page 11: Encoders Decoders Example of using decoders with MUX Conclusion

A decoder, on the other hand, functions the reverse of an encoder.

It is a device that is used to decode an encoded signal or data.

It does this to help retrieve the data that was encoded in the first place.

Both encoders and decoders usually function in cycle, i.e., an application that uses an encoder would ideally also require a decoder.

Page 12: Encoders Decoders Example of using decoders with MUX Conclusion

A decoder chooses one of the wires and make it output 1.

The output whose index is given by the binary value on S (select input) is set to 1. All others are set to 0.

Only one wire can be ‘ON’ at a time.  Whichever one is ‘ON’ is based on the

input (ie @ the selector).

Page 13: Encoders Decoders Example of using decoders with MUX Conclusion

OutputNB: Only ONE of the line will have the value 1; others will have 0.

Page 14: Encoders Decoders Example of using decoders with MUX Conclusion

Draw:1. 1 input decoder2. 2 input decoder3. 4 input decoder

Page 15: Encoders Decoders Example of using decoders with MUX Conclusion

If in a decoder the following selects were made, the output would be as indicated:

S0 S1 S2 A B C D E F G H

1 0 1 0 0 0 0 0 1 0 0

0 1 0 0 0 1 0 0 0 0 0

Page 16: Encoders Decoders Example of using decoders with MUX Conclusion

If in a decoder the following selects were made, the output would be as indicated:

S0 S1 S2 A B C D E F G H

0 1 0 0 0 1 0 0 0 0 0

Page 17: Encoders Decoders Example of using decoders with MUX Conclusion

Encoders

Decoders

Example of using decoders with MUX

Conclusion

Page 18: Encoders Decoders Example of using decoders with MUX Conclusion
Page 19: Encoders Decoders Example of using decoders with MUX Conclusion

• The decoder selected 01, which allows 01 to be set to 1, hence allowing it to light up.

• The MUX gets its input from the wire that has been lit-up by the decoder.

Page 20: Encoders Decoders Example of using decoders with MUX Conclusion

• The input to the MUX of 1 or 0 is based on if the lines are connected (1) or disconnected (2).

• In the example given above, if the select for the 2-1 MUX is 00, the output would be 0.

Page 21: Encoders Decoders Example of using decoders with MUX Conclusion

Please Note:

•You don’t always have equal rows and columns.

•A decoder does not have an output line, and the input (which is to the side) is the select lines.

Page 22: Encoders Decoders Example of using decoders with MUX Conclusion

Draw:1. 2-4 Decoder with a 8-1 bit Mux2. 1-2 Decoder with a 4-1 bit Mux (using only 2-1 bit muxes) LOL

Page 23: Encoders Decoders Example of using decoders with MUX Conclusion

Encoders

Decoders

Example of using decoders with MUX

Conclusion

Page 24: Encoders Decoders Example of using decoders with MUX Conclusion

If the encoders are the opposite of decoders, then that means that the outputs and inputs of the decoder are swapped. 

That means that what would normally be the select lines on the decoder (which are inputs) would now be the outputs of the encoder. 

Its purpose would be to produce the binary encoding of the index whose input is high.

Page 25: Encoders Decoders Example of using decoders with MUX Conclusion

That is, the encoder will have 2n inputs and n outputs, and only one of the inputs is expected to be high at any one moment. 

Encoders are useful for components like content-addressable memory, where you put in the data you want, and the address where it is stored is returned as a result.

Page 26: Encoders Decoders Example of using decoders with MUX Conclusion