Engineering Creating a decoder (Graycode to Binary) using 4 nands

  • Thread starter Thread starter rugerts
  • Start date Start date
  • Tags Tags
    Binary Decoder
Click For Summary
The discussion focuses on creating a decoder to convert Gray code to binary using NAND gates, specifically addressing the challenge of using only four NAND gates when the datasheet indicates eight are required. It suggests that by writing logical expressions for the outputs and combining common terms, the number of NAND gates can be reduced. Participants emphasize the importance of using the correct BOUTL signals as inputs for the NAND gates and clarify that only three NAND gates with four inputs each are necessary for the solution. Additionally, they advise against using Karnaugh maps, recommending a simpler approach and reminding users of DeMorgan's theorem for gate functionality. The conversation highlights the need for clarity on the experimental requirements to ensure proper implementation.
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.
1572294579803.png


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:
IMG-0171.jpg
If you need to see how I got these sum functions, here's the work for that:
IMG-0172.PNG

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.
 
Physics news on Phys.org
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 \overline{O_x} to save space.)

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

Then use the appropriate BOUTLx_L signals (denoted as \overline{O_x} 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:

Similar threads

  • · Replies 18 ·
Replies
18
Views
7K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 23 ·
Replies
23
Views
36K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K