I'm receiving A/D data comprised of 3 10 bit samples packed in 32 bits. Word |0 9| 19 | 29 | | 31 | 0 | Sample 0 | Sample 1 | Sample 2 | x | x | I need an 'unpacker', such that each sample 10 bit will be stored in 16 bits. I'd also like an unpacker that'll store two samples (Sample 0 and Sample 1) in 32 bits. In this case sample 2 will also be stored in 32 bits. The x's are dont cares. I've got a solution here where that's comprised of 'ugly' & ad shift (>>) operations. I'm usure if there's a more suitable approach perhaps with bitset or ...... Thanks in advance...