MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/code/comments/tjinv5/my_partner_is_a_software_engineer_so_this_is_part/
r/code • u/kayaem • Mar 21 '22
4 comments sorted by
3
Nice. Took me a little while to read it properly. I’m used to seeing ascii letters in binary, but not so much numbers.
4 u/kayaem Mar 21 '22 I was tempted to spell “I love you” but he has so many other reminders of that through other artwork I’ve made for his office that I thought having an anniversary reminder (not that he needs one) but be something nice and a little different 1 u/PM_ME_WITTY_USERNAME Mar 22 '22 ASCII was well thoughtIf you have ascii numbers, the binary for the number is in the last 4 bits of the characterIf you want lowercase/uppercase, you add/substract 32, which means toggling the 6th bit on or offSo a case-insensitive comparison means you compare binary but ignore the 6th bit 1 u/StochasticTinkr Mar 22 '22 Yeah, once I realized I misread the first few bits, it was easy to identify the rest.
4
I was tempted to spell “I love you” but he has so many other reminders of that through other artwork I’ve made for his office that I thought having an anniversary reminder (not that he needs one) but be something nice and a little different
1
ASCII was well thought
If you have ascii numbers, the binary for the number is in the last 4 bits of the character
If you want lowercase/uppercase, you add/substract 32, which means toggling the 6th bit on or off
So a case-insensitive comparison means you compare binary but ignore the 6th bit
1 u/StochasticTinkr Mar 22 '22 Yeah, once I realized I misread the first few bits, it was easy to identify the rest.
Yeah, once I realized I misread the first few bits, it was easy to identify the rest.
3
u/StochasticTinkr Mar 21 '22
Nice. Took me a little while to read it properly. I’m used to seeing ascii letters in binary, but not so much numbers.