You are in a room with four buttons and a piece of paper.

There is a weird dialogue about logic gates on the paper.

Hello, my favorite logic gates are AND and NAND

. I said Hello And he said Hi Hi and he asked me if I liked the AND gate and I replied Yes

then he said: so Come Get The AND g

ate and then I went to his house and I Got The Gate and then his friend came and said Hi and I said H

ello and then I asked what are these logic gates you're holding and he replied Oh they are AND and AND gates.

The buttons have labels:

- JvKq1t65K0

- DHI3A3jZ3R

- VX9g4S15f6

- gVLYHV8D29

Only one of the buttons opens the exit door. Which is the correct one?

Hint 1:

A fixed width font may help.

Hint 2:

You have to remove some things to get the right message.

  • 1
    $\begingroup$ Hi and welcome to the site. Nice puzzle. Your hint does suggest that a format-edit of your original quesion might be a good idea. Have you considered that? (The hint refers to the button labels?) You could simply use "code formatting" for example. $\endgroup$
    – BmyGuest
    Sep 14, 2016 at 9:37
  • $\begingroup$ I thought about putting the text in a code block, but that would make the italic text look a bit weird because of the asterisks. $\endgroup$
    – acrolith
    Sep 14, 2016 at 12:21

2 Answers 2


The correct button is labelled:



Removing the italics and whitespace, we get five lines of equal length:


By changing all non-capitalized characters to -, we get the following:


This looks like the string \D$. If interpreted as a regular expression, \D means any non-digit character, and $ means the end of the line. So, this expression will match any line that does not end with a digit.

Looking at the button labels, only one label fits this criteria: DHI3A3jZ3R.

  • $\begingroup$ This answer is correct! Great job. $\endgroup$
    – acrolith
    Sep 21, 2016 at 22:06

I'm trying to work out the message.

I think that

The word "Hello" (with the 'low' in it) represents 0 or a FALSE value, while "Hi" represents 1 or TRUE.

I don't know yet if

The italicized parts are meaningful in decoding the message, or if they're used in lieu of quote marks. I'm leaning toward the former because there are a few things not italicized that aren't quoted words.

If I

Just read the non-italic parts and count "hello" as 0 (low), "oh" as 0, "Yes" as 1, and "Hi" as 1 (high), I get: 0 AND NAND 0 AND 1 1 1 AND 1 0 0 AND AND This doesn't make sense to me yet. I'm not certain that it's right.

Am I on the right track?

  • $\begingroup$ No, you're not. $\endgroup$
    – acrolith
    Sep 14, 2016 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.