Find 0110/ 0010 0. R = Remainder = Dividend = 0000 0110 D = Divisor = 0010 0000 Q = Quotient = 0000 0000 count = 0 (decimal) MAXcount = n+1 = 5 (decimal), i.e. number of bits plus 1. 1. R = R - D R = 00000110 - 00100000 = negative 2. If R >= 0 Q = left shift(Q) Q(0) = 1 else R = R + D, // correct the R value Q = left shift(Q) Q(0) = 0 R = 00000110 Q = 00000000 3. D = right shift (D) D = 00010000 4. count++ count = 1 if count < MAXcount, goto 1 1. R = R - D R = 00000110 - 00010000 = negative 2. If R >= 0 Q = left shift(Q) Q(0) = 1 else R = R + D, // correct the R value Q = left shift(Q) Q(0) = 0 R = 00000110 Q = 00000000 3. D = right shift (D) D = 00001000 4. count++ count = 2 if count < MAXcount, goto 1 1. R = R - D R = 00000110 - 00001000 = negative 2. If R >= 0 Q = left shift(Q) Q(0) = 1 else R = R + D, // correct the R value Q = left shift(Q) Q(0) = 0 R = 00000110 Q = 00000000 3. D = right shift (D) D = 00000100 4. count++ count = 3 if count < MAXcount, goto 1 1. R = R - D R = 00000110 - 00000100 = 00000010 2. If R >= 0 Q = left shift(Q) Q(0) = 1 Q = 00000001 else R = R + D, // correct the R value Q = left shift(Q) Q(0) = 0 3. D = right shift (D) D = 00000010 4. count++ count = 4 if count < MAXcount, goto 1 1. R = R - D R = 00000010 - 00000010 = 00000000 2. If R >= 0 Q = left shift(Q) Q(0) = 1 Q = 00000011 else R = R + D, // correct the R value Q = left shift(Q) Q(0) = 0 3. D = right shift (D) D = 00000001 4. count++ count = 5 if count < MAXcount, goto 1 ---------------- Q = 00000011 R = 00000000 0110/ 0010 = 0011 with a remainder of 0000