The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+17 votes

The minimum number of $\text{D}$ flip-flops needed to design a mod-258 counter is

  1. 9
  2. 8
  3. 512
  4. 258
asked in Digital Logic by Veteran (97.1k points)
edited | 3.2k views

6 Answers

+22 votes
Best answer

Mod $258$ counter has $258$ states. We need to find no. of bits to represent $257$ at max. $2^n \geq $258$ \implies n \geq 9$. 

Answer is A.

answered by Active (4.2k points)
edited by
But how can D flip flop count 258 unless we convert to JK or T flip flop.As they have asked D flip flop so i think we should not assume that conversion is [email protected] sir ,please clear this.
what about if it ask for JK flipflop?

srestha same 9

Doubt why we need conversion? why D flip flop can't count.if we use some combinatory ckt before giving input to D Flip flop then it is possible to count 0 to 2^n-1.
Is this count same for a synchronous and asynchronous counter?
+17 votes

Flip -Flop is a binary cell capable of storing 1-bit of information. so to store n-bit we need n Fli-Flip.

n-bit Ring Counter can have n different output states.

n-bit Twisted ring counter(Johnson Ring Counter) can have 2n different output states.

n-bit ripple counter (mod-2n counter) can have 2different output states.

so i mean to say

A Ring Counter that consist n Flip-Flip will have n-states.

3-bit ripple counter is called as MOD-8 counter. So in general, an n-bit ripple counter is called as modulo-N counter. Where, MOD number = 2n.

so MOD-258 counter needs 9 bit to store all states so ultimately 9 Flip-Flop.

Tell me if i went wrong somewhere.

answered by Boss (13.8k points)
Hi might be a silly query but still how did we make the assumption that its n bit ripple counter and not ring or twisted ring counter?

Because that gives us the minimum no of flip flops i,e ceil(log2(258)) =9, while Ring counter needs 258 FFs and Johnson counter needs 128 FFs.

But D FF cannot be used in case of Ripple Counter?

By converting each D FF to J-K FF, we can.


Because that gives us the minimum no of flip flops i,e ceil(log2(258)) =9, 

But if the question is like

How many D flip-flops are needed to design a mod-258 counter ? Then also we get the same answer.

+11 votes

Following is the $mod-4$ counter using two D-flip flops:

Using the same technqiue we can build $mod-258$ counter using $nine$ D-Flip Flops.

Hence, Answer is (A).

answered by Boss (42.4k points)

@Manu Thakur can we say to count 2^n states, we need n flip flops(any flip flop) as we can design a combinational circuit which will provide input such that it will count those many number of states.


+1 vote
An n-bit binary counter consists of n flip-flops and can count in binary from 0 to 2^n-1

2^n ≥ 258
answered by Junior (907 points)
0 votes
Ok so let me explain - the first confusion is mod 258 counter - Should the counter count all 258 value or Should it count till values 258. and the Answer is it should count till 258 values just like mod 6 johnson counter counts 0-1-3-7-6-4 but it do not count 2 and 5 however it is called mod 6 counter and this requires ceil(log 6)=3bits=3 D-flipflop.

In the same manner mod 258 counter will take 9 D-flipflops.
answered by Active (2k points)
–1 vote
answer - A
answered by Loyal (8.7k points)
If we want to buid with JK and  T ffs then they are also '9' or something different?

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,808 questions
54,489 answers
74,660 users