peeratep Posted July 28, 2006 Share Posted July 28, 2006 on windows->-2694274578 ^ 1136121015 = 484406617on linux->-2694274578 ^ 1136121015 = -1011362633i want value 484406617 on linux..help me please!Thank you... Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/ Share on other sites More sharing options...
redarrow Posted July 28, 2006 Share Posted July 28, 2006 what is it then a time stamp or what?your are blunt sorry. Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/#findComment-65022 Share on other sites More sharing options...
effigy Posted July 28, 2006 Share Posted July 28, 2006 How many bit systems are they? 32? 64? Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/#findComment-65186 Share on other sites More sharing options...
Barand Posted July 28, 2006 Share Posted July 28, 2006 intersting relationship between the second integer and the linux result[code]<?php$a = 1136121015;$b = -1011362633;echo '<pre>';printf ('%032s %12d<br>%032s %12d linux<br>', decbin($a), $a, decbin($b), $b);echo '</pre>';?>[/code]-->[pre]01000011101101111101010010110111 113612101511000011101101111101010010110111 -1011362633 linux[/pre] Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/#findComment-65415 Share on other sites More sharing options...
effigy Posted July 28, 2006 Share Posted July 28, 2006 From wiki:[quote]The standard Unix time_t (data type representing a point in time) is a signed integer data type, traditionally of 32 bits (but see below), directly encoding the Unix time number as described in the preceding section. Being integer means that it has a resolution of one second; many Unix applications therefore handle time only to that resolution. [b]Being 32 bits (of which one bit is the sign bit)[/b] means that it covers a range of about 68 years in total.[/quote]How does Windows handle signed integers? Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/#findComment-65426 Share on other sites More sharing options...
Barand Posted July 28, 2006 Share Posted July 28, 2006 Does this clarify ?[code]<?php$a = 31;$b = -31;echo '<pre>';printf ('%032s %12d<br>%032s %12d<br>', decbin($a), $a, decbin($b), $b);echo '</pre>';?>[/code]-->[pre]00000000000000000000000000011111 3111111111111111111111111111100001 -31[/pre] Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/#findComment-65429 Share on other sites More sharing options...
effigy Posted July 28, 2006 Share Posted July 28, 2006 From the guys (ikegami) over at www.perlmonks.net:[quote]Unix and Windows handle signs the same way: 2's complement. The problem is that -2147483648 is the largest negative that can be stored in 32 bits.Well, the problem is that -2694274578 is larger than -2147483648, but you are using 32 bit numbers.[/quote] Link to comment https://forums.phpfreaks.com/topic/15863-operater-xor/#findComment-65430 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.