3. Write behavioral code for up/down 2-bit binary counter (same as q2).Use state machine. Show the state machine diagram and implement code that reflects the state machine. Following is a template that you can use-
2. Write behavioral code for a 2-bit up/down counter. The counter should have synchronous reset. (State Machine is not needed)
1. Write behavioral Verilog code of 4-bit shift register with the functionalities: parallel load (select ==00), shift left (select ==01),shift right (select ==10), and no shift (select ==11). Consider serial input to be 0 in both shifts. Use two select line inputs. (State Machine is not needed)
Assuming a 1-KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers):
There exist 8 resources in the system. The current system state is as follows
Is this allocation safe, and if yes give one safe state and justify your answer?
The first known correct software solution to the critical-section problem for n processes with a lower bound on waiting of n -1 tums was presented by Eisenberg and McGuire. The processes share the following variables:
enumpstate idle, want_in, in_cs};
All the elements of flag are initially idle. The initial value of turn isimmaterial (between 0and n-1). The structure of process Piis shown in the following Figure. Prove that thealgorithm satisfies all three requirements forthe critical-section problem.
Consider the following weighted graph G on thirteen vertices:
Use either Kruskal's or Prim's algorithm to construct a minimum spanning tree for G. What is the weight of the minimum spanning tree?
Consider the following dependency graph:
Construct the component graph by identifying each of the strongly connected components (SCCS). Which of the following edges CAN be safely added to the dependency graph without reducing the number of strongly connected components?
Add ( L, A).
Add (C, F).
Add ( M, L).
What does it mean to say that an optimisation problem X is r-approximable, where r > 1?
Every polynomial-time approximate algorithm for X has an approximation ratio equal to r.greater than or
There is no exact algorithm for X that runs in polynomial-time.
There exists a polynomial-time algorithm for X than returns an approximate solution no worse than r times the global optimum.
These exists a polynomial-time algorithm for X than returns an optimal solution after at most r iterations.
Consider the following instance of the Travelling Salesman Problem:
Highlighted in bold is the following route of length62:
A → C → B → E → D → A
Using the 2-opt algorithm, which of the following modifications are valid swaps that can be made to the above route to obtain a shorter route?
Remove (A, D), (C, B)and Add(С, D), (A, B).
Remove (A, C'), (B, E)and Add(А, В), (С, Е)-
Remove (A, C'), (A, D)and add(C, D), (A, A).
Remove (A, D), (B, E)and add(А, В), (D, E).
Remove (A, D), (B,E)and add(А, E), (В, D).
Kindly submit your queries
we will make sure available to you as soon as possible.
Search Other Question
Getting answers to your urgent problems is simple. Submit your query in the given box and get answers Instantly.