Hi, I'd like to know how it is possible to extract all 4 digits from an unsigned short int. I have a system where I use an unsigned short int and each "hex digit" represents something. For example:
I have to extract the hex digits 1, A, 2 and B from that value, but I don't know how to do that. I know how to extract nibbles from bytes, but an unsigned short int is usually two bytes in C, so I'm clueless.Code:0x1A2B
I appreciate your help!