1

I encountered a problem while preparing for a test.

What is the minimal number of d flip-flops required (along) with combinational logic to design a counter circuit that outputs the first seven Fibonacci numbers and then wraps around?

A) 3
B) 4
C) 5
D) 6
E) 7

My answer B

Seven Fibonacci numbers => 1 1 2 3 5 8 13.

To count to 13, we will need to 4 flip-flops hence 4 was my choice.

But the correct answer given is solutions was A.

Could someone please explain?

Community
  • 1
  • 1
  • Could it be that you have 7 possible states (which is less than 2^3)? – cHao Sep 27 '11 at 21:46
  • I am sorry, it's not yet clear to me. According to my understanding, to output 13(1101) as the 7th Fibonacci number, it would still require 4 flip-flops to store the 4 bits needed to represent 13. Care to explain further? TIA. –  Sep 29 '11 at 19:53
  • 1
    Since you already know the 7 numbers to be output, you don't need to calculate them. You could have logic outside of the flip-flops to turn 000 and 001 into 1, 010 into 2...and so on up to 110 => 13. The only thing you really need the flip-flops for is to keep track of the state, and there are only 7 states to worry about. If you wanted to calculate the numbers, you'd actually need *more* than 4 flip-flops, as you'd need to be able to keep track of the previous number and the current one (read: have 8 flip-flops, maybe more) in order to do it. – cHao Sep 29 '11 at 20:42
  • ^^^ Thanks a lot for the detailed explaination. –  Oct 02 '11 at 10:59
  • Related to: http://stackoverflow.com/questions/8071221/minimal-number-of-d-flip-flops – mjcopple Oct 09 '12 at 19:04

0 Answers0