8.6 Summary
The logic operations introduced here are summarised in Table 1, which is an example of what is known as a ‘truth table’. It shows what the result (‘output’) of each logic operation is
for all possible combinations of ‘input’ values. You may find this format a useful one for remembering the various logic operations.
Table 1: Summary of the logic operations NOT, AND, OR and XOR
| Operation |
Inputs |
Output |
| NOT |
0 |
— |
1 |
| |
1 |
— |
0 |
| AND |
0 |
0 |
0 |
| |
0 |
1 |
0 |
| |
1 |
0 |
0 |
| |
1 |
1 |
1 |
| OR |
0 |
0 |
0 |
| |
0 |
1 |
1 |
| |
1 |
0 |
1 |
| |
1 |
1 |
1 |
| XOR |
0 |
0 |
0 |
| |
0 |
1 |
1 |
| |
1 |
0 |
1 |
| |
1 |
1 |
0 |
Activity 28 (Self assessment)
-
If A = 0011 0111 and B = 0100 1011, find
-
NOT A
-
A AND B
-
A OR B
-
A XOR B
-
-
Is A AND B=B AND A?
-
Is A OR B=B OR A?
-
Is A XOR B=B XOR A?
Now read the answer
-
-
NOT A is the complement of A, which is 1100 1000.
So A AND B is 0000 0011.
-
So A OR B is 0111 1111.
-
So A XOR B is 0111 1100.
-
-
Yes
-
Yes
-
Yes
|