Logic Circuits

This is a discussion on Logic Circuits within the A Brief History of Cprogramming.com forums, part of the Community Boards category; The XAND discussion on the C++ board made me think... First, if there is actually an XAND, like Shiro says, ...

  1. #1
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825

    Logic Circuits

    The XAND discussion on the C++ board made me think...

    First, if there is actually an XAND, like Shiro says, what's its truth table?

    Secondly, in my digital circuits 1 course, we were told that any digital circuit could be designed using a standard NAND gate (well, a LOT of standard NAND gates)... If this is true, how would you design a flip-flop from them (we'll just say a J-K for simplicity's sake)? Also, would there be a way to create the clock needed to drive one using standard NANDs?

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    that points to a NAND not a XAND, XAND would be exclusive and which is kind of self-contradictory.

    It is true that any logic gate ca be constructed from NANDS
    Monday - what a way to spend a seventh of your life

  4. #4
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    >> we were told that any digital circuit could be designed using a standard NAND gate (well, a LOT of standard NAND gates)... If this is true, how would you design a flip-flop from them (we'll just say a J-K for simplicity's sake)?

    Yes you can. for the J-K flip flop, it would take 9 nand gates.

    As for the clock, you can make it with two inverters and you can build an inverter out of nand gates.

    Never heard of an XAND gate, but it wouldn't surprise me if it exists (sp?)

  5. #5
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    i belive xand is a terminology for nand.
    truth table...
    Code:
    a  b  a nand b
    0  0       1
    0  1       1
    1  0       1
    1  1       0
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  6. #6
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    > As for the clock, you can make it with two inverters

    Really? Do you have a picture? That sounds kinda neat...

  7. #7
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    ....tried to upload a circuit diagram of an XOR built with NANDS but it wouldnt upload.
    Last edited by iain; 01-14-2002 at 05:42 PM.
    Monday - what a way to spend a seventh of your life

  8. #8
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    here is the pic. I think it is called a astable or non stable multivibrator
    Attached Images Attached Images  

  9. #9
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    So it can't be built only from inverters? You have to use resistors and caps, too?

  10. #10
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    Yes, but maybe there is an other way to do it. But I think you will need capacitors each time so you can control the timing (with the load time of it)

  11. #11
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    I don't think you could make an oscilator out of invertors alone. Oscilators exist, by their nature, in unstable states, invertors are stable. You need to destabilise them. You might also want to look at the 74121, and why build a j-k when you can get two on a chip, (7473)?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  12. #12
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    > and why build a j-k when you can get two on a chip, (7473)?

    I know that - it's purely academic - I just wanted to know if it could be done.

  13. #13
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    A XOR-port can be built up from two AND-ports and one OR-ports. When in this circuit replacing all AND-ports by OR-ports and thel OR-ports by an AND-port you get an XAND.

    The output of an XOR-port is high if only one of the input bits is high. The output of an XAND-port is high if only one of the input bits is low.

  14. #14
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    so xand and xor have the same truth table. How do you tell the difference ? sounds like they would operate the same if they have the same truth table.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  15. #15
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,386
    XOR and XAND do not have the same truth table.

    >The output of an XOR-port is high if only one of the input bits is >high. The output of an XAND-port is high if only one of the input >bits is low.

    For a 2-bit input, the XAND behaves as an XNOR. But when more bits are supplied at the input, it doesn't.

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Digital Logic
    By strokebow in forum Tech Board
    Replies: 3
    Last Post: 12-09-2006, 01:05 PM
  2. Logic
    By LordBronz in forum C++ Programming
    Replies: 6
    Last Post: 05-23-2006, 06:41 PM
  3. sequential logic circuits
    By John1234 in forum Tech Board
    Replies: 3
    Last Post: 03-11-2003, 02:48 PM
  4. Circular Logic
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 10-15-2001, 09:10 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21