Changed bit operations to reduce code size on pic12.