Boolean logic: OCR GCSE practice
AND, OR, NOT, truth tables and gates. 13 questions in the style of the OCR GCSE exam.
Sample questions
What is the value of `True and False`?
- True
- False
- None
- An error
Write a program that reads two whole numbers, one per line. Print `Both positive` if both are greater than 0, `One positive` if exactly one is greater than 0, and `None positive` otherwise.
What is the output of a NOT gate when its input is 1?
- 2
- 1
- 0
- It depends on a second input