Home
Browse
Create
Search
Log in
Sign up
Upgrade to remove ads
Only $2.99/month
Logic (Ch.3)
STUDY
Flashcards
Learn
Write
Spell
Test
PLAY
Match
Gravity
Terms in this set (7)
Logic or Boolean Value
can be only true (indicated by a non-zero number, typically 1) or false (indicated by the number 0) .
Logical Variable
Assigning a logical value to a variable creates a logical variable that can hold only logical values. Logical variables can be used to test a logical state, namely whether something is either true or false, or to hold the outcome of a logical or a relational operation
Equality Operator
checks whether two numerical values are the same (==) or different (~=).
a = b assigns a with b's value. In contrast, a == b returns true if a 's value is the same as b 's.
Relational Operator
compares two numerical values and evaluates to a logical value of either true or false. Each operates on exactly two operands
Logical Operator
compares two logical variables to reach a logical decision that results in a logical value (i.e. either true or false). A logical operator operates with logical values
short circuit evaluation
skips evaluating later operands if the result of the logical operator can already be determined.
The logical AND short circuit operator evaluates to false if the first operand evaluates to false, and skips evaluating the second operand.
The logical OR short-circuit operator evaluates to true if the first operand is true, and skips evaluating the second operand.
Binary Operators
The relational operators and logical operators, except for ~, are binary operators, meaning they take two operands (from the left and right) and evaluate to true or false.
THIS SET IS OFTEN IN FOLDERS WITH...
Ch.2 - Variables, Assignments, and Expressions
2 terms
1D Arrays (Ch.5,6,7)
18 terms
Ch. 16 Branches
4 terms
Ch.17 Loops
7 terms
OTHER SETS BY THIS CREATOR
Ch.10 2D Array Basics
3 terms
Ch.19 Strings and Characters
4 terms
Ch. 1: The Molecular Basis of Hereditary, Variatio…
46 terms
California DMV Permit Test 2018
132 terms