The usual way of doing it is:
Code:
CCP2CON.4 = X.0
CCP2CON.5 = X.1
CCPR2L = X>>2
PS. The DIG operator does not work like you seem to think.