private void updateGate() throws InvalidPinException {
		if (this.isHigh("CLR")) {
			for (int i = 0; i < this.width; i++) {
				String output = "Q" + i;
				this.setPin(output, Pin.PinState.LOW);
			}

		} else if (this.isRisingEdge("CLK") && this.isHigh("EN")) {
			boolean zero = true;

			for (int i = 0; i < this.width; i++) {
				String input = "D" + i;
				String output = "Q" + i;
				if (this.isHigh(input)) {
					this.setPin(output, Pin.PinState.HIGH);
					zero = false;
				} else if (this.isLow(input)) {
					this.setPin(output, Pin.PinState.LOW);
				} else {
					System.out.println("Input not HIGH or LOW");
				}
			}

			if (zero) {
				this.setPin("ZERO", Pin.PinState.HIGH);
			} else {
				this.setPin("ZERO", Pin.PinState.LOW);
			}
		}
	}