---
+ Post New Thread
Results 1 to 12 of 12
  1. #1
    Full Member level 3
    Points: 2,911, Level: 12

    Join Date
    Feb 2004
    Location
    Bangalore, India
    Posts
    181
    Helped
    9 / 9
    Points
    2,911
    Level
    12

    How to make XOR gate using 2x1 multiplexer?

    Hi

    Is it possible to make XOR gate using 2x1 multiplexer?
    if yes how? if no why?

  2. #2
    Advanced Member level 3
    Points: 7,416, Level: 20
    checkmate's Avatar
    Join Date
    Feb 2004
    Location
    Toilet Seat
    Posts
    833
    Helped
    176 / 176
    Points
    7,416
    Level
    20

    2x1 mux using nand gates

    Let me take a shot.
    Below is the truth table of a 2x1 multiplexer.

    A B S | O
    ======
    0 0 0 | 0
    0 0 1 | 0
    0 1 0 | 0
    0 1 1 | 1
    1 0 0 | 1
    1 0 1 | 0
    1 1 0 | 1
    1 1 1 | 1

    I can't seem to find any combination of 2-inputs and one fixed-input giving an XOR gate.



    •   Alt29th January 2005, 09:48

      advertising

        
       

  3. #3
    Advanced Member level 3
    Points: 10,021, Level: 23

    Join Date
    Oct 2004
    Location
    Sunnyvale, USA
    Posts
    765
    Helped
    112 / 112
    Points
    10,021
    Level
    23

    realize nand gate as xor gate

    Well if you have more than 1 2x1 Multiplexer it can be done. If you have 2 2x1 Multiplexers you can make a NAND gate. And then by 4 Nand Gates you can make a XOR Gate.

    2x1 to AND:
    Tie A to 0, then the Mux is a AND Gate with Inputs B and S. Make an Inverter of the 2nd Mux by tying A, B to say 1, 0. And cascade the 2, you have a NAND. Use 4 such NANDs to get a XOR. Thus to make a XOR by this way u need 8 2x1 MUX !

    Hope this helped !!



  4. #4
    Advanced Member level 2
    Points: 4,981, Level: 16
    Ace-X's Avatar
    Join Date
    Jan 2002
    Location
    Germany
    Posts
    530
    Helped
    41 / 41
    Points
    4,981
    Level
    16

    using mux to make xor gate

    Quote Originally Posted by aryajur
    Thus to make a XOR by this way u need 8 2x1 MUX !
    3 2x1 MUXes should be enough to build ANY 2-inputs gate.

    First of all, you can build 4x1 MUX from those 3 2x1 MUXes. And then use the same approach as LUT in FPGA, by providing constant 1s and 0s on MUX inputs, that correspond to output column of truth table for desired gate.



    •   Alt29th January 2005, 12:23

      advertising

        
       

  5. #5
    Fom
    Fom is offline
    Advanced Member level 2
    Points: 4,480, Level: 15
    Fom's Avatar
    Join Date
    Mar 2004
    Location
    Taiwan
    Posts
    633
    Helped
    75 / 75
    Points
    4,480
    Level
    15

    xor gate from 2 to 1 mux truth table

    You can build any logic using 2x1 MUX. The only reason why we don't use that it will be not optimal design.



    •   Alt31st January 2005, 07:45

      advertising

        
       

  6. #6
    Advanced Member level 3
    Points: 9,200, Level: 22

    Join Date
    Jul 2004
    Posts
    891
    Helped
    168 / 168
    Points
    9,200
    Level
    22

    build a +nand gate using a +multiplexer

    Here it goes...

    Code:
             +-----+
        b ---|0    |
             |     |---> Y = a xor b
    b_bar ---|1 S  |
             +--+--+
                |
         a------+
    Here you need an inverter which can be build using another 2:1 mux!



  7. #7
    Advanced Member level 3
    Points: 7,416, Level: 20
    checkmate's Avatar
    Join Date
    Feb 2004
    Location
    Toilet Seat
    Posts
    833
    Helped
    176 / 176
    Points
    7,416
    Level
    20

    how to make an xor gate with 2 muxes

    Quote Originally Posted by Fom
    You can build any logic using 2x1 MUX. The only reason why we don't use that it will be not optimal design.
    This is generally true because you can build an entire look-up table using them. But why the enthusiasm on multiplexers?



  8. #8
    Full Member level 5
    Points: 1,993, Level: 10

    Join Date
    Feb 2007
    Posts
    241
    Helped
    11 / 11
    Points
    1,993
    Level
    10

    xor by nand gate

    With single 2*1 mux u may not get X-0r gate..........but by using more than 1 mux and by using additional gates u can realize x-or gate ..



  9. #9
    Junior Member level 3
    Points: 1,232, Level: 7

    Join Date
    Oct 2006
    Location
    INDIA
    Posts
    29
    Helped
    3 / 3
    Points
    1,232
    Level
    7

    xor gate with two mux

    Hi..
    Yes It is Possible to make Xor gate using single 2:1 Mux.
    Here is the way

    Lets say inputs of xor gate are A and B and output=y

    connect select line to A
    Connect 0 -> B
    and 1 -> B_bar



  10. #10
    Full Member level 4
    Points: 2,347, Level: 11

    Join Date
    Jan 2007
    Location
    India
    Posts
    195
    Helped
    9 / 9
    Points
    2,347
    Level
    11

    xor by only nand gate

    Quote Originally Posted by checkmate
    Quote Originally Posted by Fom
    You can build any logic using 2x1 MUX. The only reason why we don't use that it will be not optimal design.
    This is generally true because you can build an entire look-up table using them. But why the enthusiasm on multiplexers?
    I think in FPGAs there will be muxes ,and we have to route properly so that we can get the logic what we want. so there is lot of enthusiasm in muxes.



  11. #11
    Junior Member level 1
    Points: 1,105, Level: 7

    Join Date
    Feb 2007
    Location
    Bangalore
    Posts
    17
    Helped
    0 / 0
    Points
    1,105
    Level
    7

    xor gate from two mux

    Hi,
    You can design any logic using mux in two ways,using Levevls and/or using interconnection between differernt nodes.

    For XOR implementation..interconnection without using Levels

    (A)i0------!\
    ! !__Y
    i1 !---! !
    ! !/
    !__ !
    !
    !
    (B)Sel

    Refer www.asic-world.com for many VLSI stuff, it is a nice website by Deepak Kumar Tala ..Thanks Deepak



  12. #12
    Full Member level 1
    Points: 2,111, Level: 10

    Join Date
    Jul 2006
    Posts
    117
    Helped
    8 / 8
    Points
    2,111
    Level
    10

    ways to build an xor gate out of nand gates

    Quote Originally Posted by nand_gates
    Here it goes...

    Code:
             +-----+
        b ---|0    |
             |     |---> Y = a xor b
    b_bar ---|1 S  |
             +--+--+
                |
         a------+
    Here you need an inverter which can be build using another 2:1 mux!
    I think perfectly okay a solution

    Added after 1 minutes:

    Quote Originally Posted by mohammed.peer
    Hi..
    Yes It is Possible to make Xor gate using single 2:1 Mux.
    Here is the way

    Lets say inputs of xor gate are A and B and output=y

    connect select line to A
    Connect 0 -> B
    and 1 -> B_bar
    similar to what nand_gates wrote and perfectly okay



+ Post New Thread
Please login