Home  >  Article  >  Backend Development  >  32位系统左移溢出,64位系统不溢出,会否在64位系统 保留32左溢的结果

32位系统左移溢出,64位系统不溢出,会否在64位系统 保留32左溢的结果

WBOY
WBOYOriginal
2016-06-13 12:08:51965browse

32位系统左移溢出,64位系统不溢出,能否在64位系统 保留32左溢的结果

<br />echo 83661<<15;<br />//32系统结果:-1553563648<br />


<br />echo 83661<<15;<br />//64系统结果:2741403648<br />


想在64位系统 中  保留 32的溢出结果,请问怎么弄,小弟想不明白,请教各位大大。
------解决思路----------------------
echo  2741403648 - 0x100000000;<br />
-1553563648

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn