Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

COMPLETE ALL PARTS COMPLETE ALL PARTS COMPLETE ALL PARTS COMPLETE ALL PARTS COMPLETE ALL PARTS COMPLETE ALL PARTS 1. Recall that A hex color is

COMPLETE ALL PARTS

COMPLETE ALL PARTS

COMPLETE ALL PARTS

image text in transcribed

image text in transcribed

image text in transcribed

COMPLETE ALL PARTS

COMPLETE ALL PARTS

COMPLETE ALL PARTS

1. Recall that A hex color is a nonnegative integer, n, that has a base 16 fixed-width 6 expansion n = ( 17291926162) 16,6 where (7172)16.2 is the red component, (9192)16.2 is the green component, and (b162) 16,2 is the blue. Color cycling is a way to form a sequence of hex colors. We start with a hex color base. The next element of the sequence after the current element, c, is (256c) mod 16")+(c div 16'). We continue finding new elements of the sequence until the calculation of the next element gives a hex color that is already in the sequence. Bonus . not for credit; do not hand in Why is each element of this sequence a hex color? (a) Find an example Case such that the color cycling sequence that starts with it has exactly three elements. For full credit, include the base 16 fixed-width 6 expansion of each of the hex colors in the sequence, along with clear, correct, complete) calculations for computing each next element in the sequence and confirming that there will be exactly three elements. (b) Find an example Chaos (different from the one in the previous part) such that the color cycling sequence that starts with it has exactly one element. For full credit, include the base 16 fixed- width 6 expansion of each of the hex colors in the sequence, along with (clear, correct, complete) calculations for computing each next element in the sequence and confirming that there will be exactly one element. (c) (Graded for fair effort completeness) A shade of gray is one where the red component, green component, and blue component all have the same color. To convert a color to grayscale, we can average its three component values and use this average as the grayscaled color's red component, green component, and blue component. Fill in the blanks in the following definition of the function grayscale by specifying its domain, codomain, and the rule for application. Challenge: your expression for the rule may use only n, constant integers, and the operations + addition), - (subtraction), multiplication), div (integer division), and mod remainder). (You may not need to use all these operations.) grayscale where, for each ce grayscale(c) = 3. For this question we will consider the logic circuit for adding two two-bit numbers, (a) (Graded for fair effort completeness) Write the input-output definition table for two-bit addition with inputs to, yo, 21, yi representing (170)2,2 and (y yo 2.2 and outputs 20, 21, 22 representing (222120)2,3 = (.102.2 + (y1yo)2.2. Hint: Your table will need 16 rows of input values. Consider how to organize them. (b) In class, we saw that an expression for the circuit output value zo in terms of the input values is 2o yo Write a logically equivalent compound proposition to this, using the propositional variables to: and only the propositional connectives and . Justify your answer using the definition of logical equivalence and either a truth table or a sequence of applications of logical equivalences from class and/or the textbook. (c) (Graded for fair effort completeness) Write a compound proposition that is logically equivalent to the expression for 2 and write a compound proposition that is logically equivalent to the expression for 2, using only the propositional connectives A, V, and . Hint: CNF and DNF may be helpful here. 1. Recall that A hex color is a nonnegative integer, n, that has a base 16 fixed-width 6 expansion n = ( 17291926162) 16,6 where (7172)16.2 is the red component, (9192)16.2 is the green component, and (b162) 16,2 is the blue. Color cycling is a way to form a sequence of hex colors. We start with a hex color base. The next element of the sequence after the current element, c, is (256c) mod 16")+(c div 16'). We continue finding new elements of the sequence until the calculation of the next element gives a hex color that is already in the sequence. Bonus . not for credit; do not hand in Why is each element of this sequence a hex color? (a) Find an example Case such that the color cycling sequence that starts with it has exactly three elements. For full credit, include the base 16 fixed-width 6 expansion of each of the hex colors in the sequence, along with clear, correct, complete) calculations for computing each next element in the sequence and confirming that there will be exactly three elements. (b) Find an example Chaos (different from the one in the previous part) such that the color cycling sequence that starts with it has exactly one element. For full credit, include the base 16 fixed- width 6 expansion of each of the hex colors in the sequence, along with (clear, correct, complete) calculations for computing each next element in the sequence and confirming that there will be exactly one element. (c) (Graded for fair effort completeness) A shade of gray is one where the red component, green component, and blue component all have the same color. To convert a color to grayscale, we can average its three component values and use this average as the grayscaled color's red component, green component, and blue component. Fill in the blanks in the following definition of the function grayscale by specifying its domain, codomain, and the rule for application. Challenge: your expression for the rule may use only n, constant integers, and the operations + addition), - (subtraction), multiplication), div (integer division), and mod remainder). (You may not need to use all these operations.) grayscale where, for each ce grayscale(c) = 3. For this question we will consider the logic circuit for adding two two-bit numbers, (a) (Graded for fair effort completeness) Write the input-output definition table for two-bit addition with inputs to, yo, 21, yi representing (170)2,2 and (y yo 2.2 and outputs 20, 21, 22 representing (222120)2,3 = (.102.2 + (y1yo)2.2. Hint: Your table will need 16 rows of input values. Consider how to organize them. (b) In class, we saw that an expression for the circuit output value zo in terms of the input values is 2o yo Write a logically equivalent compound proposition to this, using the propositional variables to: and only the propositional connectives and . Justify your answer using the definition of logical equivalence and either a truth table or a sequence of applications of logical equivalences from class and/or the textbook. (c) (Graded for fair effort completeness) Write a compound proposition that is logically equivalent to the expression for 2 and write a compound proposition that is logically equivalent to the expression for 2, using only the propositional connectives A, V, and . Hint: CNF and DNF may be helpful here

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions