Cody

# Problem 2676. Find the next state of a JK Flip-Flop

Solution 1673544

Submitted on 14 Nov 2018 by Sabine Ramp
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
Q_PS = 0; J=1; K=1; y_correct=1; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

2   Pass
Q_PS = 1; J=1; K=1; y_correct=0; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

3   Pass
Q_PS = 0; J=0; K=1; y_correct=0; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

4   Pass
Q_PS = 1; J=0; K=1; y_correct=0; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

5   Pass
Q_PS = 1; J=1; K=0; y_correct=1; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

6   Pass
Q_PS = 0; J=1; K=0; y_correct=1; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

7   Pass
Q_PS = 0; J=0; K=0; y_correct=0; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

8   Pass
Q_PS = 1; J=0; K=0; y_correct=1; assert(isequal(JK_FF(Q_PS,J,K),y_correct))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!