package org.example;

public class bin2 {
    static void main(String[] args) {
       int num1 = 13;

        System.out.printf("%4s%n",Integer.toBinaryString(num1));
        System.out.println("1010"); //0b1010
        System.out.println("-----------");
        System.out.printf("%4s%n",Integer.toBinaryString(num1&0b1010));
        System.out.println("Resultado: "+ (num1&0b1010));


       // boolean condicion = ((num & 0b1010) == 0b1010);


        //((num & 0b1010) == 0b1010) → Tras aplicar el filtrado el resultado tiene que ser 10

        // OK → *1*010      → 10
        // OK → *1*1*1*0    → 14
        // OK → *1*1*1*1    → 15

        // FALLIDO → NO CORRESPONDA AL CONJUNTO [10,14,15].
    }
}
