SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor6 [2019/02/13 00:03]
Günter Kniesel [Detailed Description]
teaching:labs:mdse:2013:bug_descriptions:jt-bug-cor6 [2019/02/13 00:08] (current)
Günter Kniesel [Detailed Description]
Line 21: Line 21:
 Would assign c, as result, the value: 1 (1 in binary). ​ Would assign c, as result, the value: 1 (1 in binary). ​
  
-When the result of a bitwise AND operation is compared with another value, which can be determined before runtime and one of the compared numbers can also be determined before runtime, it is possible to detect if the comparison will always evaluate to false. This is owning to the fact that, in order to produce ​a 0 at a particular bit, the AND operator requires that both none of the corresponding bits in the parameters are 0. If this situation ​is detected, its very likely due to a logic error in the code or an incorrect usage of the AND operator where [[http://​docs.oracle.com/​javase/​tutorial/​java/​nutsandbolts/​op3.html| OR (|)]] should have been used.+When the result of a bitwise AND operation is compared with another value, which can be determined before runtime and one of the compared numbers can also be determined before runtime, it is possible to detect if the comparison will always evaluate to false. This is owning to the fact that, in order to produce ​at a particular bit, the AND operator requires that both none of the corresponding bits in the parameters are 1. If a 0 is detected ​in one operand, its very likely due to a logic error in the code or an incorrect usage of the AND operator where [[http://​docs.oracle.com/​javase/​tutorial/​java/​nutsandbolts/​op3.html| OR (|)]] should have been used.
  
 ===== Sample Problem Scenario ===== ===== Sample Problem Scenario =====
teaching/labs/mdse/2013/bug_descriptions/jt-bug-cor6.txt · Last modified: 2019/02/13 00:08 by Günter Kniesel

SEWiki, © 2019