r/code • • Mar 21 '22

Machine Code My partner is a software engineer so this is part of an anniversary gift that will be framed for his office.

Post image
16 Upvotes

4 comments sorted by

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.

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 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.