Combine two mutually exclusive byte arrays into one
<p>I have 2 byte arrays of 5 bytes each. Each byte array represents 40 flags and I need to combine both arrays into one array of 5 bytes. Each of the byte arrays are mutually exclusive which helps, Although I would prefer to validate they are mutually exclusive.</p>

<p>So my question is, how can I combine the two mutually exclusive byte arrays into one.</p>

<p>The only way I can think of doing it is bit shifting across both arrays and comparing each value, but there must be an easier way of doing it. Can anyone help?</p>