Preview

13 - Past Paper Simulation - Boolean Logic (I) #1

 1. Noah wants to know why it is an advantage to use as few gates as possible in a logic circuit. State the answer in a sentence (1 mark)

 2. Name the three main gates that are associated with Boolean Logic. (3 marks)

 3. If an output of a 'True' is put in through a NOT gate, what comes out? (1 mark)

 4. If an OR gate receives two inputs of a 1 and 0, what would the output be? (1 mark)

 5. Analyse the following code. It uses the boolean OR operator. What is the result of running this code? (1 mark)
a=1
b=2
c=3
if a or b or c ==1:
  print("Yes")
else:
  print("No")

 6. Complete the truth table below for the Boolean statement p = A AND B (1 mark)
the_result_of_an_and_gate_question1.png

 7. Complete the truth table below for the Boolean statement p = NOT (A AND B). (1 mark)
the_result_of_not_AandB_question21.png

 8. Fill in the missing blank for the truth table, in reference to the logic circuit shown below (1 mark)
circuit_fill_in_the_blank_last_truth_table_value.png

 9. One of the coloured boxes with values in them contains the incorrect value. State the colour of the box that contains the error. (1 mark)
which_colour_box_is_incorrect_boolean_logic.png

 10. Write the expression for the following logic circuit. Ensure you get the brackets in the right place, and use the words 'And' 'Or' 'Not' for any gates you use in the expression. (1 mark)
write_the_expression_for_logic_circuit_PPS_q.png

 11. Analyse the following truth table. One of the coloured boxes contains the wrong output. State the colour of the box that contains the error (1 mark)
state_the_colour_of_the_error_box_boolean_logic.png

 12. Ozan is unsure of how to complete the last row of this 'AND' gate truth table. Can you help him? What are the three values from left to right? (e.g. 0 0 1). Do not use commas in your answer. (3 marks)
AND_gate_Advanced_Boolean_logic.png

 13. A single output Q is produced from three inputs A, B and C. Output Q is required to be 1 only if inputs A and B are 1, or input C is 1 and input B is 0. Select the correct boolean equation: Option1, Option2 or Option3. (1 mark)
Option 1
=========
Q = A.B . C+¬B

Option 2
=========
Q = A+B + C.¬B

Option 3
=========
Q = A.B + C.¬B

 14. Syeda has a terrible headache after a long day's work and needs some help deciding the correct value for output Q (in the red box). It's either 0 or 1 - which one is it? (1 mark)
guess_the_output_logic_circuit_truth_table.png

 15. Analyse the following code which uses a boolean operator. What will the output be if the user enters "guest" for username and "dunno" for password? How can you fix the program? (2 marks)
username=input("Enter username:")
password=input("Enter password:")

if username =="guest" or password=="password123"==True:
  print("Access granted")
else:
  print("Access denied")