1.2 Logical operations Flashcards

1
Q

What is a logical expression?

A

A BOOLEAN expression where the result is True or False.

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

What do logical operators do?

A

They join together logical expressions.

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

Name 4 logical operators.

A
  1. AND
  2. OR
  3. XOR
  4. NOT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a truth table?

A

A method of showing the inputs and outputs of a logical operator.

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

What represents true and false in a truth table?

A

True: 1
False: 0

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

How does OR work? (2)

A
  1. One input must be true for outcome to be true.
  2. Represented by a “+”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does XOR work? (2)

A
  1. One input must be true for outcome to be true, but no more than one outcome can be true for output to be true.
  2. Represented by a “⊕”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How does NOT work? (2)

A
  1. Requires one input and the output is always opposite of input.
  2. Represented by an ‘
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the order presence of the
these operators?

A

NOT → AND → OR

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

How are logical operators used in computing?

A
  1. Clearing Registers
  2. Masking
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How are logical operators used in clearing registers?

A

A register can be cleared using an AND operation.

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

How are logical operators used in masking? (2)

A
  1. Using AND operators you can check to see if a certain bit in a sequence is a 1 or a 0.
  2. Using OR operators you could
    set certain bits to one no matter what they were before.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are Boolean laws for?

A

Simplifying Boolean expressions.

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

What is the commutative law?

A

Order is not important on either side of an operator.

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

What is the identity law?

A

Gets rid of redundant data.

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

What is the associative law?

A

The order of multiple consecutive AND or OR operators are unimportant.

10
Q

What is the distributive law?

A

This is how elements outside the brackets are distributed within the brackets.

11
Q

What is the complement law?

A

If one side of an OR operator contains the content of the other side, the more complex side can be removed.