Here you can find the source of zeroCount(long n)
static public int zeroCount(long n)
//package com.java2s; //License from project: Open Source License public class Main { static public int zeroCount(long n) { long k;/* w w w.j a v a2 s. com*/ int count = 63; if (n == 0) { return 64; } k = n << 32; if (k != 0) { count -= 32; n = k; } k = n << 16; if (k != 0) { count -= 16; n = k; } k = n << 8; if (k != 0) { count -= 8; n = k; } k = n << 4; if (k != 0) { count -= 4; n = k; } k = n << 2; if (k != 0) { count -= 2; n = k; } k = n << 1; if (k != 0) { count -= 1; n = k; } return count; } }