Hello I having trouble understanding this and how for example it take an accent char like é
and converts it E9
. I could be missing something i get that it bit-shifts right 4. é = 11101000
and E = 01000101
shifting 4 doesn't makeE
right?
static const char *digits = "0123456789ABCDEF";
unsigned char ch;
*dest++ = digits[(ch >> 4) & 0x0F];//this returns E
*dest++ = digits[ch & 0x0F];//this returns 9