bool HexToDecimal(char hex, int* decimal) {
  if (hex >= '0' && hex <= '9') {
    *decimal = hex - '0';
  } else if (hex >= 'A' && hex <= 'F') {
    *decimal = 10 + (hex - 'A');
  } else if (hex >= 'a' && hex <= 'f') {
    *decimal = 10 + (hex - 'a');
  } else {
    return false;
  }
  return true;
}
bool HexToDecimal(char hex, int* decimal) {
  if (hex >= '0' && hex <= '9') {
    *decimal = hex - '0';
  } else if (hex >= 'A' && hex <= 'F') {
    *decimal = 10 + (hex - 'A');
  } else if (hex >= 'a' && hex <= 'f') {
    *decimal = 10 + (hex - 'a');
  } else {
    return false;
  }
  return true;
}