H***F 发帖数: 2501 | 1 suppose we have a system with bits coming serially. the output is 1 only if
the number at that cycle is divisible by 7. creat a state diagram. any
ideas?
1--->next bit
10=2--->next bit
101=5--->next bit
1011=11--> | l*****x 发帖数: 3431 | 2 寻找"111"string?
if
【在 H***F 的大作中提到】 : suppose we have a system with bits coming serially. the output is 1 only if : the number at that cycle is divisible by 7. creat a state diagram. any : ideas? : 1--->next bit : 10=2--->next bit : 101=5--->next bit : 1011=11-->
| H***F 发帖数: 2501 | 3 不是。111可以被7除,10101=21也可以被7除。。
寻找"111"string?
if
【在 l*****x 的大作中提到】 : 寻找"111"string? : : if
| b*****e 发帖数: 1193 | 4 what's the cycle?
4 bits? | H***F 发帖数: 2501 | 5 不停,一直下去。后面的补上来称为新的一位。
【在 b*****e 的大作中提到】 : what's the cycle? : 4 bits?
| e***y 发帖数: 4307 | 6 states:
start, s1, s2, s3, s4, s5, s6, s7
state transitions (input, next state)
start: (1, s1), (0, start)
s1: (1, s3), (0, s2)
s2: (1, s3), (0, s6)
s3: (1, s7), (0, s6)
s4: (1, s5), (0, s1)
s5: (1, s4), (0, s3)
s6: (1, s6), (0, s5)
s7: (1, s1), (0, s7) ==> output 1 at s7
basically the idea is to represent the remainders of division by 7 using
states s1-s7. there are only 7 different remainders so 7 states are needed.
at each input you'd determine the next remainder and hence the next state. | H***F 发帖数: 2501 | 7 good, thank you
【在 e***y 的大作中提到】 : states: : start, s1, s2, s3, s4, s5, s6, s7 : state transitions (input, next state) : start: (1, s1), (0, start) : s1: (1, s3), (0, s2) : s2: (1, s3), (0, s6) : s3: (1, s7), (0, s6) : s4: (1, s5), (0, s1) : s5: (1, s4), (0, s3) : s6: (1, s6), (0, s5)
| j***j 发帖数: 324 | 8 very good and clear. smart...
【在 e***y 的大作中提到】 : states: : start, s1, s2, s3, s4, s5, s6, s7 : state transitions (input, next state) : start: (1, s1), (0, start) : s1: (1, s3), (0, s2) : s2: (1, s3), (0, s6) : s3: (1, s7), (0, s6) : s4: (1, s5), (0, s1) : s5: (1, s4), (0, s3) : s6: (1, s6), (0, s5)
|
|