you might get an answer if you leave the decimal notation and go to binary. Here is a mini example
dec2bin(248) = 11111000
dec2bin(252) = 11111100
So bitand(redc, 248) gets you all but the last 3 digits of your redc.
dec2bin(bitand(bin2dec('10101011'), 248)) = 10101000
I assume that you store whatever Info you need in that 3 digits. Similarly bitand(redc, 7) will get you the last 3 bits with the desired info.
dec2bin(bitand(bin2dec('10101011'), 7)) = 00000011
You might play around with bitand and bitor for clarity.