122. Data Conversion and Encoding-ii

Question.3

A developer parses a hex string received over UART:

uint16_t hex_to_int(const char *s) {
   uint16_t val = 0;
   while (*s) {
       val <<= ___;
       val |= hex_char_to_val(*s);
       s++;
   }
   return val;
}

What goes in the blank?

Need Help? Refer to the Quick Guide below

Select Answer