I have a huge confusion in understanding the Reg Data type in verilog. I know that we use reg variable when we need to store a value(s) in this variable. But for example lets consider that we have 4x1 MUX , I see some codes creates the input as
input a
input b
input c
input d
And for the output as
output reg z
So my question why did we use reg data type for the output only ? Why we didn't used it in the input variables ?
Also can I use a shorthand notation for the declaration of these inputs as
input a[4]
Is this right ?