logical operations Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

go through questions

A

go through questions

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

Boolean values

A

False or True

0 or 1

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

What does the AND function return

A

Returns true (1) if both values are true(1), otherwise returns false (0)

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

What does the symbol for the AND function look like

A

D shape

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

What does the OR function return

A

Returns true(1) if either values are true(1), returns false if both values are false

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

What does the symbol for the OR function look like

A

Moon crest

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

What does the NOT function return

A

Only takes one input (unlike the others) and reverses it

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

What does the symbol for the NOT function look like

A

Sideways triangle

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

What does the NAND function return

A

NOT AND

Returns false(0) only if both values are true(1), otherwise returns true(1)

Carries out an AND operation and performs a NOT on the result (reverses it)

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

What does the NAND symbol look like

A

D symbol with tiny circle on output

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

What does NOR output

A

Returns true (1) if both values are false(0), returns false(0) if either values are true(1)

Carries out an OR operation then performs a NOT on the result (reverses it)

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

What does a XOR output

A

Exclusive OR

Same as OR, returns 1 if either value is 1

However does not return 1 if both values are 1

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

What does XOR symbol look like

A

moon crest with parallel curvy line on left

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

How do bitwise operations work

A

Bitwise operations work by applying the operation successfully to each pair of binary digits

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

How is OR written in boolean algebra

A

+

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

How is AND written in boolean algebra

A

.

17
Q

How is not represented in boolean algebra

A

Overlining the letter
_
X

18
Q

Logical operations in control systems

A

Bits are used to represent on/off

Can be changed using AND, OR, XOR operations

each bit of a register or registers is linked (usually wiring) to a device

If a bit has a 1 entered then this could cause the particular device attached to be turned on, a 0 could be used to turn it off.

19
Q

What is masking

A

Masking always uses AND

It is used to check the values of particular bits

20
Q

How do you clear a register

A

ANDing with 0 always set the value to 0

21
Q

How do you reverse bits

A

XOR reverses the bits

22
Q

How do you encrypt words using XOR, AND etc.

A

E.g. encrypt BAD using XOR

Using an symmetric encryption/decryption key e.g. 01110010

BAD = 01000010 01000001 01000100
XOR XOR XOR
Key = 01110010 01110010 00110110
=48 =51 =54

Encrypted word is : 036

23
Q

What formate can AND be written in

A

A AND B
A.B
AB
A()

24
Q

What formats can OR be written in

A

A OR B

A+B

25
Q

What formats can you write NOT in

A

NOT A
_
A

26
Q

What is NOT(A AND B) in a different notation

A

_____

A . B

27
Q

What are identities used for in boolean algebra

A

Help us simplify expressions

28
Q

What is the commutative law

A

Expressions such as C+B is the same as B+C

I.e. the order doesn’t matter

29
Q

What is the associative law

A

A + (B+C) is the same as (A+B) + C

A(BC) is the same as (AB)C

30
Q

What is de Morgans law

A

Rule 1

___ _ _
P.Q = P + Q

rule 2

_____ _ _
P + Q = P.Q

break the line change the sign

31
Q

What is the essential characteristics of a key

A

The key is the secure binary number (only known to the sender and recipient)

Can only decrypt/read if the key is known