in reply to Boolean operation: (A & B) vs (A * B)
A * B is a numerical multiplication. If the (perl) values of A and B can only be 1 and 0 then this is equivalent to a Boolean AND.
A & B is a bitwise AND. Again, if 1 and 0 are the only values this is also equivalent to a Boolean AND.
Whether or not these expressions are entirely equivalent depends on the restrictions of the values to the binary set {0, 1}.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Boolean operation: (A & B) vs (A * B)
by LanX (Saint) on Jan 28, 2016 at 13:46 UTC |