64 comments

[ 2.1 ms ] story [ 135 ms ] thread
Not mobile friendly. Love it otherwise
Simple and fun, I like it!

It took me a while to figure out the answer, but it was because the buttons disappear off the screen on a mobile device. I had to play in landscape mode.

There is also a small bug where if you swipe to flip the bits, the button state is no longer in sync

At first glance, I was kinda lost when I saw only 7bit in use. My 8bit OCD kicked it.

I still have kind of mixed feelings about a website that does not use bit lengths that are powers of 2.

It will when you get a number that requires it
What a clever domain name :)
Did HN autocorrect the title to add a starting capital?
This site is awesome! The kids are gonna be alright.
(comment deleted)
Great domain name, but the certificate isn’t trusted on my iPhone (iOS 17).
Do you somehow have the wrong date? Because the cert is valid.
It’s working now, I wonder if it was related to the public WiFi I was using earlier. I’ll try it again next time I am there, everything else seemed to be working fine.
The examples are Nice numbers, nice.
Exactly my thoughts 10100111001!
After dismissing the final pop-up it will go on to proclaim:

  > Yes!
  > 80085 is 00000000000000000 in binary!
It just converted the result to base 0, I see nothing wrong here!

Edit: meant answer not result

It does look like a lot of 80085 if you squint a bit.
Obligatory "noice".

Should be made mobile responsive. Difficult to use on mobile.

There are only two hard things in programming:

1) off by one errors

(in this case it comes in the annoying form of messed up floor/ceil calculations)

This is because for any n-bit number, the maximum value is 2^n - 1, e.g. 2^8 - 1 = 255

But the number of values is just 2^n, because that includes zero.

I'd love to use this tool with my high school CS class, but the "suggestive" numbers would, unfortunately, prevent me. Great concept and well implemented!

-specifically, some of the first few numbers are 69 and 80085

There are only three predefined numbers (69, 420, 80085). It doesn’t look to difficult to replace those in the source if you want to provide your own version.
You can edit the url to use any number. :)
a specific example: https://looo.lol/?x=666
That might not matter enough if the students start saying, “Have you seen the examples on that website loco5niner showed us? looolol”.

I also can’t help but mention that I already know the answer to this example from one of my favorite jokes in Futurama: https://youtube.com/watch?v=_4TPlwwHM8Q

Why. 69 is a number, if your students happen to find it amusing surely that's good?
I'm not going to entertain my students with crass humor.
Something like this could be really helpful to learn IPv4 subnetting/addressing. My aha moment in fully understanding it was learning binary, most of the resources I used at the time didn’t explain it very well.
Meh, just go left-to-right, and click the buttons, starting at the first... if it's higher than the wanted number, disable that button, and go one position to the right, and try that.
Why is Telstra (Australian telecom/ISP) blocking this website?
If you're into binary math games, also see Flippy Bit And The Attack Of The Hexadecimals From Base 16 (note: site has sound).

https://flippybitandtheattackofthehexadecimalsfrombase16.com...

Yet another site falls victim to CSSWG’s absolutely asinine, entirely indefensible idea to make centered flexbox items in a too-small container clip and become completely inaccessible on the left side.

Anyone who says flexbox “solved” centering hasn’t been paying attention.

It blows my mind that this is the “best” (or at least most ubiquitous) layout engine in existence.

Edit: to be more constructive, can anyone offer the OP a concise, CSS-only, diff that would fix the mobile issue without changing the DOM structure or layout on larger screens? It might be possible with a min-width: fit-content, but I have no development setup available at the moment.

`flex-wrap: wrap;`

and maybe, if you want, a `min-width` on the boxes themselves

(comment deleted)
Wrapping is undesired, the linear presentation is critical here. And the box is the screen in this case, on a mobile one the highest order buttons are missing.

It’s sad that this had been up for so long with no real solutions. A genuine failure of the CSSWG.

You can't have >x of reasonably sized and spaced boxes on a screen horizontally without wrapping, regardless of layout engine. Besides, wrapping can be done presentationally while keeping the linearity.

In this case, I'd probably switch to an automatic grid layout with equal size boxes regardless of content size. Then it could neatly wrap into multiple rows while keeping the boxes at a constrained size.

Yes you can, it’s called scrolling. And the items on the right of the screen are indeed accessible via scrolling, it’s the items on the left of the screen that are entirely inaccesible. There is no possible justification for this design, it’s pure slop. (CSSWG’s design, not this site which is hamstringed by their incompetence)
This website is a reminder that if you have $64 then you are a millionaire in binary.
Anyone else mindlessly go from left to right?
It's the easiest way to do it and frankly what I did in college.
That's the correct way... big adjustments on left-hand side until you're ready for small-adjustments on right-hand side. This game takes less than 2 minutes.

You could expand this game with much more advanced operations and tricks that people devised but I guess those would involve algorithms too. Floating point would be a good expansion and much better interactively than a textbook.

This is cool, it somehow reminds me with a Resident Evil 3 (the old one) game puzzle, can’t remember what puzzle but it had similar concept.
Bad on mobile unfortunately. The CSS doesn’t wrap for portrait screens
This is pretty cool. Better if includes signed integers.
If you don't want to think, do a binary search.

Algo:

    * Start at the left most number
    * Click the number
    * If the result is higher than target click again to turn it off
    * Move right, back to step 2
Is that a binary search (other than literally being a binary search)?

For a proper binary search you should right nextdigit+first digit/2, if you're going backwards.