# Demux help

9 messages
Open this post in threaded view
|

## Demux help

 Hello, I just started yesterday with the course and I'm trying to finish the whole exercises by myself. I already have (what I actually think and hope are) pretty efficient implementations for all the chips on project 01, but I'm struggling with DMux8Way (by efficient I mean with a minimal set of instructions on the PARTS section). Actually, I did struggle a lot with DMux in general. I had to research in other places about dmux cause I couldn't follow the canonical expression from the truth table. Then based on that 'native' DMux implementation, I notice I could use that to build a DMux4Way, but I didn't follow that approach since it looked pretty cumbersome. I struggled for a while and end up implementing DMux4Way using 3 DMux calls. Now, to be honest, it did came in after some trial an error, and not in a more methodical way which I would think is more convenient for learning. I would assume that DMux8Way can be constructed using several DMux4Way. I have been trying to draw the diagram, but haven't been able to figure it out. Can someone give me some pointers? Any links in which I can get a better explanation of DMux? How can I build a canonical expression for the DMux based on its truth table? Any other exercise I can do in order to grasp the concept better? Any feedback will be greatly appreciated!
Open this post in threaded view
|

## Re: Demux help

 Administrator You are correct that the canonical representation grows rapidly complex. In fact it grows exponentially on the order of 2n when n is the number of inputs. Using three DMux to make the DMux4Way is a good approach. You can use seven Dmux to make a DMux8Way, but if you use a combination of DMux and DMux4Way you can get it down to three lines of HDL. One of the important concepts in Computer Science is the binary tree. As a data structure it lets you search for things efficiently; in an algorithm it lets you break larger tasks in half and repeatedly, often recursively, work with the data in smaller chunks. Here's a visual representation of a binary tree. If you want more explicit help, ask me using "More|Reply to Author" and I'll be happy to help you off forum. --Mark
Open this post in threaded view
|

## Re: Demux help

 Thank you very much for your answer. I saw it earlier but couldn't work on this until now. After giving it a little more of thought I finally implement the DMux8Way using only 3 HDL lines :) It did follow somehow the implementation of DMux4Way in the end. Also I was able to figure out the canonical representation, and saw the growth it shows as n increases. I'll keep going with the other chapters! Thanks again.
Open this post in threaded view
|

## Re: Demux help

 If you could give me some pointers on how to make the dmux I would appreciate it :) I have made the mux chip using the canonical expression (there are many and's and or's I think I can replace some with nand calls)  but as you too have come to that conclusion, for the dmux the canonical expression is no good (at least this is what it seems) Any place in particular you looked? I have tried the wiki but didn't find anything there I could use (or maybe I missed something).
Open this post in threaded view
|

## Re: Demux help

AntonioCS wrote
I have made the mux chip using the canonical expression (there are many and's and or's I think I can replace some with nand calls) but as you too have come to that conclusion, for the dmux the canonical expression is no good (at least this is what it seems)
Treat the two outputs of the DMux separately. You get two canonical expressions, both of which are fairly simple.

in sel | a in sel | b 0 0 | 0 0 0 | 0 0 1 | 0 0 1 | 0 1 0 | 1 1 0 | 0 1 1 | 0 1 1 | 1
--Mark
Open this post in threaded view
|

## Re: Demux help

 I will try this :) Thanks!!
Open this post in threaded view
|

## Re: Demux help

 In reply to this post by cadet1620 Sorry for the late reply! I tried your approach and it worked great. I know only have a few more chips to make (4 to be exact). I am struggling a bit with difficulty of the task, time and sometimes motivation, but I am getting there.