Search found 4 matches

by lortedy
Fri May 04, 2012 11:48 am
Forum: Challenges Solved
Topic: Didactic Bytes
Replies: 10
Views: 926

Convert each number from decimal to binary using "calc.exe": 199 = 11000111 77 = 1001101 202 = 11001010 Append a 0 at the beginning of 77's binary value. Concat the 3 values => 110001110100110111001010 Convert binary to decimal => 13061578 Python: def binary2decimal(binaryNumber): multipli...
by lortedy
Fri May 04, 2012 11:33 am
Forum: Challenges Solved
Topic: Didactic XOR
Replies: 7
Views: 1155

Use "calc.exe" in Scientific mode. Select Hex as numeration base then XOR 9f with c7.
=> 58 which converted to ASCII = 'X'

Python:

Code: Select all

a = 0x9f
b = 0xc7
print chr(a^b)
=> X
by lortedy
Fri May 04, 2012 10:41 am
Forum: Challenges Solved
Topic: Who goes there?
Replies: 22
Views: 4162

Code: Select all

name = "lortedy"
print name[::-1]
by lortedy
Thu May 03, 2012 10:22 pm
Forum: Challenges Solved
Topic: Didactic Byte
Replies: 21
Views: 3643

Use "calc.exe" in Scientific Mode and input number then set numeration base to Hex.
=> E9

Manual solution:

Code: Select all

233 % 16 = 14 r 9
14 % 16 = 0 r 14 (14 = E in hex)
=> E9

Python:

Code: Select all

nr = 233
print hex(nr)
=> 0xe9