# Number of output by decoder

It is known that a decoder take n input and can have 2^n output. Each input only constitute to 1 unique output.

However, I read that seven segment display decoder can take multiple input bit and produce multiple output bit as shown in picture below.

*image cited from www.electronics-tutorials.ws/combination/comb_6.html

I am confused about this concept that why seven segment display decoder can output multiple bit while the theory said that a decoder can only produce 1 output bit. For example in the image below, multiple input bit only output a single bit.

*image cited from en.wikipedia.org/wiki/Binary_decoder

Definition of decoders: [cited from en.wikipedia.org/wiki/Binary_decoder]

A 1-of-n binary decoder has n output bits, and the integer inputs bits serve as the "address" or bit number of the output bit that is to be activated. This type of decoder asserts exactly one of its n output bits, or none of them, for every unique combination of input bit states. Each output bit becomes active only when a specific, corresponding integer value is applied to the inputs. For example, output bit number 0 is selected when integer value 0 is applied to the integer inputs.

• You're confusing your definitions. A circuit needs enough inputs to determine all of its possible behaviours - that is all. Theory here is not helping you - think more about the actual detail rather than the abstractions. Oct 2 '16 at 9:16
• I made some mistake in the question just now. I edited it. Sorry Oct 2 '16 at 9:33
• Much improved, now its possible to discuss the details. Maybe the answers below are enough - comment on them if not. Now, write out the truth table for each output pin of the BCD decoder. You should find 7 (non canonical) decoders. Oct 2 '16 at 9:40
• Maybe a duplicate of this question electronics.stackexchange.com/questions/181559/… Oct 2 '16 at 9:43

It is known that a decoder take n inputs and can have $n^2$ output. Each input only constitute to 1 unique output.

This is incorrect. The number of possible combinations if n bits is $2^n$, not $n^2$. So 3-bits gives $2^3 = 8$, not $3^2 = 9$ combinations. (Note that when n = 4 the answer happens to be the same and this may have caused your confusion.)

However, I read that seven segment decoder can take multiple input and produce multiple output at one time (to light up the LED).

You haven't quoted your source or given any context (and you should have) but it sounds as though you are describing a multiplexed 7-segment display.

I am confused about this concept that why seven segment decoder can produce multiple output while the theory said that it can only produce 1 output.

Figure 1. A multiplexed 7-segment dispay on a darkroom timer circuit. Source: 320 volt.

Note that one CD4511 seven segment display driver is driving all four 7-segment common cathode LEDs. The cathodes are connected to ground via the PNP transistors.

How it works:

• The PIC micro sets up the binary code for the first digit and feeds this to the CD4511 inputs 8-4-2-1. These are immediately decoded and put out on the segment lines a-b-c-d-e-f. When ready the PIC pulls RB3 low, turning on the connected PNP transistor which will, in turn, light the segments powered by the 4511.
• The RB3 PNP is then switched off, the next digit set up on the CD4511 inputs 8-4-2-1 and RB2 pulled low to light the second display.
• The sequence continues lighting each of the other two displays.

This happens fast enough that the eye can't detect the flicker. The LEDs can be pulsed at higher than their continuous rating to give a normal average light output.

A 1-of-n binary decoder has n output bits, ...

This is a different type of decoder.

Figure 2. A 3 to 8 binary decoder. This is designed to switch on one of its outputs depending on the binary pattern on its input. Note the simple AND gate logic used.

You need to come up with a more general definition of "decoder". Wikipedia's Binary decoder definition may be of use:

In digital electronics, a binary decoder is a combinational logic circuit that converts a binary integer value to an associated pattern of output bits. They are used in a wide variety of applications, including data demultiplexing, seven segment displays, and memory address decoding.

There are several types of binary decoders, but in all cases a decoder is an electronic circuit with multiple data inputs and multiple outputs that converts every unique combination of data input states into a specific combination of output states. In addition to its data inputs, some decoders also have one or more "enable" inputs. When the enable input is negated (disabled), all decoder outputs are forced to their inactive states. [Emphaisis mine.]

• Thank for your answer. I had edited the question to clear some typo and mistake. Please have a look at it. Thanks. Oct 2 '16 at 9:36
• See the update. Oct 2 '16 at 12:41

A 7-seg display has 4 inputs and 2^4 unique outputs, where one output would be a particular arrangement of 7 LEDs illuminated in such a way to display a number or letter between 0x0 and 0xF.

A 7-seg display can take 4b input to represent the numbers 0x0 to 0xF and output 2^4=16 unique sets of outputs.

Each input only constitute to 1 unique output.

This still holds true with a 7-seg display. However, output means set of 7b outs. Of which there are 16 combinations to represent 16 unique hex values.

• Thank for your answer. I had edited the question to clear some typo and mistake. Please have a look at it. Thanks. Oct 2 '16 at 9:36