I haven't followed your previous questions, but I made a quick modification to the VI, so it will have less code. I haven't checked it, so it's possible it will have some different behaviour. Go over the new code I wrote and study it. Unless I missed something it should have the same functionality. Look at the changes and try to learn from them. For example, you can see I changed the code in both your loop because it was redundant. Each piece was doing the exact same thing. I added what you asked for by comparing to 0 and ANDing the result. Be aware that there are better ways of doing this, but this was the fastest.
___________________
Try to take over the world!