13 Decoder Macros


A decoder is a circuit that changes a code into a set of signals. It is called a decoder because it does the reverse of encoding. A common type of decoder is the line decoder, which takes an m-bit binary input datum and decodes it into 2m data lines. As a standard combinational component, a decoder asserts one out of n output lines, depending on the value of an m-bit binary input datum. The general form of an m-to-n decoder can be seen in Figure 13.1. In general, an m-to-n decoder has m input lines, im-1, ..., i1, i0, and n output lines, dn-1, d1, d0, where n = 2m. Although not shown in Figure 13.1, in addition, it may have an enable line, E, for enabling the decoder. When the decoder is disabled with E set to 0 (for active ...

Get Building a Programmable Logic Controller with a PIC16F648A Microcontroller now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.