Finally I got it
But one question: What is really calculated here, or in other words what does the php-solver do?
A little php
I think there is nothing special about the calculation.
It is a bit manipulation with xor [0].
10001101001110111 = 72311
10101110110110101 = 89525
00100011111000010 = 18370
[0] http://en.wikipedia.org/wiki/Xor
It is a bit manipulation with xor [0].
10001101001110111 = 72311
10101110110110101 = 89525
00100011111000010 = 18370
[0] http://en.wikipedia.org/wiki/Xor
I did this with Netbeans PHP application, but I was left curious, so I tried this with Python, and succeeded:
Pretty simple imho, PHP is way more complicated, and this is alot simpler than that PHP one. Again, imo. But it was pretty simple. And I had neither no idea that I could just XOR it between the values.
This was a nice challenge, altho a hard one for those who might not have any experience in PHP;
How to install the environment aka XAMPP, NetBeans, etc.
Translating the code into Python would've been ever better if I was a first-timer in PHP and wouldn't have had the programs needed.
Code: Select all
#A little PHP
x = 72311
y = 89525
k = x ^ y
print k
This was a nice challenge, altho a hard one for those who might not have any experience in PHP;
How to install the environment aka XAMPP, NetBeans, etc.
Translating the code into Python would've been ever better if I was a first-timer in PHP and wouldn't have had the programs needed.
-
- Posts: 49
- Joined: Fri Jul 02, 2010 9:34 pm
- Location: Egypt
- Contact:
A little PHP
I just ran the equation through python