Today I gave my son a piece of paper with this cryptic message: 00001100
.
“This is you”, I told him – “and this is your sister”: 00001111
.
“If you can work this out, I'll pay for your v-bucks!”
I gave him a single hint. The word “binary”.
Unfortunately, it only took him 5 minutes to Google the answers: 12
and 15
.
Nevertheless, I made the pen below, and we had a talk about what binary numbers are – and how computers work:
If you have kids, let them click on the circles until the sum equals their age (or their parents age!), and if they're curious – well, then you have an excuse to talk about programming and stuff 😁
Thanks for reading, and Happy Easter!
Top comments (7)
00010010
It’s also possible with
age.toString(2)
, but I assume leading 0s need to be there.Thanks! Yes, I want to show the leading zeroes, so with
padStart
it'stotal.toString(2).padStart(8, '0')
Cool site, the conversion is great.
Thanks!
Very cool, quick little app and a great way to start a discussion about binary numbers and computer science in general for kids. Nicely done!
Thanks!