Home / Engineering / Digital Principles and System Design / Question

M

Mr. Dubey • 51.17K Points
Coach

Q.) Which of the following line is correct for detecting positive edge of a clock?

(A) if (clk’event and clk = ‘0’)
(B) if (clk’event and clk = ‘1’)
(C) if (clk’event or clk = ‘0’)
(D) if (clk’event or clk = ‘1’)
Correct answer : Option (B) - if (clk’event and clk = ‘1’)

Explanation:
 the correct way to identify the positive edge of the clock signal is shown in option b. the ‘event attribute will detect the event and clk = ‘1’ will check whether its high on clock or not. in this way the positive edge is monitored. we need to use and operator because both of the conditions should be true.

Share

Discusssion

Login to discuss.