Questions about this topic? Sign up to ask in the talk tab.
Difference between revisions of "Talk:Bitwise math"
From NetSec
KaraG14ycq (Talk | contribs) (Created page with "The Two's complement part starts explaining the sign and magnitude method as if it was a kind of 2's complement ---- Two's complement is a way to represent negative numbers in...") |
|||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| − | + | ==Emulations== | |
| + | Primitive emulations are the reproducing of any particular operation using exclusively operations that do not include the original. There are 3 types of emulations: direct, indirect, and conditional. | ||
| − | + | === XOR === | |
| − | + | ||
| − | + | a xor b = (a and (not b)) or ((not a) and b) | |
| − | + | a xor b = not ( (not (a and (not b)) and (not ( (not a) and b ) ) ) | |
| + | |||
| + | === OR === | ||
| + | a or b = not ( (not a) and (not b) ) | ||
| + | |||
| + | |||
| + | === NOT === | ||
| + | not a = a xor 0xff | ||
Latest revision as of 15:19, 4 October 2012
Contents
Emulations
Primitive emulations are the reproducing of any particular operation using exclusively operations that do not include the original. There are 3 types of emulations: direct, indirect, and conditional.
XOR
a xor b = (a and (not b)) or ((not a) and b) a xor b = not ( (not (a and (not b)) and (not ( (not a) and b ) ) )
OR
a or b = not ( (not a) and (not b) )
NOT
not a = a xor 0xff