# A conversation about logic gates

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.

• 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. – BmyGuest Sep 14 '16 at 9:37
• 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. – acrolith Sep 14 '16 at 12:21

The correct button is labelled:

DHI3A3jZ3R

Because:

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

Hello,ANDandNAND
.HelloAndHiHiYes
soComeGetTheANDg
ateGotTheGateHiH
elloOhANDandAND.

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

H-----AND---NAND
-H----A--H-H-Y--
--C---G--T--AND-
---G--T--G---H-H
----O-AND---AND-

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.

• This answer is correct! Great job. – acrolith Sep 21 '16 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?

• No, you're not. – acrolith Sep 14 '16 at 15:19