public static String formatCode(String code, int bit){
        if(code.length() < bit){
            code = String.format("%0" + (bit-code.length()) + "d", 0) + code;
        }
        return code;
    }