-
- int maxInputs = 1 << select.length;
- if(this.inputs.length > maxInputs)
- throw new IllegalArgumentException("There are more inputs ("
- + this.inputs.length + ") to the MUX than supported by "
- + select.length + " select bits (" + maxInputs + ").");
-
- outI = out.createInput();
+
+ int maxInputs = 1 << select.length();
+ if (this.inputs.length > maxInputs)
+ throw new IllegalArgumentException("There are more inputs (" + this.inputs.length + ") to the MUX than supported by "
+ + select.length() + " select bits (" + maxInputs + ").");
+
+ this.out = out;