3 ms·
Here is another suggestion that is part stylistic, but may save you debugging effort. When performing boolean condition testing, eg "if (~a & b)", always use "
by tasty_freeze 8y ago
Here is another suggestion that is part stylistic, but may save you debugging effort.
When performing boolean condition testing, eg "if (~a & b)", always use "!" for negation instead of "~", "&&" for logical and, and "||" for logical or for exactly the same reasons you should do it for C code.
If the operands are all 1 bit, either option works fine. But if you ever accidentally use a vector where you intended a bit, one generates a warning and the other doesn't.