private void updateGate(String CLK, String CLR, String J, String K, String Q, String NQ) throws InvalidPinException {
		if (this.isLow(CLR)) {
			this.setPin(Q, Pin.PinState.LOW);
			this.setPin(NQ, Pin.PinState.HIGH);
		} else if (this.isRisingEdge(CLK)) {
			if (this.isLow(J) && this.isHigh(K)) {
				this.setPin(Q, Pin.PinState.LOW);
				this.setPin(NQ, Pin.PinState.HIGH);
			} else if (this.isHigh(J) && this.isLow(K)) {
				this.setPin(Q, Pin.PinState.HIGH);
				this.setPin(NQ, Pin.PinState.LOW);
			} else if (this.isHigh(J) && this.isHigh(K)) {
				if (this.isStateHigh(Q)) {
					this.setPin(Q, Pin.PinState.LOW);
					this.setPin(NQ, Pin.PinState.HIGH);
				} else {
					this.setPin(Q, Pin.PinState.HIGH);
					this.setPin(NQ, Pin.PinState.LOW);
				}
			}
		}
	}