In-depth understanding of computer system Second Edition exercise solution Csapp 2.9

Source: Internet
Author: User

Based on the tri-color R (red) G (green) B (blue) off (0) and open (1), the ability to create 8 different colors, as follows:

R G B Color R G B Color
0 0 0 Black 1 0 0 Red
0 0 1 Blue 1 0 1 Red 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 bit vector with a length of 3, and Boolean operations can be performed on them.

A. The complement of a color is formed by turning off the color of the open while turning on the closed colors. So what's the color of the top 8 colors?

Using non-operational solutions:

Color Complementary color
Black White
Red Blue-Green
Blue Yellow
Red Purple Green
Green Red Purple
Yellow Blue
Blue-Green Red
White Black

B. Describes the result of applying a Boolean operation to the following colors:

Blue | green = Bluish green

Yellow & blue green = Green

Red ^ red Purple = Blue

In-depth understanding of computer system Second Edition exercise solution Csapp 2.9

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.