Question: ( 2 5 pts . ) Assume we will read two binary values x and y ( x and y can be either ' 0

(25 pts.) Assume we will read two binary values x and y(x and y can be either '0' or '1'), where x is the value generated by a sensor and y is the value generated by an algorithm. Our objective is to compare these two values x and y. We will record the values x and y every 10 minutes and we will use the last 3 recorded values (present,10 minutes ago and 20 minutes ago) as follows: Produce an output z, which will be equal to either the x or y value recorded 20 minutes ago. If the current and previous recorded values of x and y are equal, then z will be equal to x, otherwise to y. Ex1: If the stored x and y values are as in the following table, both the current and 10 min. ago values are the same for x and y, so z is equal to the value of x stored 20 min. ago, that is z is 1. Ex2: If the stored x and y values are as in the second table, the current values are equal but 10 min. ago values are not, so z is equal to the value of y stored 20 min. ago, that is z is 0. Do not forget that we have a stream of x and y values, so make sure that you have a design that updates values every 10 minutes.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!