@Override
	public void simulate() {
		if (this.node != null && this.circuit.getSimTime() != this.time) {
			String potential = this.node.getPotential().toTTL();

			this.time = this.circuit.getSimTime();
			this.oldval = this.val;

			if (potential != null) {
				if (potential.equals("HIGH")) {
					this.val = 1;
				} else if (potential.equals("LOW")) {
					this.val = 0;
				} else {
					this.val = -1;
				}
			} else {
				this.val = -1;
			}

			this.circuit.updateTrace();
		}
	}