public class azert { public static void main(String[] Args){ int i = 6, j, compteur=0; int[] tab = new int[8]; int[] copie = new int[8]; for(j=0; j<8; j++){ tab[j] = i&1; i = i >> 1; /*System.out.println(j+" bits reverse = "+tab[j]);*/ } for(j=7; j>0; j--){ copie[j]=tab[compteur]; compteur++; } for(j=0; j<8; j++){ System.out.println(j+" bits reverse = "+copie[j]); } } }