public class Test{

    public static void main(String[] args) throws Exception{

        long x = -9_150_890_020_540_546_044l;
        String str = Long.toBinaryString(x);
        long y = Long.parseLong(str, 2); //throws exception
        System.out.println(x == y); //should be the same
        
    }
}