In-depth understanding of computer system second edition Exercise answers CSAPP 2.9, csapp2.9
You can create eight different colors based on R (red) G (green) B (blue) Close (0) and open (1), as shown below:
R |
G |
B |
Color |
R |
G |
B |
Color |
0 |
0 |
0 |
Black |
1 |
0 |
0 |
Red |
0 |
0 |
1 |
Blue |
1 |
0 |
1 |
Red and purple |
0 |
1 |
0 |
Green |
1 |
1 |
0 |
Yellow |
0 |
1 |
1 |
Blue-green |
1 |
1 |
1 |
White |
Each of these colors can be represented by a 3-bit vector and Boolean operations on them.
A. A color is formed by closing the opened color and opening the closed color. So what is the complementary color of the above eight colors?
Use non-operational solutions:
Color |
Complementary colors |
Black |
White |
Red |
Blue-green |
Blue |
Yellow |
Red and purple |
Green |
Green |
Red and purple |
Yellow |
Blue |
Blue-green |
Red |
White |
Black |
B. Describe the result of applying the Boolean operation to the following colors:
Blue | Green = blue-green
Yellow & blue-green = green
Red ^ red purple = blue