Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 140L Lecture 7 Professor CK Cheng 5/13/02. Announcements  State Assignment: Chapters 7.4.3, 7.7.3, 7.74 3 kinds of coding: 1) Binary – [ log 2 n ]

Similar presentations


Presentation on theme: "CS 140L Lecture 7 Professor CK Cheng 5/13/02. Announcements  State Assignment: Chapters 7.4.3, 7.7.3, 7.74 3 kinds of coding: 1) Binary – [ log 2 n ]"— Presentation transcript:

1 CS 140L Lecture 7 Professor CK Cheng 5/13/02

2 Announcements  State Assignment: Chapters 7.4.3, 7.7.3, 7.74 3 kinds of coding: 1) Binary – [ log 2 n ] bits 000,001,110, etc. 2) Gray – can change by only 1 bit i.e. 000-> 001->011->010. 3) Johnson - [ n/2 ] (bits) number of flip flops.

3 4) One hot: We use n F-Fs for n states. Q i = 1 iff present state = S i. S0 0 S1 0 1 S2 1 0 1 D Q Q’ X X’ D Q Q’ X X’ D Q Q’ X X’ (X not true -> back to 1 st FF, else to 2 nd ) Use OR gates to collect the inputs Use AND gates to branch out the transition

4 5) “Don’t Care State” coding S(n-1) S(n-2). S1 S0 Q n-1 1 0 Q n-2 - 1 0 Q 1 - 1 0 Q 0 - 1.. State i  Q j = 0 V j  i Q i = 1 Q j = x V j  i

5 System Design Inst R1 R2R3 I2I2 I1I1 I0I0 D3D3 D2D2 D1D1 D0D0 I 2 I 1 I 0 0 0 1 0 0 1 2 0 1 0 3 0 1 1 4 1 0 0 5 1 0 1 6 1 1 0 7 1 1 1 Init Move 1 Move 2 Store Add Shift Comp Mask

6 Wrap Around Shift Init: R1 = R2 = R3 = (0,0,0,0) Mov1: R1 = (a,b,c,d) Mov2: R2 = (a,b,c,d) Store: R2 = R3 Add: R3 = R1 + R2 Overflow flag Shift: R3 = (R2 Shift left by (a,b) bits) Comp: flag(R1, R2) = 1 iff R1 > R2 And: R3 = (R1)&(R2)


Download ppt "CS 140L Lecture 7 Professor CK Cheng 5/13/02. Announcements  State Assignment: Chapters 7.4.3, 7.7.3, 7.74 3 kinds of coding: 1) Binary – [ log 2 n ]"

Similar presentations


Ads by Google