Concatenation builds MSB→LSB from left to right.
Slices keep their own order ([3:0] means 3 is the MSB of that slice).
[3:0]
3
Unary ~C flips one bit; it’s fine inside the concat { ... }.
~C
{ ... }
module concat8_packer( input [3:0] A, input [1:0] B, input C, input D, output [7:0] OUT ); assign OUT ={ A[3:0], B[1:0], ~C, D }; endmodule