# GATE2015-1-20

7.3k views

Consider a 4-bit Johnson counter with an initial value of 0000. The counting sequence of this counter is

1. 0, 1, 3, 7, 15, 14, 12, 8, 0
2. 0, 1, 3, 5, 7, 9, 11, 13, 15, 0
3. 0, 2, 4, 6, 8, 10, 12, 14, 0
4. 0, 8, 12, 14, 15, 7, 3, 1, 0

edited
23
In case of synchronous counters choosing msb and lsb does not matter , it can be from any side because the operation is done in parallel per clock pulse but in case of asynchronous counter it matters because it is done serially . Since johnson counter is synchronous it wont matter here so answer can be both a and d.
2
Both options $A$ and $D$ are actually reverse orders of each other. So, if one can be done other can also be done by changing the order of MSB and LSB.
0
@mcjoshi for asynchronous counter what will be answer???
0
No matter how much you try to justify Answer- D but this is indeed not a proper question asked.

Consider D flipflops in johnson counter are in series Q0Q1Q2Q3 from left to right and now we can either assign LSB of the binary no. to Q0 or LSB of the binary no. to Q3. But how you would be so sure to assign LSB to Q3 only? We could assign it to any one of them for sure. There is no restriction.
0

If you think the question is ambiguous because of ambiguity between MSB and LSB see the reference provided by Arjun sir and Srestha mam.

0
already seen their comments, referred books, NPTEL video lecture then saying it is an ambiguous question. There is indeed no restriction on the assignment of LSB & MSB.
0

@Nitesh Singh 2 see the dates below their comments, references are given in 2018 and their comments pertaining to  "ambiguity" in question are of 2015....

$\text{Johnson Counter}$ is a switch‐tail ring counter in which a circular shift register with the complemented output of the last flip‐flop connected to the input of the first flip‐flop.

selected
16

Ref:

15

these line of Mano specifies A) cannot be answer

0
Agree
1
@srestha
so here we should forget about that taking which one is MSB & which one is LSB concept, right??
we should only focus on the features of Johnson counter which is specified in Morris Mano.
Is this the approach of this question???
0

i think we can because if  take E as MSB and A as LSB  and start from(0000) then the ans will be same following the features of Johnson counter

0

mam

If it was ring counter then it's like 0-0-0-0......

right???

0
I havenot got u
0
If ring counter initial state with 000 & no external i/p given then

000 - 000 -000 - 000.........
0

@MRINMOY_HALDER

but why??

it can take 000-100-010-001-000

like that.

why only 0's?

0
last FF output is fed to 1st FF i/p, that's why I'm thinking like this.

if initial state is 001 then it will be 001 - 100 - 010 - 001 - 100.....
3

Advantage of Johnson counter(Twisted ring) over ring counter:

1) Twisted ring counter can count upto 2n states where as ring counter can count upto only n states.

2) Ring counter needs initialization. Twisted ring counter does not need any initialization (it will start counting in whichever state it is in.)

Ring counter with states 0000 without initialization will be stuck in 0000.

option D

0000 - 0

1000 - 8

1100 - 12

and so on.

http://en.wikipedia.org/wiki/Ring_counter

6
why not (A)....?? if i consider q3 as MSB ... i got option (a) ... and here not mention what is MSB and LSB ... or

i consider D0 = Q3' , D1=Q0, D2 =Q1, D3= Q2

Q3N =D3, Q2N= D2 , Q1N= D1, Q0N= D0.
0
option A and D both are correct .
0
Isn't MSB defined in Johnson counter?
2
as per i know you can take any one as msb ( Q0 or Q3 ) , its depends on the user .
2
I have to see that, but GATE key had only D.
4

Arjun Sir I marked A in exam...lost marksin wiki link it is given that clocl should be applied to Msb...but i dont think there is any such rule

0
yes sir in answer key ans is (D)... but we can do any method ....
0
???
0
@csegate2 nice , its a gif right ?? is it made by you ? or same old policy ctrl c + Ctrl v  :P
0
i dont know who you are , but I will find you, I will learn the secret of that pic :D ....
1

Listen everyone, I'll kill you I'm saying

for mithilesh

0
The answer can be either A or D depending on which one you choose as MSB since nothing is given .
The persons answering it either A or D should be given mark.
6

What is the mistake in this? please explain.

I think correct answer is A

1
u r missing 14 only . rest is OK.
0
The flip flops should be arranged like D3->D2->D1->D0, in the same sequence as that of the table.
2

from morris mano

0

If the answer would have been asked for ring counter then the answer is A. The johnson counter is switch‐tail ring counter so the complement of the output is given as input so answer is D. It would act like T-FF. Am i right?

0

@Pooja Palod did you apply for correction in gate official key in 2015....

Counting procedure of a Johnson's Counter

1. Starting from all 0's , each shift operation inserts 1's from the left until the register is filled with all 1's.
2. When the register has all 1s,each shift operation inserts 0's from the left until the register is filled with all 0's.
3. Go to step 1.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

0000 $\rightarrow$ ${\color{Red} 1}$000 $\rightarrow$ ${\color{Red} 1}{\color{Red} 1}$00 $\rightarrow$  ${\color{Red} 1}{\color{Red} 1}{\color{Red} 1}$0 $\rightarrow$  ${\color{Red} 1}{\color{Red} 1}{\color{Red} 1}{\color{Red} 1}$ $\rightarrow$  ${\color{Blue} 0}{\color{Red} 1}{\color{Red} 1}{\color{Red} 1}$ $\rightarrow$ ${\color{Blue} 0}{\color{Blue} 0}{\color{Red} 1}{\color{Red} 1}$ $\rightarrow$  ${\color{Blue} 0}{\color{Blue} 0}{\color{Blue} 0}{\color{Red} 1}$ $\rightarrow$ ${\color{Blue} 0}{\color{Blue} 0}{\color{Blue} 0}{\color{Blue} 0}$

OR

0 $\rightarrow$ 8 $\rightarrow$ 12 $\rightarrow$ 14 $\rightarrow$ 15 $\rightarrow$ 7 $\rightarrow$ 3 $\rightarrow$ 1 $\rightarrow$ 0

--------------------------------------------------------------------------------------------------------------------------------------------------------------------

$\therefore$ Option D is correct answer.

1
Although this is the most appropriate answer to this question still I have one query.

Consider D flipflops in johnson counter are in series Q0Q1Q2Q3 from left to right and now we can either assign LSB of the binary no. to Q0 or LSB of the binary no. to Q3. But how you would be so sure to assign LSB to Q3 only? We could assign it to any one of them for sure. There is no restriction.
0

you insert data in anyway but working of Johnson's counter will not change right ?

It will be same as i have written in the answer.

So suppose instead of entering 1000 you entered 0001,

then it will start generating like  0001->0000 -> 1000.... and so on. i.e. 1->0->8

But i know that the output should be 1000-> 1100 -> 1110 .... i.e. 8 ->12 -> 14

So by looking at the pattern i would be sure that i have written entered data incorrectly.

NOTE :-

We are just saying that leftmost is MSB and rightmost is LSB but who cares. You can treat the input and outputs whichever way you want. I can say that i will treat my MSB as righmost bit and leftmost bit as LSB and accordingly assume my inputs and outputs produced in decimal format. i.e. 0001 means 8 to me.

Johnson counter is ring counter hence after period of clock cycles its output will repeat .

here 0000 is given as initial state and hence 1 is given as preset in first flipflop and then this one is propagated to consecutive flipflops producing

1000

1100

1110

1111

0111

0011

0001

0000

as output .

Johnson counter /twisted ring counter :-

"N" bit then there will be "2N" states

Option B easily eliminated as it has 9 state form rest we will have to check out.

## Related questions

1
6k views
Consider the DFAs $M$ and $N$ given above. The number of states in a minimal DFA that accept the language $L(M) \cap L(N)$ is_____________.
Consider a max heap, represented by the array: $40, 30, 20, 10, 15, 16, 17, 8, 4$ ... $40, 30, 20, 10, 35, 16, 17, 8, 4, 15$ $40, 35, 20, 10, 15, 16, 17, 8, 4, 30$
The binary operator $\neq$ ... the following is true about the binary operator $\neq$ ? Both commutative and associative Commutative but not associative Not commutative but associative Neither commutative nor associative
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height $5$ are $63$ and $6$, respectively $64$ and $5$, respectively $32$ and $6$, respectively $31$ and $5$, respectively