Okay, I think I fixed the reverse problem; I just made a little do while to switch it the right way.
But now I have a different problem. It keeps returning 1000 +1 as 0011 and I can't figure out why. I keep going back over it but I can't find where it's going wrong.