Comp Sci Flashcards
How many bits in a byte
8
How many bits in a nibble
4
Files
a large group of bytes in auxiliary memory
What is the place called where files are stored
directories/folders
Which takes precedence in the ||: True or False
True takes precedence
Which takes precedence in the &&: True or False
False takes precedence
What does an enumeration do
lists the values a variable can have
int m = 4;
int results = 3 * (++m);
results = 15
int m = 4;
int results = 3 * (m++);
results = 12
What is encoding
translating from one set of symbols to another set of symbols (integer to binary)
What are the 8 primitive data types
int, double, char, Boolean, float, long, short, byte
What are 6 comparison operators
==, <=, >=, !=, <, >
What are the 3 logical operators
&&, ||, !
Lexicographic Order rules
all numbers come before letters and all uppercase letters come before lowercase letters
What is the Lexicographic Order based on
based on the character order in the Unicode character set
What is another word for conditional operator
ternary operator
When is a boolean expression a tautology
when the result is always true
When is a boolean expression a contradiction
when the result is always false
When is a boolean expression a contingency
when it is neither a tautology nor a contradiction
Tautology/Contradiction/Contingency?
(x == y) || (x != y)
tautology
Tautology/Contradiction/Contingency?
(x == y) && (x != y)
contradiction
Tautology/Contradiction/Contingency?
(x && y)
where both x and y = boolean values
contingency
general formula for encoding
ceiling(log2(n))
general formula for encoding in English
see how many times we can divide by 2 (starting at n) until we reach the quotient 0.