Analyzing Code
Computer Computing
Internet
Decimal, Binary, Hexadecimal
Computer Assortment
100

The display if the variable lunchTime has the value False and timeToGoHome has the value True.

What is Let's go home.?

100

ASCII character represented by the number 90 (decimal).

What is Z?

100

When solving a problem will take an exceedingly large amount of time and an approximate solution is acceptable, this approach may be used. 

What is a heuristic approach?

100

The decimal equivalent of binary 1010 and also hexadecimal A.

What is 10 (decimal)? 


0    0000    0
1    0001    1
2    0010    2
3    0011    3
4    0100    4
5    0101    5
6    0110    6
7    0111    7
8    1000    8
9    1001    9
10    1010    A
11    1011    B
12    1100    C
13    1101    D
14    1110    E
15    1111    F

100

This is the result of the program below:

What is 2 3? 

200

The description for the result of running this program code.

 

What is Nothing is displayed because the program results in an infinite loop?

200

ASCII character represented by the hexadecimal number 5A.

What is Z?

200

The internet has redundancy because of multiple paths where if one path is broken or blocked, another path is taken making it more reliable. This redundancy means the internet is this.  

What is fault tolerant? 

200

The hexadecimal value for binary 1110.

What is E? 

0    0000    0
1    0001    1
2    0010    2
3    0011    3
4    0100    4
5    0101    5
6    0110    6
7    0111    7
8    1000    8
9    1001    9
10    1010    A
11    1011    B
12    1100    C
13    1101    D
14    1110    E
15    1111    F

200

This is an email from an unknown sender who wants the recipient to click on a link in the email.

What is phishing?

300

The description for the result of running this program code.

What is the number 8 is displayed?

300

If a class decided to use binary addressing (like computers use) to send messages in their classroom. The initial plan was to use a nybble (4 bits). If there are 25 students in the room, we soon see there aren't enough addresses for each student. (1111 is 15 plus 0000 provides another option resulting in 16 options or 2^4 = 16)  So this many more addresses are made available when the decision is made to add 3 more bits making 7 bits available.

What is 112 more addresses?

(2^7 - 2^4 = 128 - 16 = 112)

(Note: You can't subtract exponents.)

300

The structure of the internet similar to how phone numbers have levels defining more generally at the top level the area code (i.e. 501) is a wide area, then narrowing to the local exchange area (i.e. 624), and finally the customer (the last 4 digits). This structure is used for DNS (the root, geographical such as uk, the organization such as edu or com, etc.) and IP Addresses (networks, hosts...). This structure helps the system scale (grow).

What is hierarchical?

300

The binary value for 3 (both decimal & hexadecimal).

What is 0011 (binary) 

0    0000    0
1    0001    1
2    0010    2
3    0011    3
4    0100    4
5    0101    5
6    0110    6
7    0111    7
8    1000    8
9    1001    9
10    1010    A
11    1011    B
12    1100    C
13    1101    D
14    1110    E
15    1111    F

300

The image on the left is a robot in a grid of squares. The robot is represented by the triangle which is shown in the initial position. The image on the right is a code segment to move the robot in the grid. This is the location of the robot after running the code segment. (The dot shows the initial position for reference.)

What is

400

The code segment that will move the robot to the gray square using the procedure ForwardAndLeft. (The robot cannot move into the black areas.)

What is 

ForwardAndTurn (1, 3); 

ForwardAndTurn (2, 1);  

ForwardAndTurn (2, 1);  

ForwardAndTurn (3, 0)   ?

400

If a class decided to use binary addressing (like computers use) to send messages in their classroom. The initial plan was to use a nybble (4 bits). If there are 25 students in the room, we soon see there aren't enough addresses for each student. (1111 is 15 plus 0000 provides another option resulting in 16 options or 2^4 = 16)  So the decision is made to add 3 more bits making 7 bits available resulting in the new 7 bit system giving this many times more addresses than the 4 bit system.

What is 8 times more?

(2^7 / 2^4 = 2^(7-4) = 2^3 = 8 times more)

(Or 2^7 = 128  &  2^4 = 16, so 128/16 = 8)

400

A division of a domain appearing to the left of the domain name. Here it is "desserts" where the domain name is food.com

desserts.food.com

What is a subdomain?

400

The hexadecimal value for 10110101100.

What is 5AC?

0    0000    0
1    0001    1
2    0010    2
3    0011    3
4    0100    4
5    0101    5
6    0110    6
7    0111    7
8    1000    8
9    1001    9
10    1010    A
11    1011    B
12    1100    C
13    1101    D
14    1110    E
15    1111    F

400

Change line 4 to   z  =  y  +  x

What is a change that would not affect the output?

500

The missing code that could complete the procedure where the program works. A school gives Honor Roll students excused absence during semester tests. The computer science teacher has a list of students in her classes (cspList) and the school provided a list of Honor students for the whole school (honorList), but the teacher needs to develop a list of her students who have an excused absence (excusedList). To create excusedList, the teacher uses the procedure findHonor (list, name) which returns true if name is found in list and returns false otherwise.

What is

500

Students in several classes are to be put into groups of 4. A computer program is used to determine how many extra students remain in each class if the number of students doesn't divide evenly by 4. The line of code is studentsInClass mod 4 = x. For a class with 23 students, x is this number. 

What is 3? 

500

This figure represents a network of computers that are connected with each other. Any data sent between two computers not directly connected must go through one or more other computers that are connected. 

This is the minimum number of connections that must be disrupted to prevent D from communicating with F.

What is 2?

500

B (hex) + 0011 (binary)

What is 14 (decimal)?

B + 0011 = 11 + 3 = 14 (decimal)

0    0000    0
1    0001    1
2    0010    2
3    0011    3
4    0100    4
5    0101    5
6    0110    6
7    0111    7
8    1000    8
9    1001    9
10    1010    A
11    1011    B
12    1100    C
13    1101    D
14    1110    E
15    1111    F

500

Input A and logic gate B are required to be this for the output to be True? (AND & OR gates only)

What is Input A must be True and logic gate B must be OR?

(The output of the known AND must be False. 

If the output of B is True and one of the inputs is False, then B must be an OR gate and the other input must be True.

If the bottom input of B must be True, then at least one of the inputs to the known OR must be True, so A must be True.)