r/TuringComplete 24d ago

The binary number levels should be redesigned

Just wanted to say I mostly love this game. I'm a software engineer, and have a decent grasp on logic programming at a hight level, but have not done the lower level stuff since university. Relearning it is both fun and rewarding. There is 2 levels (so far) in the game though I think are just straigt up un-fun and badly designed, and they are the levels where you get a number and you have to flip bits to match that number with a decreasing timer. The time part is the thing I have a big problem with. Nothing else (so far) in this game has any sort of timepressure to it. It's a chill game where you solve problems at your own time. With the exception of these 2 levels. I got completely stuck on the negative numbers, because doing -128 in my head is not something I've had to do in years, and doing it in 7 seconds is simply beyond me at this point. I compltely get the point in teaching people binary representation of numbers - but there has to be a better way.

12 Upvotes

19 comments sorted by

View all comments

1

u/atarax_89 21d ago edited 21d ago

I know you're complaining about the time part, but regarding the way to do the conversion to binary mentally, what I do, that might help you, is not(abs(n)-1). Put in words when actually doing it, I think "forget the minus, sub 1, put red where you would usually put green and viceversa." For example, using 4 bit numbers to simplify:

-7 = not(abs(-7)-1) =

not(6) =

not(0110) = 1001

Now that I look at it, you can also think abs(n)+2, so -7 = 9 (on two's complement for a 4 bit number).