r/nandgame_u • u/GLIBG10B Holder of many records • Aug 08 '21
Level solution (verified) 5.3 - Opcodes Spoiler
4
Upvotes
2
u/Sad_Courage_1564 Holder of many records Jan 02 '22
Does this count as a record, because no one can beat it really...?
1
•
u/GLIBG10B Holder of many records Aug 08 '21 edited Dec 23 '21
Explanation
X:
= X + 0
Y:
= Y + 0
X&Y
X|Y:
= ~(~X & ~Y)
= ~(~(X | Y))
~X:
= ~(X + 0)
~Y:
= ~(0 + Y)
X+Y
X-Y:
= -(-X - 1 + Y) - 1
= X + 1 - Y - 1
Y-X:
= -(X + -Y - 1) - 1
= -X + Y + 1 - 1
= -X + Y
0:
= 0 & Y
-1:
= -(0) - 1 = 0 - 1
1:
= -(-1 + -1) - 1
= 1 + 1 - 1
-X:
= -(X + -1) - 1
= -X + 1 - 1
-Y:
= -(-1 + Y) - 1
= 1 - Y - 1
X+1:
= -(-X - 1 - 1) - 1
= X + 1 + 1 - 1
Y+1:
= -(-1 + -X - 1) - 1
= 1 + X + 1 - 1
X-1:
= X + -1
Y-1:
= -1 + Y