Binary decoder

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

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.

Depending on its function, a binary decoder will convert binary information from n input signals to as many as 2n unique output signals. Some decoders have less than 2n output lines; in such cases, at least one output pattern will be repeated for different input values.

A binary decoder is usually implemented as either a stand-alone integrated circuit (IC) or as part of a more complex IC. In the latter case the decoder may be synthesized by means of a hardware description language such as VHDL or Verilog. Widely used decoders are often available in the form of standardized ICs.

Types

1-of-n decoder

File:Decoder Example.svg
A 2-to-4 line 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.

Examples of this type of decoder include:

  • A 3-to-8 line decoder activates one of eight output bits for each input value from 0 to 7 — the range of integer values that can be expressed in three bits. Similarly, a 4-to-16 line decoder activates one of 16 outputs for each 4-bit input in the integer range 0 to 15.
  • A BCD to decimal decoder has ten output bits. It accepts an input value consisting of a binary-coded decimal integer value and activates one specific, unique output for every input value in the range 0 to 9 (decimal). All outputs are held inactive when a non-decimal value is applied to the inputs.

Demultiplexer

A demultiplexer is a 1-of-n decoder with an enable input employed as a 1-bit data source. In demultiplexing applications, the 1-bit data value is effectively routed to one of the n outputs as specified by the integer input value.

Code translator

Code translators differ from 1-of-n decoders in that multiple output bits may be active at the same time. An example of this is a seven-segment decoder, which converts an integer into the combination of segment control signals needed to display the integer's value on a seven-segment display digit.

One variant of seven-segment decoder is the BCD to seven-segment decoder, which translates a binary-coded decimal value into the corresponding segment control signals for input integer values 0 to 9. This decoder function is available in standard ICs such as the CMOS 4511.

See also