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

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

Embed Size (px)

Citation preview

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

Logic DesignCS221

1st Term 2009-2010

CountersCounters

Cairo University

Faculty of Computers and Information

Page 2: Logic Design CS221 1 st Term 2009-2010 Counters 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 : الخميس الصغيرة م٥ص-٩المشروعات

Page 3: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 3

serial adder

Page 4: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 4

serial adder with JK flip-flop

Page 5: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 5

serial adder with JK flip-flop

Page 6: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 6

universal shift register

Page 7: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 7

universal shift register

graphic symbol

Page 8: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 8

universal shift register

function table

Page 9: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

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'

Page 10: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

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)

Page 11: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 11

binary ripple counter

Page 12: Logic Design CS221 1 st Term 2009-2010 Counters Cairo University Faculty of Computers and Information

24/10/2009 cs221 – sherif khattab 12

synchronous counters

All flip-flops have a common clock