Q1. How to express this circuit as boolean expression? It uses the output as input (feedback??) to part of the circuit. Is it a special type of circuit?
Q2. How do I simplify it as Nand-only expression for easy implementation? I have a 74HC00 chip (Quad 2-Input NAND Gate). Will this fit within 4 Nand-gates? I am also ok with NOT of output - then i will use a active-low relay.
Context: Input A = PIR sensor (which stays high for X seconds), Input B = Light sensor (low = low light). When A is HIGH (PIR sensor detects activity) and B is LOW (ambient light is low), turn output HIGH (relay to overhead light). But now since the overhead light is on, B will go HIGH - without feedback, this will instantly turn off the overhead light defeating the purpose. So, I want to pass output back as input - if output is already high, Input B should not matter, only Input A going low will change the output.
-
1\$\begingroup\$ It's a flip flop. Maybe try looking how flip-flops express it. \$\endgroup\$Andy aka– Andy aka2023年06月16日 14:50:14 +00:00Commented Jun 16, 2023 at 14:50
1 Answer 1
A2. Turning it into a NAND circuit mechanically:
Replace AND with NAND. Now output is inverted.
Change OR to NAND. Now the other input needs to be inverted, too: drop inverter/NOT.
Output of this "bottom" NAND is not always the complement of the top one:
Either use it as an active-low signal,
or invest another NAND to invert that signal to the original.
Two to three NANDs all told, looking much more a ¬R¬S flip-flop (A1b?).