Prev Problem
Next Problem

85. 4-bit Register

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

Code

module reg4 (
    input  wire        CLK,
    input  wire [3:0]  D,
    output reg  [3:0]  Q
);

always @(posedge CLK) begin
    Q <= D;   // capture input on rising edge
end

endmodule

Was this helpful?
Upvote
Downvote