Exclusive OR (XOR) Condition with Transistors
This was a headache. I started with 3 transistors and after a whole lot of thought and scribbling on paper, I realized I need 5 transistors. After all that, it still took me a bit to realize that I have to go from transistor 4 collector to transistor 5 collector… instead of t4 collector to t5 emitter. Actually, even that isn’t true. It just seems like it is because of how I am optimizing the layout (this just hit me). I’m just going t4 collector to the led (duh … Pbbbt, too much optimizing made this more confusing than it had to be).
in code logic this experiment would be:
if( (a && (!b)) || (b && (!a)) ) // ...do
you could shorten that logic to
if ( a != b ) // ...do
but, that doesn’t really tell the whole story. That just claims they can’t be equal but, in reality, one has to be true and the other false else do nothing.
I used a pencil cause my hand was casting a huge shadow.
I’m not allowed to use any help of any kind. The only thing I have allowed myself to do is look up pinout schematics or definitions of any parts that I am not familiar with. However in this case that was zero. I already know what transistors, resistors, wires, leds and buttons do. My entire focus on this stuff is using programming skills to write “code” with electronics. If I go read/watch tutorials I’m not going to learn to the same degree. I’m not saying that I don’t study electronics, cause I definitely do. I’m talking about for these little experiments any research beyond the basic data of a part is forbidden.
You must be logged in to reply to this topic.