begin implementation of notGate
This commit is contained in:
parent
190d227a97
commit
c19ba28320
@ -1,3 +1,14 @@
|
|||||||
#include "notGate.h"
|
#include "notGate.h"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
notGate::notGate(int gateDelay, wire* wire1 = nullptr, wire* wire2 = nullptr)
|
||||||
|
: delay(gateDelay), in1(wire1), out(wire2) {}
|
||||||
|
|
||||||
|
notGate::evaluate() {
|
||||||
|
int val = in1->getValue();
|
||||||
|
|
||||||
|
if(val != -1) {
|
||||||
|
return !val;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user