For example, my list is something like this:
frame = [0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0]
Now, I'm working on Hamming's redundancy and i wanted to add something like this (2s are for visibility):
frame or new_frame = [2, 2, 0, 2, 1, 1, 1, 2, 0, 1, 0, 0, 0, 1, 0]
This might be basic but I really can't think of some way, without involving much work on the CPU, to do this smoothly.
Also this has to be done after the first frame is created, by which I mean, I can't add the redundancy bits while creating the frame.