ITP 165x Lecture Notes - Lecture 3: Boolean Algebra, Truth Table

65 views1 pages

Document Summary

Itp 165: intro to c++ - lecture 3: boolean logic, conditionals. 1 (or any other number) = true. >= is greater than or equal to. <= is less than or equal to. Short circuiting - if a is true, a ll b will always be true; if b is false, a &&b will always be false. Demorgan"s law: (a && b) == (!a || !b) (a || b) == (!a && !b) Always declare a variable in the topmost scope that it is necessary. If a temporary variable only needs to exist inside an if statement, it can be declared inside the if statement.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents