I am trying to address a variety of bits in a 24-bit input from my top module to an xor module I created, but I need some help knowing how to format the code for it. This code works for my first case I need, however I need to assign bits 5, 10, 15, 20, and the value of 1 to the data bits 0-4 respectively in the XOR module. Specifically I want xorOut[1] to be xor of Data[5, 10, 15, 20] and 1, xorOut[2] to be xor of Data[9, 13, 17, 21] and 1, xorOut[3] to be the xor of Data[8, 11, 19, 22] and 1. I would like to know if that is possible to assign individual data bits in that manner and not consecutively. I am unsure how to do something like this, so any help would be appreciated.
module XOR(
input [4:0] Data,
output Out
);
assign Out = Data[0] ^ Data[1] ^ Data[2] ^ Data[3] ^ Data[4];
endmodule
module twobit(
input [24:0] Data,
output [24:0] Errors
);
wire [4:0] xorOut;
XOR u1 (.Data(Data[4:0]), .Out(xorOut[0]));
endmodule