Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and...

Preview:

Citation preview

Logic DesignCS221

1st Term 2009-2010

CountersCounters

Cairo University

Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 2

Administrivia homework #4 due next lecture meeting with mentor TAs on wednesday : الخميس الصغيرة م٥ص-٩المشروعات

24/10/2009 cs221 – sherif khattab 3

serial adder

24/10/2009 cs221 – sherif khattab 4

serial adder with JK flip-flop

24/10/2009 cs221 – sherif khattab 5

serial adder with JK flip-flop

24/10/2009 cs221 – sherif khattab 6

universal shift register

24/10/2009 cs221 – sherif khattab 7

universal shift register

graphic symbol

24/10/2009 cs221 – sherif khattab 8

universal shift register

function table

24/10/2009 cs221 – sherif khattab 9

binary counters

• an n-bit binary counter consists of n flip-flops and can count in binary from 0 through 2n - 1

• Binary counters use flip-flops in complementing mode, such as:

– T flip-flop with T=1

– JK flip-flop with J=K=1

– D flip-flop with D=Q'

24/10/2009 cs221 – sherif khattab 10

ripple counters

• A0 is complemented every clock cycle

• A1: every time A0 goes from 1 to 0 (negative edge)

• A2: every time A1 goes from 1 to 0 (negative edge)

24/10/2009 cs221 – sherif khattab 11

binary ripple counter

24/10/2009 cs221 – sherif khattab 12

synchronous counters

All flip-flops have a common clock