In the references that we use, I usually see either a 2 or 3-input logic gate. Four-input gates come by once in a while. However, is there a certain limit to the number of inputs a logic gate can have theoretically? I'm assuming in actual practice there is some sort of limit due to the increased complexity as number of input increases. But just hypothetically, are we limited to 4 (because that's the maximum I ever saw in a text by far)? Thanks.
The maximum number of gate inputs is limited due to electrical constraints. It depends on the technology being used.
For example:
A CMOS NAND with three inputs has three transistors connected in series
The more inputs, the higher the resistance to draw the NAND output from high to low.
Practical circuit designs strive to either minimize the number of components, the switching latency or the silicon die area.
For a high number of inputs, gates are typically composed of several smaller gates.
Example:
AND5 realized as NAND3 + NAND2 + NOR2