Hi guys, maybe it's not related that much to math but yeah it's related a lil.
what's the difference between * and & ? for example
101 * 101 , 101 & 101 ? thanks alot,
The * symbol is often used for multiplication simply because the x symbol (for multiplication) could be mistaken for the variable x.
The & symbol means "and".
In basic probability we sometimes use the word "and" to indicate multiplication and "or" to indicate addition, but a lot of care must be taken when doing so.
The difference between the symbols "*" and "&" depends entirely on what context we're operating in. In our usual mathematics, the asterisk () means multiplication. But in Boolean Algebra, an asterisk is sometimes used as a substitute for the logical and operator (∧), such that TRUE∗FALSE=TRUE∧FALSE=FALSE.
In some programming languages, such as Javascript, the ampersand (&) operator is defined as the "bitwise and" operator which "returns a 1 in each bit position for which the corresponding bits of both operands are 1s." For example, 5&13=5 because 5 is 0101 in binary and 13 is 1101 in binary and 0101&1101=0101.
In other contexts, each of these symbols may have other, alternate meanings. Some meanings are more "standard" than others, but it all depends on what the author wants them to mean.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.