13.07.2015 Views

Digital Electronics: Principles, Devices and Applications

Digital Electronics: Principles, Devices and Applications

Digital Electronics: Principles, Devices and Applications

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Digital</strong> Arithmetic 61Table 3.4 Example 3.8.101011 Multiplic<strong>and</strong>1 1 Multiplier000000 Start+ 101011101011 Result of first addition010101 1(Result of addition shifted one bit to right)+ 1010111000000 Result of second addition0100000 01(Result of addition shifted one bit to right)subtract’ or the ‘repeated subtract <strong>and</strong> left-shift’ algorithm. These are briefly described <strong>and</strong> suitablyillustrated in the following sections.3.6.1 Repeated Right-Shift <strong>and</strong> Subtract AlgorithmThe algorithm is similar to the case of conventional division with decimal numbers. At the outset,starting from MSB, we begin with the number of bits in the dividend equal to the number of bits inthe divisor <strong>and</strong> check whether the divisor is smaller or greater than the selected number of bits inthe dividend. If it happens to be greater, we record a ‘0’ in the quotient column. If it is smaller, wesubtract the divisor from the dividend bits <strong>and</strong> record a ‘1’ in the quotient column. If it is greater <strong>and</strong>we have already recorded a ‘0’, then, as a second step, we include the next adjacent bit in the dividendbits, shift the divisor to the right by one bit position <strong>and</strong> again make a similar check like the one madein the first step. If it is smaller <strong>and</strong> we have made the subtraction, then in the second step we appendthe next MSB of the dividend to the remainder, shift the divisor one bit to the right <strong>and</strong> again make asimilar check. The options are again the same. The process continues until we have exhausted all thebits in the dividend. We will illustrate the algorithm with the help of an example. Let us consider thedivision of (100110) 2 by (1100) 2 . The sequence of operations needed to carry out the above divisionis shown in Table 3.5. The quotient = 011 <strong>and</strong> the remainder = 10.Table 3.5Binary division using the repeated right-shift <strong>and</strong> subtract algorithm.QuotientFirst step 0 100110 Dividend−1 100DivisorSecond step 1 10011 First five MSBs of dividend−1 100 Divisor shifted to right0111 First subtraction remainderThird step 1 01110 Next MSB appended−1 100 Divisor right shifted0010 Second subtraction remainder

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!