01:198:107 Lecture Notes - Lecture 6: Truth Table

66 views4 pages

Document Summary

Cs 107: lecture 6: if and nested if. The result of doing a comparison can be stored in a variable. There are operations that combine true/false analogous to +, *, etc for numbers. && is the command for all true . || is the command for at least one true . A && b = b && a. A || b = b || a. (a && b) || c = (a || c) && (b || c) (a || b) && c = (a && c) || (b && c) ~(a && b) = ~a || ~b. ~(a || b) = ~a && ~b. Proof for ~(a && b) = ~a || b. ~a || ~b || ~b || ~c. ~a || ~a || ~b || ~c. ~a || ~b || ~a || ~c. ~(a && b) || ~(a && c) Truth table for ~(a && b) || ~(b &&c) = ~(a && b) || ~(a &&c)

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

Related Questions