4 bit binary counter

21
4-bit Synchronous Binary Counter 15CP308, 15CP309, 15CP310, 15CP311

Upload: jainee-solanki

Post on 11-Jan-2017

521 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: 4 bit Binary counter

4-bit Synchronous Binary Counter15CP308, 15CP309, 15CP310, 15CP311

Page 2: 4 bit Binary counter

• A counter is a sequential circuit that goes through a predetermined sequence of states upon the application of clock pulses.• Counters can be used to Increment Binary Numbers. (count++)

Background (Counters)

Types of Counter

Synchronous Counter Ripple CounterCommon Clock Pulse

for all Flip FlopsOutput of each Flip Flop triggers other Flip Flops

Page 3: 4 bit Binary counter

• Binary Counter• Binary Up-Down Counter• BCD Counter• Binary Counter with Parallel Load• many more..

List of Synchronous Counters

Page 4: 4 bit Binary counter

1. Truth Table of JK Flip Flop2. Understanding Circuit Diagram3. Understanding Logic States4. Output5. Truth Table6. Timing Diagram

4-bit Synchronous Binary Counter

Page 5: 4 bit Binary counter

Truth Table of JK Flip Flop

J K Q MEANING

0 0 Q NO CHANGE

0 1 0 RESET

1 0 1 SET

1 1 Q’ TOGGLE

Page 6: 4 bit Binary counter

Understanding Circuit Diagram

We are using four JK Flip-Flops to built 4-bit synchronous binary counter

Page 7: 4 bit Binary counter

Understanding Circuit Diagram

As this is a synchronous counter all flip-flops have common clock pulse

Page 8: 4 bit Binary counter

Understanding Circuit Diagram

We just rearranged the clock inputs so that we don’t get confused

Page 9: 4 bit Binary counter

Understanding Circuit Diagram

We will be using four AND gates as per textbook, however we can implement this by using just two AND gates also.

Page 10: 4 bit Binary counter

Understanding Circuit Diagram

Then we connect outputs of all flip-flops to one of the input of individual AND Gates

Page 11: 4 bit Binary counter

Understanding Circuit Diagram

As we are going to use same input for J and K we will short both of them in each flip flop.

Page 12: 4 bit Binary counter

Understanding Circuit Diagram

And then we connect inputs of JK-flip flops to the remaining AND input

Page 13: 4 bit Binary counter

Understanding Circuit Diagram

Outputs of each and gate becomes input to next flip-flop

Page 14: 4 bit Binary counter

Understanding Circuit Diagram

Then we can connect outputs of each flip-flop and call them A1,A2,A3,A4

Page 15: 4 bit Binary counter

Understanding Logic States

1. Initially we assume that the previous stage output is 0.2. The clock is in off condition

Page 16: 4 bit Binary counter

Understanding Logic States

Now the clock is in ON condition

Here only inputs are given.

The negative edge-trigger is applied in the

2nd instance.

Page 17: 4 bit Binary counter

Understanding Logic States

Here only inputs are given. The negative edge-trigger is applied in

the 3rd instance.

Page 18: 4 bit Binary counter

Understanding Logic States

Here only inputs are given. The negative edge-trigger is applied

in the 4th instance.

Page 19: 4 bit Binary counter

Understanding Logic States

Here only inputs are given. The negative edge-trigger is applied

in the 5th instance.

Page 20: 4 bit Binary counter

Clock/Time A4 A3 A2 A1

1 0 0 0 0

2 0 0 0 1

3 0 0 1 0

4 0 0 1 1

5 0 1 0 0

6 0 1 0 1

7 0 1 1 0

8 0 1 1 1

Output at every clock pulse / Truth Table

Clock/Time A4 A3 A2 A1

9 1 0 0 0

10 1 0 0 1

11 1 0 1 0

12 1 0 1 1

13 1 1 0 0

14 1 1 0 1

15 1 1 1 0

16 1 1 1 1

Page 21: 4 bit Binary counter

Timing Diagram