public static int getMax(int[] bits) {
    return bits.length * 0x20;
  }
Gets the maximum index (exclusive) for the given bit set.

@param bits {@code non-null;} bit set in question
@return {@code >= 0;} the maximum index (exclusive) that may be set
android/android_framework/dex-maker/src/main/java/com/android/dx/util/Bits.java