BasicsTutorial/Boolean Operators

Last-modified: 2008-03-07 (金) 13:11:33

Boolean Operators

ブール演算子

If you have looked at electronics you may have come across logic gates, which use the same method as Boolean operators.
あなたがエレクトロニクスを見たならば、あなたは論理ゲート全体で来たかもしれない。そして、それはブール演算子と同じ方法を使用する。
But I’ll start from the beginning for those who haven’t.
しかし、私はそれを知らない人々の為に、最初から出発する。
The Boolean operators (or logical operators) do the same as arithmetic operators, they take 2 numbers either side of them and process them and produce a different number.
ブール演算子(または論理演算子)は算術演算子として同じようにする、それは二つの数字にそれらのどちらの側でも持っていって、それらを処理して、異なるナンバーを製作する。
There are 4 Boolean operators - AND, OR, XOR and NOT.
4つのブール演算子 ― AND、OR、XORとNOT ― が、ある。
Unlike the arithmetic operators they process 0s and 1s, no other numbers.
算術演算子とは異なり、それは0と1(他のいかなる数もない)を処理する。

0 AND 0 = 0
1 AND 0 = 0
0 AND 1 = 0
1 AND 1 = 1
0 OR 0 = 0
1 OR 0 = 1
0 OR 1 = 1
1 OR 1 = 1
0 XOR 0 = 0
1 XOR 0 = 1
0 XOR 1 = 1
1 XOR 1 = 0
NOT 0 = 1
NOT 1 = 0

So _AND returns a 1 only when both numbers equal 1, _OR return a 1 when either or both numbers equal 1, _XOR returns a 1 when only one of the numbers equals 1, and _NOT is different.
ANDは、両方の番号が1に等しいときだけに1を返す。ORは、両方の番号は0に等しいときだけに0を返す。XORは、異なるときに1を返す。NOTは、異なる値を返す。

NOT requires 1 number after it, not 2, and it returns the opposite of the number.
NOTは、それ、2個の番号でない、 それの後の1個の番号が数の正反対を返すことを義務づける。
Now to put these into use.
現在これらを置くために使用に。

End of Section Tasks

セクション終わりの作業

l Print all the results of the Boolean operators as above, except in code.
コードでは以外、上記としてブール演算子の全ての結果をプリントしなさい。