HDLbits

Circuits/Sequential Logic

Serial Two’s Complementer (Moore FSM)

hard
fsmserial-arithmeticsequential

Input bits arrive least-significant bit first. Copy each bit through the first 1, then invert every following bit. The output is registered. Reset with active-high asynchronous areset to begin a new word.

Example input bits: 0 1 0 1 0. Corresponding converted bits: 0 1 1 0 1.