Boolean Logic Flashcards

1
Q

What is an AND gate?

A

A logic gate that outputs true only if both inputs are true

The AND gate is a fundamental digital logic gate that implements logical conjunction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is an OR gate?

A

A logic gate that outputs true if at least one input is true

The OR gate is used to perform logical disjunction.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a NOT gate?

A

A logic gate that outputs the inverse of the input

The NOT gate is also known as an inverter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Draw and label an AND gate.

A

A representation of an AND gate with two inputs and one output

Typically drawn with a flat input side and a pointed output side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Draw and label an OR gate.

A

A representation of an OR gate with two inputs and one output

Usually depicted with a curved input side and a pointed output side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Draw and label a NOT gate.

A

A representation of a NOT gate with one input and one output

Often shown as a triangle pointing to the right with a small circle at the output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the truth table for AND?

A

A AND B is true only if both A and B are true

Truth table:
* A = 0, B = 0 → A AND B = 0
* A = 0, B = 1 → A AND B = 0
* A = 1, B = 0 → A AND B = 0
* A = 1, B = 1 → A AND B = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the truth table for OR?

A

A OR B is true if at least one of A or B is true

Truth table:
* A = 0, B = 0 → A OR B = 0
* A = 0, B = 1 → A OR B = 1
* A = 1, B = 0 → A OR B = 1
* A = 1, B = 1 → A OR B = 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the truth table for NOT?

A

NOT A is true if A is false

Truth table:
* A = 0 → NOT A = 1
* A = 1 → NOT A = 0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Fill in the blank: A AND B is true only if both A and B are _______.

A

true

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

True or False: A OR B is false only if both A and B are false.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Fill in the blank: NOT A is true if A is _______.

A

false

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Boolean logic?

A

A form of algebra where variables are true or false, typically represented as 1 or 0.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a Venn diagram?

A

A visual representation of sets and their relationships using overlapping circles.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the primary logic gates in Boolean logic?

A

The primary logic gates are:
* AND
* OR
* NOT
* NAND
* NOR
* XOR
* XNOR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fill in the blank: The logic gate represented by the symbol for AND is called _______.

A

AND

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

True or False: Venn diagrams can only represent two sets.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What does the AND gate output when both inputs are true?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What does the OR gate output when at least one input is true?

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Fill in the blank: The output of a NOT gate is the _______ of the input.

A

inverse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Explain the relationship depicted in a Venn diagram.

A

It shows how different sets intersect and relate to one another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What is the output of a NAND gate?

A

The inverse of the AND gate output.

23
Q

Fill in the blank: The output of an XOR gate is true if _______ inputs are true.

A

an odd number of

24
Q

What is the purpose of using Venn diagrams in logic?

A

To visually represent logical relationships and operations between sets.

25
True or False: A NOR gate outputs true only if both inputs are false.
True
26
What is the function of a XNOR gate?
It outputs true if both inputs are the same.
27
What is the logic gate represented by 'not gate'?
Inversion or negation of a single input
28
What is the logic gate represented by the letter B?
or gate ## Footnote An or gate outputs true if at least one of the inputs is true.
29
What type of logic does Boolean logic refer to?
A form of algebra that uses true or false values ## Footnote Boolean logic is fundamental in computer science and digital circuit design.
30
What is a Venn diagram used for?
To illustrate the relationships between different sets ## Footnote Venn diagrams visually represent logical relationships and set operations.
31
Fill in the blank: A logic gate that outputs true only when both inputs are true is called a _______.
and gate
32
What is the logic gate represented by 'or'?
Or gate ## Footnote The 'or' gate outputs true if at least one of the inputs is true.
33
What does the 'xor' gate stand for?
Exclusive or gate ## Footnote The 'xor' gate outputs true only if exactly one input is true.
34
Fill in the blank: The logic gate represented below is an _______.
or gate
35
True or False: An 'or' gate outputs false only when both inputs are false.
True ## Footnote This is a fundamental property of the 'or' gate.
36
What is the main function of a Venn diagram in Boolean logic?
To visually represent logical relationships between sets ## Footnote Venn diagrams illustrate how different sets intersect, unite, or differ.
37
What does the code demonstrate in Python?
The use of AND, OR, and NOT logical operators
38
What will the code output if both A and B are 'yes'?
A 1 is output
39
What is the output if only one of A or B is 'yes'?
A 1 is output
40
What will the code output if both A and B are not 'yes'?
A 0 is output
41
Fill in the blank: The code allows users to input two ______.
1s or 0s
42
True or False: The code includes superfluous parts for clarity.
True
43
What does the input prompt 'IS A 1?' represent?
It asks the user to determine the value of A
44
What does the input prompt 'Is B 1?' represent?
It asks the user to determine the value of B
45
What is the purpose of the conditional statements in the code?
To determine the output based on the values of A and B
46
What does 'NOT' represent in Python?
'NOT' is a logical operator used to invert a boolean value.
47
What will the output be if A is 'yes'?
A 0 is output
48
What will the output be if A is not 'yes'?
A 1 is output
49
Fill in the blank: In Python, 'if not A == "yes":' is equivalent to using the _______ operator.
NOT
50
True or False: The line 'print("This also represents NOT A)")' is part of a logical operation.
True
51
What is the purpose of the input function in the code?
To get user input about the value of A
52
What does the line 'print("A 1 is output")' indicate?
It indicates that A is not equal to 'yes'.
53
What type of input is expected for variable A?
'yes' or other responses indicating a boolean choice.
54
What is the output of the program if the user inputs 'no'?
A 1 is output