Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

JAVA operation of left shif

$
0
0

This is a java prg pls make me understand why on left shifting 2 by 32 it o/p 10

class hi

{

public static void main(String args[])

{
    int a;

    a=2<<32;

    System.out.println(Integer.toBinaryString(a));

}

}

OUTPUT -- 10


Viewing all articles
Browse latest Browse all 39796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>