Practice Problem 2.9 solution page 146
Computers generate color pictures on a video screen or liquid crystal display by mixing three different colors of light: red, green, and blue. Imagine a simple scheme, with three different lights, each of which can be turned on or off projecting onto a glass screen:
We can then create eight different colors based on the absence (0) on presence (1) of light sources R, G, and B :
Each of these colors can be represented as a bit
A. The complement of a color is formed by turning off the lights that are on and turning on the lights that are off. What would be the complement of each of the eight colors listed above?
B. Describe the effect of applying Boolean operations on the following colors;
Blue | Green = ________
Yellow & Cyan =_______
Red ̑ Magenta = _________
RGB Color
0 0 0 Black 0 0 1 Blue 0 1
0 Green Oil Cyan 10 0
Red 10 1 Magenta 110'
Yellow 111 White
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
Computer Systems: A Programmer's Perspective (3rd Edition)
Additional Engineering Textbook Solutions
Introduction To Programming Using Visual Basic (11th Edition)
Starting Out With Visual Basic (8th Edition)
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
BASIC BIOMECHANICS
Starting Out with Python (4th Edition)
Elementary Surveying: An Introduction To Geomatics (15th Edition)
- (Mechanics) The deflection at any point along the centerline of a cantilevered beam, such as the one used for a balcony (see Figure 5.15), when a load is distributed evenly along the beam is given by this formula: d=wx224EI(x2+6l24lx) d is the deflection at location x (ft). xisthedistancefromthesecuredend( ft).wistheweightplacedattheendofthebeam( lbs/ft).listhebeamlength( ft). Eisthemodulesofelasticity( lbs/f t 2 ).Iisthesecondmomentofinertia( f t 4 ). For the beam shown in Figure 5.15, the second moment of inertia is determined as follows: l=bh312 b is the beam’s base. h is the beam’s height. Using these formulas, write, compile, and run a C++ program that determines and displays a table of the deflection for a cantilevered pine beam at half-foot increments along its length, using the following data: w=200lbs/ftl=3ftE=187.2106lb/ft2b=.2fth=.3ftarrow_forwardUse python plzarrow_forwardUse c# for the following casearrow_forward
- PLEASE USE C PROGRAMMING TO CODE THIS PROBLEM. EXPLAIN the logic with us of a diagram if possible, or clear enough that i can write this code if I was to ever come across a problem like it again Description Given a board with N rows and M columns, the rows are numbered from 1 to N from top to bottom, and the columns are numbered from 1 to M from left to right. Each element has one diagonal wall which either runs from top-left corner to bottom-right corner, or runs from top-right corner to bottom-left corner. Now given Q queries, you have to output which column the ball will fall out at the bottom row if you put it on top of the board at specific column. (The ball will naturally fall down due to gravity.) The following figure is a sample. If you drop the ball at column 2, the ball will fall out at the left side. If you drop the ball at column 5, the ball will be stuck in the board. If you drop the ball at column 3, the ball will eventually fall out at column 2. Input First line…arrow_forwardCan you please help me code thisarrow_forwardProblem B. Musical Key ConversionThe chromatic scale is a 12-note scale in music in which all notes are evenly spaced: that is, the ratio of the frequency between any two consecutive notes is constant. The notes are typically labeled in the following sequence: A, A#, B, C, C#, D, D#, E, F, F#, G, G# After G#, the labels loop back and start over with A (one octave higher). To convert between musical keys, you can shift all notes in a piece of music a constant number of steps along the scale above. For example, the sequence of notes E, E, F, G, G, F, E, D, C, C, D, E, E, D, D can be converted to another musical key by shifting everything up three steps: E, E, F, G, G, F, E, D, C, C, D, E, E, D, D G, G, G#, A#, A#, G#, G, F, D#, D#, F, G, G, F, F Notice that G was converted to A#, since going three steps up required us to loop off of the top of the scale back to the bottom: G -> G# -> A -> A#. Technically we should note that this would be A# of the next octave up, but we’ll…arrow_forward
- Python, Please use Spyderarrow_forwardUsing C++ Rotate a 3d vector by a quaternion. // 3D vector struct Vec3{ float x, y, z;}; // Struct holding 4 components of a Quaternion. Used to represent a planestruct Quaternion{ float x, y, z, w;};arrow_forwardProgram a simplified Galton board in python. It is required that: The user must select the number of rows n of the board The distribution resulting from dropping the beads should be displayed on the screen. Display an animation where the number of rows n increases over time.All resulting distributions must be scaled to the interval [0, 1], so that it is possible toappreciate the convergence to the normal distribution. Consider n from 1 to 80.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr