2020 MCQ Corrections

QUestion 5

B is incorrect because with these inputs, the OR gate will produce an output of true and the first AND gate will produce an output of false. Since only one input to the second AND gate will be true, the circuit will have an output of false. C is correct because With these inputs, the OR gate will produce an output of true and the first AND gate will produce an output of true. Since both inputs to the second AND gate will be true, the circuit will have an output of true.

Question 11

B is incorrect because The binary RGB triplet for light yellow is (11111111, 11111111, 11100000). A is correct because the binary number 11111111 is equal to 27+26+25+24+23+22+21+20, or 255. The binary number 11110000 is equal to 27+26+25+24 , or 240. Therefore, the given binary triplet represents the color ivory.

Question 67

C is incorrect because for this code segment, count is increased to 1 when “oak” is encountered as the last element of the list. The loop then terminates and the procedure returns the intended result 1. A and B are correct for this code segment, count is increased to 1 the first time “birch” is encountered in the list. However, count is reset to 0 when the code segment moves to the next list element. The last time “birch” is encountered in the list, count is again increased to 1, causing the procedure to return 1 instead of the intended result 2.