How Do Divide-by-N Counters Work in Binary and Decimal Systems?

  • Thread starter Thread starter mathman44
  • Start date Start date
  • Tags Tags
    Counter
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 13K views
mathman44
Messages
204
Reaction score
0

Homework Statement



rwuc2d.jpg


Fig (a) is a counter, fig (b) is a divide-by-N counter (0 < N < 16).

The 4-bit input ABCD is (I think) what the counter counts to before resetting.

Questions

#1: For circuit (b): Say you want a divide-by-9. Why is it that to do this, the 2's complement of 9 (0111) is loaded into inputs ABCD, rather than 9 in binary (1001)?

#2: Using this same circuit, how could I make a counter that counts in base 10 rather than 16?

The Attempt at a Solution



First question: I think this is because the counter counts to 16 minus the input in binary. So, since the 2's complement of 9 is 16-9, it will count to 16-(16-9) = 9. If this is correct, why does the counter count to 16 minus the input?

Second question: Not sure at all. Any hints?

Thanks for any help.
 
Physics news on Phys.org
When the counter output is 15 and it gets one more clock pulse, it generates a high output on the carry out.

This is inverted to give a low on the load input.

So, instead of going to zero, the counter loads whatever is on the data inputs... and on the next clock pulse, counts upwards from there until it gets to 15 again.

So, if it loads 4, it will then go 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 4, ...
It took 12 pulses to do this. 16 minus 4 is 12. So, to divide by 12 we load 16 minus 12.

No, you can't use it as a 0 to 9 counter because it always has to go through 15.
 
Thanks, that makes sense. What about the last question: how could a "base 10" counter be designed using this circuit, as opposed to what we have, a base 16 counter?
 
If you post something then delete it, I still get an email of it.

Yes, you could detect the 9 to 10 change and reload 0 instead. This would require a few extra components.