Just to correct myself, the code in my last post should have been:

lCTemp=(B5+8)>>4
IF lCTemp.27 THEN lCTemp=lCTemp|$F0000000

I accidentally used an AND instead of an OR