# Fall 2015 CSCI 255 Homework 5 2nd chance

This assignment is should be uploaded to Homework 5 retry on moodle by 11:00 PM on Monday 24 November.

## Implementation of Finite State Machines

In Homework 5, you designed and implemented a finite state machine that produces a 1 if and only if its input bitstring, from the time the FSM was reset, encodes a number that when divided by 5, produced a remainder of 0.

This time, we make a small change: design and implement a finite state machine that produces a 1 if and only if its input bitstring, from the time the FSM was reset, encoded a number that when divided by 6, produces a remainder of 3 or 5.

Here are examples of inputs that satisfy this criteria.

• 11
• 1111
• 111111
• 11111111
• 101
• 1011
• 10111
• 10001011011110110010001011100010010000001

## Next state table

 `S0` 0 `S0` `S0` 1 `S1` `S1` 0 `S2` `S1` 1 `S3` `S2` 0 `S4` `S2` 1 `S5` `S3` 0 `S0` `S3` 1 `S1` `S4` 0 `S2` `S4` 1 `S3` `S5` 0 `S4` `S5` 1 `S5`

## Output table

 `S0` `0` `S1` `0` `S2` `0` `S3` `1` `S4` `0` `S5` `1`

Try to keep it simple. I suggest you use a ROM and register as shown in the Homework 5 solution. In fact you can just start with the Homework 5 solution, but be sure to acknowledge its creator.

Also, be sure to include a reset line for starting your circuit in the right state.

## Testing of the Finite State Machines

Describe your plan for testing your finite state machine. This should be a couple of paragraphs long.

## What to turn in

Turn in the Logisim .circ file for your implementation and a file describing your testing strategy.