Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Help with the diagram and questions (Exercise) Create fsm2.c Recall the followin

ID: 2083443 • Letter: H

Question

Help with the diagram and questions

(Exercise) Create fsm2.c Recall the following from Lecture 20 for the circuit on the left and timing diagram on the right: resister inputs CLK (it2) shitter (L) skr (i) Clk controls the registers and output of the registers changes on the rising-edge of the clock (Clk). Draw the timing diagram on the right for the circuit below with 1 adder and 2 registers for 5 cycles. Register 1 Register 2 CLK i 2 Initial State: Register 1 holds '1' and register 2 holds '0' Q3. What are the first 10 values of "Register 2" in the first 10 cycles? Q4. What operation or function does this FSM perform? Q5. Write a C program that does the same operation or function and returns the value stored in "Register 2" as a function of the number of clock ticks since the FSM started.

Explanation / Answer

3) First 10 values of Register 2 are 0,1,1,2,3,5,8,13,21,34,55 and 89.

4) Fibonnaci series

5) C program :-

=============================================

#include<stdio.h>
void main(){
int f1=0,f2=1,f3=0;
int i,n=22;
for(i=0;i<n;i++){
printf("%d ",f3);
f3=f2+f1; // adding register r1 and r2
f2=f1; // updating register r1
f1=f3; // updating register r2
}
}

=================================================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote