The easiest guide to XOR boolean.

What is XOR operation? XOR is a logical, boolean, operator to let you get ‘1’ if either of values but not both is ‘1’, and ‘1’ is representing a true value. Now imagine XOR in its simplest way like this.

You are in your elementary class. Your teacher are very happy because you can do the question very well. He then asked you “Are you a local student OR international student?”.”I am international student”. Now think, “OR” there is really an “OR”? Guess true, it is not. OR operation let us get ‘1’ if either is ‘1’ and we can’t be international and local student at the same time, do we? Now don’t ask about the possibility of elementary class that have international student. Yes it is possible 😀

Electron girl

I said I can be in two different places in one time. I was born in two distinct cities as well…

The same story is like: your friend ask you “Hi bro. What city are you born in?” And you said “I was born in Jakarta” and you can’t say “I was born in Jakarta and Tokyo” or “I was born in Jakarta or Tokyo” but you do can “I was born in Jakarta exclusive-or Tokyo”. The last answer supposed to give meaning that you want to sound more smarter than him.

This is how semanggi looks like

Now compare again to “Hi bro, what did you eat this morning? You smell so bad!”. And you can said “I ate semanggi” or “I ate pizzas and dodotiros” or “I ate pizzas or dodotiros“. The last answer, yes, if you want to sound smarter.

Now. That is how XOR work. You understand XOR not?


One thought on “The easiest guide to XOR boolean.

  1. Pingback: The easiest guide to “Twos Compliment” | fbk

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s