CS 160 FINAL REVIEW | QUESTIONS AND ANSWERS | VERIFIED
AND WELL DETAILED ANSWERS | LATEST EXAM UPDATE
The chart shows the frequency of searches for the words "pencil" and
"pen" over a 5 year period. Which of the following is the best
interpretation of the chart?
At any point in time there are typically more people searching for the word
"pen" than "pencil"
Why is the language of a computer binary?
It's easier, cheaper, and more reliable to build machines and devices that
only have to distinguish between binary states.
What is the 4-bit binary number for the decimal number Eleven (11)?
1011
What is the minimum number of bits you would need to encode the 26
letters of the alphabet plus a space - a total of 27 characters?
5 bits
What is the decimal equivalent to the binary number 00001101 ?
13
A computer program uses 4 bits to represent nonnegative integers. Which
of the following statements describe a possible result when the program
uses this number representation?
I. The operation 4 + 8 will result in an overflow error.
II. The operation 7 + 10 will result in an overflow error.
III. The operation 12 + 3 will result in an overflow error.
II only
What is the decimal equivalent to the binary number 10101010 ?
170
What is the decimal equivalent to the binary number 11110000 ?
240
,Convert decimal 23 to an 8 bit binary number.
10111
Convert decimal 209 to an 8 bit binary number.
11010001
How many bits would you need if you wanted to have the ability to count
up to 100?
7
How many different numbers can 6 bits represent?
64
If 2 bits can represent 2^2 values, and 3 bits can represent 2^3 values, and
4 bits can represent 2^4 values, then n bits can represent:
2^n values
What are the 4 processes every computer performs?
input, output, processing, storage
In the expression 12.45 + 3.6, the values to the right and left of the + symbol
are the ________.
operands
A(n) ________ is a name that represents a value stored in the computer's
memory.
variable
The ________ statement is used to create a decision structure.
selection
What is Step 1 in a Selection Sort algorithm?
1. Set MIN to index 0
The two basic operations in sorting algorithms are:
Comparison Operation, Swap Operation
One con of using linear search is:
it does not scale well to large lists
, Which of the following statements are true about routers and routing on
the Internet. Choose two answers.
1. Routers act independently and route packets as they see fit.
2. Routers are hierarchical and the "root" router is responsible for
communicating to sub-routers the best paths for them to route internet
traffic.
3. Protocols ensure that a single path between two computers is established
before sending packets over it.
4. A packet traveling between two computers on the Internet may be
rerouted many times along the way or even lost or "dropped".
1 and 4
What will the following code print to the console window when executed:
print("Python is cool!")
Python is cool!
In Python the ________ symbol is used as the equality operator.
"=="
A Boolean variable can reference one of two values which are:
True or False.
When applying the .3f formatting specifier to the number 76.15854, the
result is ________.
76.159
What are the 4 processes every computer performs?
input, output, processing, storage
________ are notes of explanation that document lines or sections of a
program.
Comments
Which of the following is the correct if clause to determine whether choice
is anything other than 10?
AND WELL DETAILED ANSWERS | LATEST EXAM UPDATE
The chart shows the frequency of searches for the words "pencil" and
"pen" over a 5 year period. Which of the following is the best
interpretation of the chart?
At any point in time there are typically more people searching for the word
"pen" than "pencil"
Why is the language of a computer binary?
It's easier, cheaper, and more reliable to build machines and devices that
only have to distinguish between binary states.
What is the 4-bit binary number for the decimal number Eleven (11)?
1011
What is the minimum number of bits you would need to encode the 26
letters of the alphabet plus a space - a total of 27 characters?
5 bits
What is the decimal equivalent to the binary number 00001101 ?
13
A computer program uses 4 bits to represent nonnegative integers. Which
of the following statements describe a possible result when the program
uses this number representation?
I. The operation 4 + 8 will result in an overflow error.
II. The operation 7 + 10 will result in an overflow error.
III. The operation 12 + 3 will result in an overflow error.
II only
What is the decimal equivalent to the binary number 10101010 ?
170
What is the decimal equivalent to the binary number 11110000 ?
240
,Convert decimal 23 to an 8 bit binary number.
10111
Convert decimal 209 to an 8 bit binary number.
11010001
How many bits would you need if you wanted to have the ability to count
up to 100?
7
How many different numbers can 6 bits represent?
64
If 2 bits can represent 2^2 values, and 3 bits can represent 2^3 values, and
4 bits can represent 2^4 values, then n bits can represent:
2^n values
What are the 4 processes every computer performs?
input, output, processing, storage
In the expression 12.45 + 3.6, the values to the right and left of the + symbol
are the ________.
operands
A(n) ________ is a name that represents a value stored in the computer's
memory.
variable
The ________ statement is used to create a decision structure.
selection
What is Step 1 in a Selection Sort algorithm?
1. Set MIN to index 0
The two basic operations in sorting algorithms are:
Comparison Operation, Swap Operation
One con of using linear search is:
it does not scale well to large lists
, Which of the following statements are true about routers and routing on
the Internet. Choose two answers.
1. Routers act independently and route packets as they see fit.
2. Routers are hierarchical and the "root" router is responsible for
communicating to sub-routers the best paths for them to route internet
traffic.
3. Protocols ensure that a single path between two computers is established
before sending packets over it.
4. A packet traveling between two computers on the Internet may be
rerouted many times along the way or even lost or "dropped".
1 and 4
What will the following code print to the console window when executed:
print("Python is cool!")
Python is cool!
In Python the ________ symbol is used as the equality operator.
"=="
A Boolean variable can reference one of two values which are:
True or False.
When applying the .3f formatting specifier to the number 76.15854, the
result is ________.
76.159
What are the 4 processes every computer performs?
input, output, processing, storage
________ are notes of explanation that document lines or sections of a
program.
Comments
Which of the following is the correct if clause to determine whether choice
is anything other than 10?