From dc27677a6750d94eb4b3bc3a1b294d86e1a72fa7 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Mon, 10 Apr 2017 20:05:02 -0400 Subject: [PATCH] begin implementation of notGate --- src/notGate.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/notGate.cpp b/src/notGate.cpp index b323b15..7215e46 100644 --- a/src/notGate.cpp +++ b/src/notGate.cpp @@ -1,3 +1,14 @@ #include "notGate.h" 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; + } +}