Difference between revisions of "Binary operation"
m |
|||
(5 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
A '''binary operation''' is an [[operation]] which takes two arguments. Usually this takes an input and encodes it into machine code or binary. Then it returns a bit based on 2 bits, one from each string on their corresponding index. There are several binary operations that people tend to use a lot. Let's get to them: | A '''binary operation''' is an [[operation]] which takes two arguments. Usually this takes an input and encodes it into machine code or binary. Then it returns a bit based on 2 bits, one from each string on their corresponding index. There are several binary operations that people tend to use a lot. Let's get to them: | ||
− | '''AND''' | + | '''AND''' |
− | + | ||
− | + | Denoted by the & or && symbol. | |
− | + | ||
− | + | TRUE & TRUE = TRUE | |
− | + | ||
− | + | FALSE & TRUE = FALSE | |
− | + | ||
− | + | TRUE & FALSE = FALSE | |
+ | |||
+ | FALSE & FALSE = FALSE |
Latest revision as of 03:51, 24 August 2024
This article is a stub. Help us out by expanding it.
A binary operation is an operation which takes two arguments. Usually this takes an input and encodes it into machine code or binary. Then it returns a bit based on 2 bits, one from each string on their corresponding index. There are several binary operations that people tend to use a lot. Let's get to them:
AND
Denoted by the & or && symbol.
TRUE & TRUE = TRUE
FALSE & TRUE = FALSE
TRUE & FALSE = FALSE
FALSE & FALSE = FALSE