Creating a decoder (Graycode to Binary) using 4 nands

  • Topic: Engineering 
  • Thread starter rugerts
  • Start date
  • Tags Tags
    Binary Decoder
2 replies · 2K views · last reply
rugerts
Messages
153
Reaction score
11
Homework Statement
Shown below as a picture.
Relevant Equations
No equations. There's a data sheet that I've provided as a link below.
Printed exercise text with two bulleted questions about an MSI 74138 decoder converting Gray code bits to eight active low outputs BOUTL0_L to BOUTL7_L, and generating BOUT0 to BOUT2 using three 4-input NAND gates.


These are the two questions.Here's a datasheet for the demux I've been using: https://ecee.colorado.edu/~mcclurel/sn74ls138rev5.pdf

Here's my work:
Handwritten annotated wiring of a 74138 3-to-8 decoder chip, with outputs O0 to O7 wired to B0, B1 and B2, and sum-of-minterms expressions for B2, B1 and B0 below.
If you need to see how I got these sum functions, here's the work for that:
Handwritten notes showing three Karnaugh maps for decoder outputs Bout2, Bout1 and Bout0, with minterm lists, simplified expressions and the XOR forms B2 = G2, B1 = G2 XOR G1, and B0 = G2 XOR G1 XOR G0.

Now, if you look at the datasheet for the demux (linked above), you'll see its logic diagram. I'm confused as to how I can apply this to my situation to answer the second question about using 4 nand's when the logic diagram shown in the sheet uses 8 nands.
 
I'm hazarding a guess here, but I think that if you write out the logical expressions using 8 not-ands, you may be able to combine common terms to reduce it to 4 not-ands.
 
I'm not sure I understand the problem correctly because you haven't indicated what "Experiment 3.2.2" is. But I'm assuming that you are supposed to ultimately generate the original binary bits (not Gray code) from the outputs of the decoder/demux.

You need to use the 7 different BOUTL0_L to BOUTL7_L as inputs to your NAND gates, not the G0, G1, and G2 signals.

Start by filling the remaining elements of the table. (In the table below, the BOUTLx_L are denoted by [itex]\overline{O_x}[/itex] to save space.)

[tex] \begin{array}{|c | c | c | c | c | c | c | c | c | c | c | c | c | c |}<br /> \hline G_2 & G_1 & G_0 & \overline{O_7} & \overline{O_6} & \overline{O_5} & \overline{O_4} & \overline{O_3} & \overline{O_2} & \overline{O_1} & \overline{O_0} & B_2 & B_1 & B_0 \\<br /> \hline 0 & 0 & 0 \\<br /> \hline 0 & 0 & 1 \\<br /> \hline 0 & 1 & 1 \\<br /> \hline 0 & 1 & 0 \\<br /> \hline 1 & 1 & 0 \\<br /> \hline 1 & 1 & 1 \\<br /> \hline 1 & 0 & 1 \\<br /> \hline 1 & 0 & 0 \\<br /> \hline<br /> \end{array}[/tex]

Then use the appropriate BOUTLx_L signals (denoted as [itex]\overline{O_x}[/itex] here for short) as the inputs to your NAND gates.

Hint: No Karnaugh maps are necessary. If you find yourself making a K-map, you're making it too complicated. If done correctly, the answer is easy.

Another hint: Don't forget DeMorgan's theorem. A NAND gate not only functions as an AND gate with inverted output, it also functions as an OR gate with inverted inputs.

Also, to be clear, you need a total of 3 NAND gates (not 4), where each gate has 4 inputs.
 
Last edited: