Problems deriving state diagrams

digital-logic

If I understand correctly, the state diagram of a sequential circuit simply shows the different states the circuit goes through. However, if I'm trying to build a 2's complementer using a shift register and a flip-flop, how does the state diagram look? Seeing as what goes through the flip-flop depends on the digit put in the register, I'm not sure how to draw it.

Thanks

Best Answer

You should only consider drawing the state machine for the actual 2-complementer with serial input, and forget about the shift register (drawing a state diagram for a shift register of a given length is perfectly possible, but makes hardly any sense).

Said that, the task boils down to a single-input/single-output state machine with 2 states. Look here: http://k5rec.blogspot.com/2006/12/digital-electronics-serial-twos.html