2013年12月8日星期日

Find Great God help answer ~ ~ ~

Great God helped me see why the int type exceeds the maximum range, the output will eventually become zero, rather than negative ?
------ Solution ------- -------------------------------------
65536 * 65536 binary outcome take 32 is a 0
------ Solution --------------------------------- -----------


+ +
Yes, originally 0 , is not beyond the range of 0
------ Solution ---------------------- ----------------------


32 th power . Take the low 32-bit result is 0


------ Solution ------------------------------------ --------

65536 * 65536 = 4294967296, its binary representation is :
1 0000 0000 0000 0000 0000 0000 0000 0000 There are 33 , int type to take the low 32 , which is 32 0 ; .

------ For reference only ---------------------------------- -----
pro, help me to explain a specific point? ? The concept is not very clear ah brother
------ For reference only -------------------------------- -------
65536 hex is 3CB0, two multiply finish is how variable 0 Yeah

没有评论:

发表评论