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

60 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+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents