There are several very useful functions introduced in VFP6, I believe:
BITAND(), BITOR(), BITXOR(), BITLSHIFT(), BITRSHIFT(), BITSET(), BITTEST(), BITNOT(), BITCLEAR()
To get the high 4 bits of lnByte:
lnHigh4 = BITRSHIFT( lnByte, 4 )
* OR:
lnHigh4 = INT( lnByte / 16 )
To get the low 4:
lnLow4 = BITAND( lnByte, 0x0F )
* OR:
lnLow4 = lnByte % 16
If you need either as a char:
CHR( lnHigh4 )
CHR( lnLow4 )