forum_image

Discussion Forum

Interative Forum for discussing any query literally to UGC-NET Computer Science, GATE Computer Science and Computer Sciene and Technology in general.

ugc_net image

UGC-NET Computer Science

Correspondence Courses and Test Series to prepare for UGC-NET computer science and applications

GATE image

GATE

MCQs, Lecture Notes, Ebooks for GATE preparation

freestuff image
jobs image

Jobs Newsfeed

Timely information of various Recruitments.

NextPrev

Computer organization Notes

Encoder

Encoder is a combinational circuit which is designed to perform the inverse operation of the decoder. An Encoder is a device that is used to change a signal(such as a bit stream) or data into a code. The code can be used for compressing information for transmission or storage, encrypting or adding redundancies to the input code, or translating from one code to another. An encoder has n(i.e. 2m) number of input lines and it will generate m number of output lines. An encoder produces an m bit binary code corresponding to the digital input number. The encoder accepts an n input digital word and converts it into an m bit another digital word. If a device output code has fewer bits than the input code has, the device is usually called an encoder e.g. 2n to n priority encoders. The simplest encoder is a 2n to n binary encoder, where it has only one of the 2n inputs is equal to 1 and the output is the n-bit binary number corresponding to the active input. The Block diagram of an encoder can be seen as follows :

Examples of Encoders are Priority encoders, Decimal to BCD encoder, Octal to binary encoder , Hexadecimal to binary encoder etc.
e.g. Let us consider an octal-to-binary encoder. Octal-to-Binary encoder takes 8 inputs and provides 3 outputs, thus doing the opposite of what the 3-to-8 decoder does. At any one time, only one input line has a value of 1. The truth table of an Octal-to-binary encoder is given below:
From the above truth table we can easily construct a logical diagram as shown in figure below. Also the functions for output variables A, B, C in terms of input variables D0 -D7 can be written as follows. The encoder can therefore be implemented with OR gates whose inputs are determined directly from truth table as shown in the image below:

We can see that input line D0 is not connected to any OR gate, so if D0 is 1, all the outputs are 0. Another important point here is that with 8 input lines, there are 28 = 256 possible combinations whereas we are utilizing only 8 of them. Rest of the combinations constitute don’t care conditions.




You can obtain Printed Copies of this material by making a request at brightways.org@gmail.com with a nominal print charges.

   

Return To Computer organization Topics