Question: The pseudocode shown in figure functionally describes the chronometer of lesson 2 . 1 . The update procedure updates the values of h , m

The pseudocode shown in figure functionally describes the chronometer of lesson 2.1. The update procedure
updates the values of h,m,s and t whenever a clock pulse arrives (ref_positive_edge signal).
Which of the following pieces of pseudocode correctly implement the update procedure?. Mark all that
apply.
loop
If reset=ON then h}=0;\textrm{fi}=0;s=0;\textrm{t}=0
else if start = ON then
while stop = OFF loop
if ref_positive_edge = TRUE then update(h, m, s, t);
end if;
end loop;
end if;
end If;
end loop;
t}=\textrm{t}+1
If t =10 then t}=\mathrm{0;add_one_second =1;
else add_one_second =0;
end if;
s = s + add_one_second;
If s =60 then s =0; add_one_ninute =1;
else add_one_minute =0;
end if;
nf = nil + add_one_minute;
If n =60 then nil =0; add_one_hour =1;
\ else add_one_hour =0;
end if;
h = h + add_one_hour;
If h =24 then h=; end If;
If t =9 then }\textrm{t}=0;\mathrm{ add_one_second =1;
else add_one_second =0;
end if;
t}=\textrm{t}+1\mathrm{ ;
If }s=60\mathrm{ then }s=0;\mathrm{ add_one_ninute =1;
else add_one_minute =0;
end If;
s = s + add_one_second;
If nt =60 then in =0; add_one_hour =1;
else add_one_hour =0;
end if;
ni = ni + add_one_minute;
If h =24 then h= B; end If;
h = h + add_one_hour;
t}=\textrm{t}+1
If t =10 then }\textrm{t}=0;s=s+1\mathrm{ ; end if;
If s =60 then }s=0;m=m+1;\mathrm{ end if;
If nt =60 then n =0; h = h+1; end If;
If h =24 then h =0; end if;
The pseudocode shown in figure functionally

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!