Thursday, November 21, 2013

Boolean Algebra

You may have heard that computers only use the numbers 0 and 1. It's true. Everything computers do is done using electronic switches, and those switches can only be either on or off. (That's not strictly necessary. It's possible to make an electronic switch that has in-between states, but on/off is the simplest and easiest way to make a switch.) But how can computers calculate larger numbers or do all the cool things computers do, if they can only use 0 and 1? Well, one of the fundamental ideas behind how computers work is Boolean algebra.

Boolean algebra is a type of math that only uses two values. These two values are usually called true and false, or 1 and 0. There are three basic operations of Boolean algebra.

NOT X, also written as ¬X is simply the opposite of X. If X is true, ¬X is false. If X is false ¬X is true. Unsurprisingly, ¬¬X=X.

X AND Y, also written as X∧Y is true if both X and Y are true. Otherwise, it's false. The AND operation is also sometimes written as multiplication, because it works the same way. 0*0=0, 0*1=0 and 1*1=1. And just as with multiplication X*0=0 and X*1=X, no matter what X is, X∧F=F and X∧T=X, no matter what X is.

X OR Y, also written as X∨Y is true if X is true, Y is true or both are true. The OR function is sometimes written as addition. Similar to normal addition, 0+0=0, 0+1=1 and 1+1=... Well, there's no 2, so 1+1=1. This has the properties that X∨F=X, just like X+0=X, and X∨T=T, unlike normal addition.

You can put these operations together to get more complicated operations. For example X XOR Y, also written as X⊕Y, is true if X is true, or Y is true, but not both. It can be built out of the other operations like this (X∨Y)∧¬(X∧Y). Similarly, NAND, NOR and XNOR are made by putting a NOT in front of an AND, OR and XOR, respectively.

Although I said there are three basic operations of Boolean algebra, there really only needs to be one. You can make every single Boolean operation out of just NAND or just NOR. For example, ¬X = X NAND X. X∧Y = ¬(X NAND Y) = (X NAND Y) NAND (X NAND Y).

Here's a challenge for you: How can you make the OR operation, using or NAND, or complementarily, how can you make AND using only NOR?

Wednesday, November 13, 2013

The Fundamental Question of Morality

The more I think about my last post, the more I think that "What should we do?" is the most fundamental question of morality. Should you kill one person to save five? Should you ever lie under any circumstance? It seems all moral dilemmas boil down to questions of action and decision.

But this alone doesn't really clarify matters much. It just pushes the ambiguity onto the word "should". What does it mean to say that you "should" do something?

Well, I came up with a partial answer here. As far as I can tell, for a "should" question to make sense, a goal is required. And I think in practice, whenever you make a decision, you do so for reasons, which can be described as goals.

But morality isn't just about how to achieve your goals. I think most people would say it's immoral for a sociopath to kill, even if that's his goal. In fact, I think most people would say it's immoral for someone to have such a goal.

So, maybe the most fundamental question of morality isn't "What should we do?" but rather, "What goals should we have?". But I just said "should" requires goals. How can you say what goals you should have without referring to goals? Is it even possible? If not, how can you answer the question?

Saturday, November 9, 2013

Wait, What's This Morality Stuff Again?

It turns out that building meta-ethics from the ground up is somewhat difficult. So I'm going to take a step back, and explicitly describe some fundamental ideas about what morality is. Hopefully this will help point in the right direction to look.

Morality is about answering the question, "What should we do?"

This implies that morality is about willful actions. Morality doesn't apply to things that can't act, and can't make choices.

But morality isn't just about how to achieve your goals. It has more to do with what your goals should be.

Who is left unspecified. Usually, that's interpreted to mean that the answer should be universal, that it should apply to everyone in the same way. I'm not so sure about that. Maybe it just means the question needs more detail to have an answer.

However, morality does seem to be concerned with controlling others' actions. It's frequently used to justify doing something "bad" to someone else if they did something "bad" to you. But then again maybe that's a misapplication...

So, that's not a lot, but it's something. Maybe it will be helpful.