Binary decoder
   HOME

TheInfoList



OR:

In
digital electronics Digital electronics is a field of electronics involving the study of digital signals and the engineering of devices that use or produce them. This is in contrast to analog electronics and analog signals. Digital electronic circuits are usual ...
, a binary decoder is a
combinational logic In automata theory, combinational logic (also referred to as time-independent logic or combinatorial logic) is a type of digital logic which is implemented by Boolean circuits, where the output is a pure function of the present input only. This ...
circuit that converts binary information from the n coded inputs to a maximum of 2n unique outputs. They are used in a wide variety of applications, including instruction decoding, data multiplexing and data demultiplexing, seven segment displays, and as address decoders for
memory Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembered ...
and port-mapped I/O. There are several types of binary decoders, but in all cases a decoder is an electronic circuit with multiple input and multiple output signals, which converts every unique combination of input states to a specific combination of output states. In addition to integer 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 may 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 In computer engineering, a hardware description language (HDL) is a specialized computer language used to describe the structure and behavior of electronic circuits, and most commonly, digital logic circuits. A hardware description language en ...
such as
VHDL The VHSIC Hardware Description Language (VHDL) is a hardware description language (HDL) that can model the behavior and structure of digital systems at multiple levels of abstraction, ranging from the system level down to that of logic gate ...
or
Verilog Verilog, standardized as IEEE 1364, is a hardware description language (HDL) used to model electronic systems. It is most commonly used in the design and verification of digital circuits at the register-transfer level of abstraction. It is als ...
. Widely used decoders are often available in the form of standardized ICs.


Types of decoders


1-of-n decoder

A 1-of-n binary decoder has n output bits. This type of decoder asserts exactly one of its n output bits, or none of them, for every integer input value. The "address" (bit number) of the activated output is specified by the integer input value. For example, output bit number 0 is selected when the integer value 0 is applied to the 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 ,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 ,9 All outputs are held inactive when a non-decimal value is applied to the inputs. *A
demultiplexer In electronics, a multiplexer (or mux; spelled sometimes as multiplexor), also known as a data selector, is a device that selects between several analog or digital input signals and forwards the selected input to a single output line. The sel ...
is a 1-of-n binary decoder that is used to route a data bit to one of its n outputs while all other outputs remain inactive.


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 A seven-segment display is a form of electronic display device for displaying decimal numerals that is an alternative to the more complex dot matrix displays. Seven-segment displays are widely used in digital clocks, electronic meters, basic ...
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.


Binary to Unary Decoder

A binary to unary decoder converts each binary value to its associated unary representation. Unlike the 1-of-n (one-hot) decoder, multiple output bits can be asserted for each input value. These decoders can be used in DACs where each bit is equally weighted, and circuits that require a binary
mask A mask is an object normally worn on the face, typically for protection, disguise, performance, or entertainment and often they have been employed for rituals and rights. Masks have been used since antiquity for both ceremonial and pra ...
or window.


See also

*
Multiplexer In electronics, a multiplexer (or mux; spelled sometimes as multiplexor), also known as a data selector, is a device that selects between several analog or digital input signals and forwards the selected input to a single output line. The sel ...
*
One-hot In digital circuits and machine learning, a one-hot is a group of bits among which the legal combinations of values are only those with a single high (1) bit and all the others low (0). A similar implementation in which all bits are '1' except ...
, the format of the 1-of-n decoder's output (or the unencoded output of a ring counter) * Priority encoder * Sum-addressed decoder


References

{{Reflist Digital circuits