>Servo1 = PrtB and %00000111

Try it with a bitwise & instead of a logical AND.