Creating a decoder (Graycode to Binary) using 4 nands

  • Context: Engineering 
  • Thread starter Thread starter rugerts
  • Start date Start date
  • Tags Tags
    Binary Decoder
Click For Summary
SUMMARY

This discussion focuses on creating a decoder that converts Gray code to binary using NAND gates, specifically addressing the use of 3 NAND gates with 4 inputs each, contrary to the initial assumption of needing 4 NAND gates. The participant references the SN74LS138 demultiplexer datasheet to clarify the logic diagram and emphasizes the importance of using the BOUTL0_L to BOUTL7_L signals as inputs for the NAND gates. Key insights include the application of DeMorgan's theorem and the suggestion to avoid Karnaugh maps for simplification.

PREREQUISITES
  • Understanding of digital logic design principles
  • Familiarity with the SN74LS138 demultiplexer
  • Knowledge of NAND gate functionality and configurations
  • Basic grasp of Gray code and binary number systems
NEXT STEPS
  • Study the SN74LS138 datasheet for detailed logic diagrams and applications
  • Learn about DeMorgan's theorem and its implications in digital logic
  • Explore advanced techniques for simplifying logic circuits without Karnaugh maps
  • Investigate other types of logic gates and their combinations for binary conversion
USEFUL FOR

Electronics engineers, digital circuit designers, and students studying digital logic who are working on projects involving binary conversion and logic gate optimization.

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
37K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
6K