private void updateGate() throws InvalidPinException {
		int address = 0;
		int offset = 1;
		for (int i = 0; i < this.chipInputs.size(); i++) {
			if (this.isHigh(this.chipInputs.get(i))) {
				address += offset;
			}
			offset *= 2;
		}

		if (this.isRisingEdge("CLK")) {
			if (this.isHigh("CLR")) {
				this.presentState = this.initialState;
			}
			this.nextState = this.stateTable.get(this.presentState).get(address).getState();

			List<Boolean> data = this.stateTable.get(this.presentState).get(address).getData();
			int delay = this.stateTable.get(this.presentState).get(address).getDelay();

			for (int i = 0; i < this.chipOutputs.size(); i++) {
				if (data.get(i).booleanValue()) {
					this.setPin(this.chipOutputs.get(i), Pin.PinState.HIGH, delay);
				} else {
					this.setPin(this.chipOutputs.get(i), Pin.PinState.LOW, delay);
				}
			}
			this.presentState = this.nextState;
		}
	}