I can have an integer in Perl which exceeds 32 bits:
Output :-for ($i=0;$i<60;$i++) { print "$i: "; print 1 << $i; print "\n"; }
I don't find any documentation which explains the above behaviour. Could anyone explain me the above.0: 1 1: 2 2: 4 3: 8 4: 16 5: 32 6: 64 7: 128 8: 256 9: 512 10: 1024 11: 2048 12: 4096 13: 8192 14: 16384 15: 32768 16: 65536 17: 131072 18: 262144 19: 524288 20: 1048576 21: 2097152 22: 4194304 23: 8388608 24: 16777216 25: 33554432 26: 67108864 27: 134217728 28: 268435456 29: 536870912 30: 1073741824 31: 2147483648 32: 1 33: 2 34: 4 35: 8 36: 16 37: 32 38: 64 39: 128 40: 256 41: 512 42: 1024 43: 2048 44: 4096 45: 8192 46: 16384 47: 32768 48: 65536 49: 131072 50: 262144 51: 524288 52: 1048576 53: 2097152 54: 4194304 55: 8388608 56: 16777216 57: 33554432 58: 67108864 59: 134217728
In reply to Left shift operation done more than 32 times by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |