Not very exciting news, but as a result of a recent discussion on Math symbols:
Oper | C | Logic | Other |
---|---|---|---|
NOT | ! | ¬ | ~ |
AND | & | ∧ | ⋅ / · |
OR | | | ∨ | |
XOR | ^ | ⊻ | ⊕ |
NAND | ⊼ | ↑ | |
NOR | ⊽ | ↓ | |
IMP | → |
In case you need to use them anywhere, these are the codes:
Oper | C | Logic | Other |
---|---|---|---|
NOT | U+0021 | U+00AC ¬ | U+007E ˜ |
AND | U+0026 & | U+2227 ∧ | U+2022 U+00B7 |
OR | U+007C | U+2228 ∨ | |
XOR | U+22BB | U+2295 ⊕ | |
NAND | U+22BC | U+2191 ↑ | |
NOR | U+22BD | U+2193 ↓ | |
IMP | U+2192 → |
More Math fun in the Unicode space can be found here
Practice safer math,
– Sec
@Maex the DOT is also used to denote AND. I just happens that there are multiple DOT variants in unicode, so I gave two examples.
I have never seen dots being used as AND. One other thing I have just noticed is that in C the logic AND and OR are written && and ||. You used the binary AND/OR operators. So int a = 2, b = 4; if (a & b) printf("true\n"); would not print "true". But int a = 2, b = 4; if (a && b) printf("true\n"); would print "true".
Maex wrote on Wed, 16 Feb 2011 19:43
Hmmm ... don't know what you mean with the "Other" row exactly, but "â’" U+2052 might be a better character for "AND Other"