======XOR class======
The XOR class implements a functioning logical XOR gate for use with our CPU simulator.
=====XOR() constructor=====
XOR myXorGate;
^ Function ^ Parameter(s) ^ Return value |
| XOR() | none | pointer/variable instantiation of the newly allocated XOR gate |
XOR() is the parameterless constructor that is responsible for creating a new instance of an XOR.
=====reset()=====
reset() will reset both inputs coming into the XOR to FALSE values.
myXorGate.reset();
^ Function ^ Parameter(s) ^ Return value |
| void reset() | no parameters | none |
=====set(bool)=====
set(bool) will take the parameter and set both inputs to that value.
myXorGate.set(true);
^ Function ^ Parameter(s) ^ Return value |
| void set() | bool | none |
=====set(bool, bool)=====
set(bool, bool) will take the parameter and set each input to a unique value.
bool a = true;
bool b = false;
...
myXorGate.set(a, b);
^ Function ^ Parameter(s) ^ Return value |
| void set() | bool, bool | none |
=====setvalue()=====
get() will retrieve the output of the XOR.
bool output = myXorGate.get();
^ Function ^ Parameter(s) ^ Return value |
| bool get(int) | none | boolean value of gate's output |