Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Electrical Engineering (https://www.askmehelpdesk.com/forumdisplay.php?f=497)
-   -   Electrical engineering-Logic Gates (https://www.askmehelpdesk.com/showthread.php?t=617887)

  • Dec 7, 2011, 11:46 PM
    vhopkinsss
    Electrical engineering-Logic Gates
    Design a circuit with four single-bit inputs X, Y, T, and Z, but only one single-bit output E. A two bit control code word S0S1 selects which of the four inputs is propagated to the output (the selection code is not unique). Your answer should be in the form of a circuit diagram and table showing which selection code selects which input. You may use any of the combinatorial logic gates
  • Dec 8, 2011, 07:56 AM
    jcaron2
    First, let's make up a truth table to decide which control word corresponds to which input. For example, we could use the following:

    S0S1 Output(E)
    00 X
    01 Y
    10 T
    11 Z

    Now pick an input, let's say X. We want the output, E, to be equal to X if (and only if) the control word is right, which is 00 in this case. So what logic can we use which will be equal to X if and only if the S0 and S1 are both 0? The simplest answer is just an AND gate. If we AND X along with S0' and S1' (the ' means "not", i.e. the inverse), then the output of the AND gate will be exactly equal to X as long as S0 and S1 are both 0 (and hence their inverses will both be 1). Thus, for this portion of the circuit we would take the inputs S0 and S1, add an inverter to each of them, and connect them to two inputs of a three-input AND gate, along with the input X at the third input.

    Meanwhile, we'd do three more "copies" of this same circuit for the inputs Y, T, and Z. For the Y circuit, for example, we're looking for S0S1 to be 01, so you'd connect S0 and S1' to the AND gate (along with the input Y).

    Once you've constructed four AND circuits, you simply need to OR their outputs together.

    Also note that you could swap all the And OR gates with NAND gates and get the equivalent logic, but it's not quite as intuitive that way.

    By the way, there's a name for this type of logic function. It's called a multiplexer. If you Google it, you'll find all kinds of info. There's a circuit diagram of one here. Note that it's exactly the circuit I described above.

  • All times are GMT -7. The time now is 09:16 AM.