private void encodePositions(int number,int posS,int posE,int[] encoding)
    {
        String bin = Integer.toBinaryString(number);
        System.out.println("In encodePositions "+bin);
        System.out.println("start"+posE);
        while(bin.length()<=posE-posS)
        {
            bin = 0+bin;
        }
        for(int i=posE-posS,j=posS;i>=0;i--,j++)
        {
            System.out.println("h"+j);
            encoding[j] = Integer.parseInt(bin.charAt(i)+"");
            System.out.println(encoding[j]);
        }
    }