Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 Practice exercises do not score in the final grade. Therefore, you can freely discuss them in the Forum without worrying about whether you
Question
Practice exercises do not score in the final grade. Therefore, you can freely discuss them in the Forum without worrying about whether you are transgressing the Honor Code.
The pseudocode shown in figure functionally describes the chronometer introduced in lesson The update procedure updates the values of h m s and t whenever a clock pulse arrives refpositiveedge signal
Does the pseudocode shown in figure correctly implement the update procedure?
Figure loop
if resetON then h ; m ; s ; t ;
else if startON then
while stopOFF loop
if refpositiveedgeTRUE then updatehmst;
end if;
end loop;
end if;
end loop; Figure : update procedure if t then t ; addonesecond ;
else t t; addonesecond ;
end if;
s s addonesecond;
if s then s ; addoneminute ;
else addoneminute ;
end if;
m m addoneminute;
if m then m ; addonehour ;
else addonehour ;
end if;
h h addonehour;
if h then h ;
end if; yES
NO; the condition in line should be t instead of t
NO; the condition in line should be s instead of s
NO there are other failures different of the two previous ones
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started