> Can someone please show me this binary devision using the serial divider?

Can someone please show me this binary devision using the serial divider?

Posted at: 2014-12-18 
I'm having hard time showing the process of serial unsigned division for 1010 divided by 0101 using the serial divider.

1010 / 0101 = ?

Numerator (Q): 1010

Divisor (M): 0101

Number of Q bits is 4 -> four operations

--- A --- Q -

00000 1010 (init A/remainder to 0)

1)

00001 0100 (shift left)

11011 0100 (subtract M from A, note leftmost bit of A is 1)

00001 0100 (restore A, only if leftmost A was 1)

00001 0100 (rightmost bit of M is set if A's leftmost was 0 and vice-versa)

2)

00010 1000 (shift left)

11101 1000 (subtract M from A, leftmost A is 1)

00010 1000 (restore A)

00010 1000 (set rightmost Q to 0)

3)

00101 0000 (shift left)

00000 0000 (subtract M from A, leftmost A is 0, no restoration of A)

00000 0001 (set rightmost Q to 1)

4)

00000 0010 (shift left)

11011 0010 (subtract M from A, left most A is 1)

00000 0010 (restore A)

00000 0010 (set rightmost Q to 0)

Done. A is the remainder: 0

Q contains result: 0010 or in denary: 2

I'm having hard time showing the process of serial unsigned division for 1010 divided by 0101 using the serial divider.