package com.sheep.gamegroup.util;

/**
 * 二进制工具
 * Created by realicing on 2018/9/3.
 * realicing@sina.com
 */
public class BinaryUtils {

    /**
     * 判断数字number的第bit位是否为1
     * @param number
     * @param bit
     * @return
     */
    public static boolean is(int number ,int bit){
        return ((number >> (bit - 1)) & 1) == 1;
    }
}
