1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Feynman's XOR in LTspice

Discussion in 'Mathematics and Physics' started by Electronaut, May 15, 2015.

  1. Electronaut

    Electronaut New Member

    Joined:
    May 15, 2015
    Messages:
    4
    Likes:
    0
    Hello,
    Just for fun I tried to use LTspice to simulate the "Non-Workable" XOR with feedback from Feynman's Lectures on Computation (p.43, Fig. 2.27). What surprises me about this is that LTspice shows stable dependence when viewing V(In) and V(Out), so the timing problems that Feynman talks about do not show up. Also, the feedback seems to result in a stable self-contradictory steady state when the input pulses are 1. I've attached the LTspice schematic file.
    Any tips would be appreciated. --Electronaut
     

    Attached Files:

  2. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,253
    Likes:
    1,218
    Location:
    Cardiff, Wales
    IMO what you show is a NOR gate, not an XOR. Also, the output cannot reach a logic 1 level.
     
    • Thanks Thanks x 1
  3. Electronaut

    Electronaut New Member

    Joined:
    May 15, 2015
    Messages:
    4
    Likes:
    0
    Thank you. Correct, I used a NOR instead of an XOR. Back to the LTspice drawing board...
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,253
    Likes:
    1,218
    Location:
    Cardiff, Wales

    In case you haven't found it, there's an XOR gate in the LTS 'Digital' folder.
     
  6. Electronaut

    Electronaut New Member

    Joined:
    May 15, 2015
    Messages:
    4
    Likes:
    0
    Thanks again. I tried working with the generic xor from LTspice, but I suspect that this is a "mathematical XOR" that would not have the timing characteristics of a real transistor circuit, and this is what I wanted to experiment with. Indeed, if I did this correctly the LTspice simulation would probably fail due to the timing problems that Feynman talks about.
     
  7. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,253
    Likes:
    1,218
    Location:
    Cardiff, Wales
    I suspect the 'fail' would actually be a high frequency oscillation, as the circuit attempts to be in two states at the same time.

    Edit:
    Suspicions confirmed :-
    FeynmansXOR.gif
     
    Last edited: May 16, 2015
    • Like Like x 1
  8. Electronaut

    Electronaut New Member

    Joined:
    May 15, 2015
    Messages:
    4
    Likes:
    0
    By zooming in on those high-frequency oscillations it appears that they are very regular, like a slightly distorted sine wave. This is probably an artifact of the model used. I suspect that if implemented in hardware the resulting oscillations would be more chaotic, sensitive to temperature, etc.
     
  9. alec_t

    alec_t Well-Known Member Most Helpful Member

    Joined:
    Jul 10, 2011
    Messages:
    9,253
    Likes:
    1,218
    Location:
    Cardiff, Wales
    I'm sure you're right. Even if you build a simulated XOR with simulated BJTs and other discrete components, you may still be some way from reality.
     

Share This Page