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 vector of length 3, and we can apply Boolean operations to them.
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&MOD MSGT/ET SA AC PKG
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_forwardExercise#5: Calculate the total surface area of cylinderarrow_forwardExample (2.3). A voltmeter is used to measure a voltage of 9 V. the following measurements are made: 8.9, 8.8 , 9.1 , 9.2 , 8.9 calculate the precision of the third reading.arrow_forward
- Molecular Dynamics Write a computational code (Python 3) to calculate the minimum image of a system of N particles with periodic boundary conditionsarrow_forward: Practical questiod 1. Write a C program for Arduino thar controls a set of two traffic lights A & B at a crossmadk. Assume that: When the traffic lighus (A) are green or amber, the traffic lights (B) are red. • When the traffic lights (B) are green or amber, the raffic lights (A) are red. Green lights must stay on for 15 seconds, amber lights for 5 seconds and red lights for 20 seconds. 2. Sketch the circuit diagram to wire the Arduina to the two traffic lights. O COr cone COn cone O csea csas ca R/W? RIW /N RIN N bits TOVO Mode ТОР OCRO COne 2:0 Set bits HGO Under Fast PWM 00 Normal immediate 00 K11 Normal operation, ocer disconnected 001 Phase Correct PWM on TOP OXFF Normal operation, OCcBA disconnected, 01 011 Clear Timer n Compee match ICTO 010 OCROA immediate aFF Ocen reserved OCBA toggles on Compare match, 011 Fast PWM exFF 01 111 ocon reserved 100 Reserved Clear OCex on Compare Match, Set OCex at ex0. inon-inverting mode) 10 101 Phase Correct PWM OCROA on TOP exee 110 Reserved…arrow_forwardExercise 5. Python applied to physics In PH 183 you will consider simple harmonic motion. A mass attached to a spring executes simple harmonic motion about its equilibrium position with an amplitude A = 5 cm at a frequency f = 60 Hz. The particle's position at any time is described x(t) = Acos(@t + ø), with o= 2nf and o is the initial phase, which in this case is 60°. Determine the particle's instantaneous acceleration at the time t = 0.0125 s. Remember that a = d?x/dt?. (ans -6.15e03 ms-2) %3Darrow_forward
- Write an Arduino program that simulates a robot car using: • Two gear motors (DC motors) • One motor driver • A servo motor The car should move forward, stop for a one second, and then move backward (this process should be repeated continuously). When the car is moving forward the servo motor should rotate from angle 0 to angle 180 and back from angle 180 to angle 0. When the car stops or is moving backward the servo motor should stop rotating. Hello i need the solution using arduino c language as soon as possiblearrow_forwardNotes: C language Drawing a Flow Chart is a must. 3. Write a program that outputs a right-side-up triangle of height n and width 2n-1; the output for n = 6 would be:arrow_forwardSolve using c programming. Show the code clearly with console output imagearrow_forward
- Computer Science Write a program to find the image gradients of any gray scale image of your choice in python only. • Display the original, the gradient in x direction, the gradient in y direction, and the gradient magnitude images. • Apply a simple threshold to the gradient magnitude image and display the gradient magnitude and the thresholding image. You may use 100 as your threshold value or any other appropriate value.arrow_forwardMATLAB CODE COMPUTER APPLICATIONS In Electrical Engineeringarrow_forwardQ5 (a) Four control points Po(a, b), P1(2,5), P2(4,4) and P3(7,c) are available for drawing a uniform quadratic B- spline curve segment. Compute the values of a, b and c such that the curve starts from the point (1,4) and terminates with slope -0.5.arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr