What is the 4-bit number for the decimal number ten (10)?
1010
TRUE/FALSE
TCP guarantees that no packets are ever dropped.
FALSE
Which of the following is true of algorithms?
A. Algorithms may have an infinite set of instructions
B. Algorithms must be expressed using a programming language
C. Every algorithm can be constructed using combinations of sequencing, selection, and iteration
D. Every problem can be solved with an algorithm
C. Every algorithm can be constructed using combinations of sequencing, selection, and iteration
onEvent("addItemButton", "click", function() {
//missing code
console.log(carTotal);
What code should Jasmine insert where it says <missing code> in order for her app to work?
cartTotal = cartTotal +1;
What is the best term for "data about the data"
metadata
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
How does a computer resolve a domain name into an IP address?
It asks a DNS server for the corresponding IP address.
Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?
When the problem cannot be solved in a reasonable time and an approximate solution is acceptable.
1 var a = 3;
2 var b = 6;
3 var c = 10;
4 a = b / a;
5 b = c - a;
6 c = b / a;
7 console.log("value is: "+c);
value is: 4
9 MOD 8
1
8 bits is enough to represent 256 different numbers. How many total bits do you need to represent 512 (twice as many) numbers?
9 bits
The world is currently in a transition to use IPv6, a newer version of the IP protocol that uses 128-bit addresses instead of 32-bit addresses used by IPv4. What is the main problem that IPv6 was created to solve?
32-bit addresses could not ensure that every internet-connected device can receive a unique IP address.
When she ran her first version of the program on a computer in her research lab, the computer took 75 minutes to complete the simulation. To improve the performance, she parallelized the simulation, computing the effects on each city in parallel. When she ran the parallelized program on the same computer, it took an average of 15 minutes to complete.
5
eyeX ← 200 eyeX ← 250
What will be the value of eyeX after this code runs?
250
True or False
Event-driven programs do not implement algorithms.
False
A photographer is manipulating a digital image to lighten it because of the RGB values in the image are less than 100, making it very dark. He does this by adding 20 to the R, G, and B values of each pixel, then overwriting the original image. What type of transformation is the photographer using on the digital image?
Lossless compression
Describe the purpose of an IP address?
IP addresses provide a unique number for identifying devices that send and receive information on the Internet
A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed to find the item?
[1, 5, 20, 50, 51, 80, 99]
3
Which of the following is true of functions?
A. Programs written with functions run more quickly
B. Functions can help remove repeated code from a program
C. Replacing repeated code with a function will reduce the number of commands the computer needs to run
D. Functions are called once but can be declared many times
B. Functions can help remove repeated code from a program
0001 0100 (convert to decimal)
20
Consider the following numbers given in Binary (BIN), Decimal (DEC), and Hexadecimal (HEX) representations:
BIN: 1110
DEC: 13
HEX: F
Which of the following lists the numbers in order from least to greatest?
DEC: 13, BIN: 1110, HEX: F
Which of the following Internet protocols is MOST important in reassembling packets and requesting missing packets to form complete messages?
Transmission Control Protocol (TCP)
Sequential Algorithm Time
A parallel version of the algorithm completes the sorting stage in parallel leading to a new set of times
Parallel Algorithm Time
What is the speedup of the parallel solution?
2
var count = 0
while (count != 5){
console.log(count);
count = count + 2; }
This will be an infinite loop.
Two devices are connected to the Internet and communicating with one another. A squirrel chews through one of the wires in the network that is currently being used by the devices to communicate. The network immediately begins using a different path through the network and communication continues as normal. This situation best exemplifies which principle?
Fault- Tolerence