code: public static char binaryToHexDigit(final boolean[] src, final int srcPos) {
          if (src.length == 0) {
              throw new IllegalArgumentException("Cannot convert an empty array.");
          }
          if (src.length > srcPos + 3 && src[srcPos + 3]) {
              if (src.length > srcPos + 2 && src[srcPos + 2]) {
                  if (src.length > srcPos + 1 && src[srcPos + 1]) {
                      return src[srcPos] ? 'f' : 'e';
                  }
                  return src[srcPos] ? 'd' : 'c';
              }
              if (src.length > srcPos + 1 && src[srcPos + 1]) {
                  return src[srcPos] ? 'b' : 'a';
              }
              return src[srcPos] ? '9' : '8';
          }
          if (src.length > srcPos + 2 && src[srcPos + 2]) {
              if (src.length > srcPos + 1 && src[srcPos + 1]) {
                  return src[srcPos] ? '7' : '6';
              }
              return src[srcPos] ? '5' : '4';
          }
          if (src.length > srcPos + 1 && src[srcPos + 1]) {
              return src[srcPos] ? '3' : '2';
          }
          return src[srcPos] ? '1' : '0';
      }
docs: <p>
  Converts binary (represented as boolean array) to a hexadecimal digit using the default
  (Lsb0) bit ordering.
  </p>
  <p>
  (1, 0, 0, 0) is converted as follow: '1'
  </p>
  
  @param src the binary to convert
  @param srcPos the position of the lsb to start the conversion
  @return a hexadecimal digit representing the selected bits
  @throws IllegalArgumentException if {@code src} is empty
  @throws NullPointerException if {@code src} is {@code null}