Question: Modify design so it is decremented by TWO and stops, setting zero flag high, when it reaches 4 b 0 0 0 0 or 4

Modify design so it is decremented by TWO and stops, setting zero flag high, when it reaches 4b0000 or 4b0001. Type the answering WITHOUT any spaces. Include any needed semicolons. Use binary for any numbers, and INCLUDE leading zeros (e.g.2'b10 and 4b0001).
always@(posedge clock)
begin
if (latch) value <= in;
else if (dec && !zero) value <= value Answer 1 Question 3
// complete this code
end
assign zero =((value ==4'b0) Answer 2 Question 3
// complete this code
endmodule /* counter */

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!