Answered step by step
Verified Expert Solution
Question
1 Approved Answer
b ) A digital system is to count the number of bits in a register, A , that has the value 1 . A step
b A digital system is to count the number of bits in a register, that has the value A stepby
step procedure, or algorithm, that can be used to perform the required task is as follows:
It assumes that is stored in a register that can
shift its contents in the lefttoright direction.
The answer produced by the algorithm is
stored in the variable named The algorithm
terminates when A does not contain any more
that is when In each iteration, if the
leastsignificant bit LSB of is then is
incremented by ; otherwise, is not changed.
The contents of A are shifted one bit to the right
at the end of each iteration.
Fig. b gives an ASM chart that represents
the algorithm. The state box for the starting
state, specifies that is initialized to It
assumes that an input signal, exists, which is used to indicate when the data to be processed
has been loaded into so that the machine can start. The decision box labeled stipulates
that the machine remains in state as long as The conditional output box with Load
written inside it indicates that is loaded from external data inputs if in state
When becomes the machine changes to state The decision box below the state box for
checks whether If so the bitcounting operation is complete; hence the machine
should change to state If not, the FSM remains in state The decision box at the bottom
of the chart checks the value of If is incremented, which is indicated in the chart
as BlarrB If then is not changed. In state contains the result, which is the
number of bits in A that were An output signal, Done, is set to to indicate that the algorithm
is finished; the FSM stays in until goes back to
i Design the Datapath circuit of the ASM chart.
ii Give the ASM chart for the control circuit corresponding to part ihelp
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