Homework Solution: Consider a digital clock that counts minutes and hours. Assume that this is a 12 hour clock, that is 13:05 is 1:05 PM. What is the time scale? In…

    Define the states, inputs and outputs in terms of a description and as formal mathematical sets. Define the next state function in terms of description and as either a state transition diagram or a mathematical function or pseudo code (if then else…) as appropriate. Define an appropriate time scale for your model Consider a digital clock that counts minutes and hours. Assume that this is a 12 hour clock, that is 13:05 is 1:05 PM. What is the time scale? Inputs? States? Outputs? Next State Function? Readout Function? (Hint: assume the input to a clock is ON, meaning to keep time, or OFF meaning do not keep time).

    Expert Answer

     
    this is an 12 hour time scale.let x is the input time and y is output time then i will give the code for this to display the timel

    Define the specifys, inputs and outputs in provisions of a title and as stiff prosaic
    sets. Define the instant specify office in provisions of title and as either a specify transition
    diagram or a prosaic office or pseudo principle (if then else…) as expend. Define
    an expend era lamina restraint your model

    Consider a digital clock that counts minutes and hours. Pretend that this is a 12 hour clock, that is 13:05 is 1:05 PM. What is the era lamina? Inputs? Specifys? Outputs? Instant Specify Office? Readout Office? (Hint: pretend the input to a clock is ON, aim to conduct era, or OFF aim do not attributable attributable attributable conduct era).

    Expert Rejoinder

     

    this is an 12 hour era lamina.permit x is the input era and y is output era then i obtain concede the principle restraint this to evidence the eral

    x=input(‘enter the input era ‘);

    if x>=12:00

    y=(x-12:00)PM

    else

    y=(x)AM.

    end

    display(‘clock is on’);%it obtain parade that clock is on

    dispay(y)% it obtain evidence the era