Sie sind auf Seite 1von 27

ECE 4104

(Logic Circuits and Switching Theory)

Experiment No. 4
Decoder/Code Converter Circuit

Submitted by: GROUP # 3 BURGOS, Arman DIOCADES, Erna Mae FAIGONES, Russel Lab. Schedule: Th 7:00 10:00 AM Date Submitted: August 2012

Instructor: Engr. Ramon Alguidano Jr.

I.

OBJECTIVES

1. To be able to convert 8-4-2-1 code into gray code. 2. To be able to formulate the simplified minterm equation using karnaugh mapping or Boolean algebra. 3. To be able to generate the truth table. 4. To construct the actual circuit as designed from the truth table description. 5. To verify the given truth table and test the individuality of each output by recording the actual data of the circuit constructed. 6. To learn how to simulate the logical operations of the circuit using any electronic simulation software and compare with the actual results.

II.

BASIC THEORY

Decoders In digital electronics, a decoder can take the form of a multiple-input, multipleoutput logic circuit that converts coded inputs into coded outputs, where the input and output codes are different e.g. n-to-2n , binary-coded decimal decoders. Decoding is necessary in applications such as data multiplexing, 7 segment display and memory address decoding.

The example decoder circuit would be an AND gate because the output of an AND gate is "High" (1) only when all its inputs are "High." Such output is called as "active High output". If instead of AND gate, the NAND gate is connected the output will be "Low" (0) only when all its inputs are "High". Such output is called as "active low output".

A slightly more complex decoder would be the n-to-2n type binary decoders. These types of decoders are combinational circuits that convert binary information from 'n' coded inputs to a maximum of 2n unique outputs. In case the 'n' bit coded information has unused bit combinations, the decoder may have less than 2n outputs. 2-to-4 decoder, 3-to-8 decoder or 4-to-16 decoder are other examples.

The input to a decoder is parallel binary number and it is used to detect the presence of a particular binary number at the input. The output indicates presence or absence of specific number at the decoder input.

A decoder is a combinational circuit that converts binary information from n input lines to a maximum of 2n output lines. Logic circuit implementation with basic logic gates involves obtaining simplified Boolean expressions for each output. Implementation with MSI decoders is very simple and straightforward and may require a few external gates. The implementation of functions F = (1, 2, 3) and G = (5, 6, 7, 8, 9) using a 4 x 16 decoder is shown below. Since a decoder generates minterms at its outputs we need only to sum the minterms for which F and G are 1. Hence, we require OR gates to produce F and G.

If the decoder is constructed using NAND gates, then it has active low outputs. In this case, NAND and/or AND gates could be used to sum the minterms of F and G.

Code Converters A code converter is a circuit that makes two digital systems using different codes for the same information compatible even though each uses a different code. To convert from binary code A to binary code B, the input lines must supply the bit combination of elements as specified by code A and the output lines must generate the corresponding bit combination of code B. The circuit for this code converter can be implemented using basic logic gates or with available MSI devices such as Decoders, and Multiplexers. The unused input combinations can be treated as dont cares.

III.

SCHEMATIC DIAGRAMS

IV.

EQUIPMENT/MATERIALS/COMPONENT NEEDED

V.

PROCEDURES AND RESULTS 1) Given the 8-4-2-1 code, convert it into gray code using any simplification technique. Generate the truth table and output of the gray code.

Using Boolean Algebra:


1st Bit F(A,B,C,D) = 'AB'CD+'ABC'D+'ABCD+A'B'C'A+A'B'CD F(A,B,C,D) = 'ABD+A'B'C+'ABC 2nd Bit F(A,B,C,D) = 'AB'C'A+'AB'CD F(A,B,C,D) ='AB'C 3rd Bit F(A,B,C,D) = 'A'BC'D+'A'BCD+'AB'C'D+'AB'CD+'ABC'D+'ABCD F(A,B,C,D) = 'AB+'AC 4th Bit F(A,B,C,D) = 'A'B'CD+'A'BC'D+'ABCD+A'B'C'D F(A,B,C,D) = 'B'C(AD)+ 'AC' (BD)

2) Test the individuality of each output using actual practice and simulation software. Using TINA: (1ST Bit)

2ND Bit:

3RD Bit:

4TH Bit:

NI Simulation:

Actual Results:

VI.

OBSERVATION During the conduction of this experiment the group has noted the following

observations: It was found out that a certain coded output can be specified by a code converter logic circuit with different input. The said code converter can be made with multiple inputs and outputs. In this experiment an 8421 coded input is converted into gray code. The said circuit was implemented with basic logic gates using integrated circuits 7404, 7408, 7432 and 7486. It was noted that the implemented circuit involves obtaining simplified Boolean expressions for each output as part of the gray code. Actual outputs were verified as the resulting data were similar to that of the results from the simulation process. Moreover, similar results were also observed by doing a written Boolean algebra simplification.

VII.

CONCLUSION After conducting this experiment regarding the decoder or code converter, the group therefore concludes that a decoder can take the form of a multiple-input, multiple-output logic circuit that converts coded inputs into different coded outputs. In this case an 8421 code was converted to gray code. The mentioned decoder logic circuit was implemented with basic logic gates using Integrated circuits 7404, 7408, 7432 and 7486. This circuit involves obtaining simplified Boolean expressions for each output as part of the gray code. Results from both simulation and written processes such as the Karnaugh mapping and Boolean algebra simplification proved the actual results to be valid and correct for they are similar. Moreover, the group has learned how to make a decoder logic circuit that convert 8-4-2-1 code into gray code by formulating its simplified minterm equation using Karnaugh mapping or Boolean algebra basing on the truth table description and then constructing the actual circuit designed based on simplified equation obtained. The group was able to verify the individuality of each output by recording the actual data of the circuit constructed.

VIII.

DESIGN PROBLEM

Design a code converter circuit that converts 8-4-2-1 to 6-3-1-1 code. Show Boolean algebra, Karnaugh mapping, truth table and the simulation.

A 0 0 0 0 0 0 0 0 1 1

B 0 0 0 0 1 1 1 1 0 0

C 0 0 1 1 0 0 1 1 0 0

D 0 1 0 1 0 1 0 1 0 1

6 3 1 1 Code 0 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 1 1 1 0 0

Boolean Algebra 1st Bit F(A,B,C,D) = 'ABC'D+'ABCD+A'B'C'D+A'B'CD F(A,B,C,D) = 'ABC+A'B'C

2nd Bit F(A,B,C,D) = 'A'BCD+'AB'C'D+'AB'CD+A'B'CD F(A,B,C,D) = 'BD(AC)+'AB'C 3rd Bit F(A,B,C,D) = 'A'BC'D+'AB'CD+A'B'C'D F(A,B,C,D) = 'B'D(AC)+'AB'CD

4th Bit F(A,B,C,D) = 'A'B'CD+'A'BC'D+'AB'C'D +'AB'CD+'ABCD+A'B'C'D F(A,B,C,D) = 'AB'C+'B'D(AC)'AD' (BC)

Das könnte Ihnen auch gefallen