//example 9.11.b// clc //clears the screen// clear //clears all existing variables// disp('The modulus of a Johnson counter is twice as the number of bits (or flip flops). Therefore, the number of flip flops required is 5. The count sequence is 00000, 10000, 11000, ,11100, 11110, 11111, 01111, 00111, 00011, 00001 and back to 00000')