Topic 1.2 - Logical Operations Flashcards
What is the truth table for OR?
- 0 0 = 0
- 1 0 = 1
- 0 1 = 1
- 1 1 = 1
What is the truth table for AND?
- 0 0 = 0
- 1 0 = 0
- 0 1 = 0
- 1 1 = 1
What is the truth table for XOR?
- 0 0 = 0
- 1 0 = 1
- 0 1 = 1
- 1 1 = 0
How does XOR encryption work?
The data is XOR’ed with a key to produce encrypted data. To retrieve the data, the the encrypted data is XOR’ed with the key again
What is the process of bit masking?
This is where the AND operation is used to mask part of a binary number to return only the relevant parts
- 01011101
- 00000111 AND
- 00000101 (Returns last 3 digits
What is the purpose of a subnet mask?
A mask is used to check that one computer is on the same segment of network as another computing by only comparing the relevant bits from their IP addresses.
How would you go about setting the 4 least significant bits to 1 in the byte 01010101?
You would ‘OR’ it with another bit which would leave the value of the first 4 bits and changing the value of the last 4 bits to 1
- 01010101
- 00001111 OR
- 01011111
What does A.A simply to?
A
What does A.<a> simply to?</a>
0
What does 1 + A simply to?
1
What does 0 + A simply to?
A
What does A + A simply to?
A
What does A + <a> simply to?</a>
1
What does 0.A simplify to?
0
What does 1.A simply to?
A