{"id":55,"date":"2018-07-18T08:39:27","date_gmt":"2018-07-18T08:39:27","guid":{"rendered":"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/?post_type=chapter&#038;p=55"},"modified":"2018-08-03T06:56:51","modified_gmt":"2018-08-03T06:56:51","slug":"fixed-point-arithmetic-unit-i","status":"publish","type":"chapter","link":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/chapter\/fixed-point-arithmetic-unit-i\/","title":{"rendered":"Fixed Point Arithmetic Unit I"},"content":{"raw":"&nbsp;\r\n<p style=\"text-align: justify\">The objectives of this module are to discuss the operation of a binary adder \/ subtractor unit and calculate the delays associated with this circuit, to show how the addition process can be speeded up using fast addition techniques, and to discuss the operation of a binary multiplier.<\/p>\r\n&nbsp;\r\n\r\n<strong>Ripple carry addition<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The digital circuit that generates the arithmetic sum of two binary numbers of length n is called an n-bit binary adder. It is constructed with n full-adder circuits connected in cascade, with the output carry from one full-adder connected to the input carry of the next full-adder. The Figure below shows the interconnections of four full-adders (FAs) to provide a 4-bit binary adder. The input carry to the binary adder is C0 and the output carry is C4. The S outputs of the full-adders generate the required sum bits. The n data bits for the A inputs come from one register (such as R1), and the n data bits for the B inputs come from another register (such as R2). The sum can be transferred to a third register or to one of the source registers (R1 or R2), replacing its previous content.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-57 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18.png\" alt=\"\" width=\"382\" height=\"198\" \/>\r\n\r\n<strong>Binary Adder-Subtractor<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The subtraction of binary numbers can be done most conveniently by means of complements. The addition and subtraction operations can be combined into one common circuit by including an exclusive-OR gate with each full-adder. A 4-bit adder-subtractor circuit is shown in Figure. The mode input M controls the operation. When M = 0, the circuit is an adder and when M = 1, the circuit becomes a subtractor. Each exclusive-OR gate receives input M and one of the inputs of B. When M = 0, we have B XOR 0 = B. The full adders receive the value of B, the input carry is 0, and the circuit performs A plus B. When M =1, we have B XOR 1=B\u2019 and C0 = 1. The B inputs are all complemented and a 1 is added through the input carry. The circuit performs the operation A plus the 2\u2019s complement of B. For unsigned numbers, this gives A - B if A &gt;= B or the 2\u2019s complement of (B-A) if A&lt;B. For signed numbers, the result is A - B provided there is no overflow.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-59 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19.png\" alt=\"\" width=\"608\" height=\"471\" \/>\r\n<div>\r\n\r\n&nbsp;\r\n\r\nIf you have to construct adders of larger sizes, these n-bit adder blocks can be cascaded as shown above.\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Now, let us calculate the delay associated in doing a basic operation like addition. We know that combinational logic circuits can't compute the outputs instantaneously. There is some delay between the time the inputs are sent to the circuit, and the time the output is computed. Let's say the delay is <\/span><strong style=\"text-align: initial;font-size: 1em\">T<\/strong><span style=\"text-align: initial;font-size: 1em\"> units of time. Suppose you want to implement an <\/span><strong style=\"text-align: initial;font-size: 1em\">n-bit<\/strong><span style=\"text-align: initial;font-size: 1em\"> ripple carry adder. How much total delay is there? Since an <\/span><strong style=\"text-align: initial;font-size: 1em\">n-bit<\/strong><span style=\"text-align: initial;font-size: 1em\"> ripple carry adder consists of <\/span><strong style=\"text-align: initial;font-size: 1em\">n<\/strong><span style=\"text-align: initial;font-size: 1em\"> adders, there will be a delay of <\/span><strong style=\"text-align: initial;font-size: 1em\">nT<\/strong><span style=\"text-align: initial;font-size: 1em\">. This is <\/span><strong style=\"text-align: initial;font-size: 1em\">O(n)<\/strong><span style=\"text-align: initial;font-size: 1em\"> delay. Why is there this much delay? After all, aren't the adders working in parallel? While the adders are working in parallel, the carries must \"ripple\" their way from the least significant bit and work their way to the most significant bit. It takes <\/span><strong style=\"text-align: initial;font-size: 1em\">T<\/strong><span style=\"text-align: initial;font-size: 1em\"> units for the carry out of the rightmost column to make it as input to the adder in the next to rightmost column. Thus, the carries slow down the circuit, making the addition linear with the number of bits in the adder. For example, consider the expressions for the sum and the carry.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-60 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20.png\" alt=\"\" width=\"490\" height=\"65\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The carry takes two delays (a sum of products expression) and the sum takes three delays (one additional delay for the complement). Thus, as n increases, the delays become very high. Total time for computing the final n-bit sum from is 2(n-1) + 3 gate delays. When, n = 64, there will be 129 gate delays.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">There are two ways to make the adder add more quickly. One is to go in for better technology, which again has its own limitations. The second option is to use more logic as discussed below.<\/p>\r\n&nbsp;\r\n\r\n<strong>Fast adders: Carry look-ahead adders<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Carry lookahead adders add much faster than ripple carry adders. They do so by making some observations about carries. The bottle neck for ripple carry addition is the calculation of ci, which takes linear time proportional to n, the number of bits in the adder. To improve, we define gi, the <em>generate function<\/em> as gi = xi yi and pi, the <em>propogate function<\/em> as pi = xi + yi.<\/p>\r\n&nbsp;\r\n\r\nIf gi\u00a0 = 1, the ith bit generates a carry, ci+1 = 1.\r\n\r\n&nbsp;\r\n\r\nIf pi\u00a0 = 1, the ith bit propagates a carry ci from (i-1)th bit to (i+1)th bit ci+1.\r\n\r\n&nbsp;\r\n\r\nBoth gi and pi can be generated for all n bits in constant time (1 gate delay).\r\n\r\n<img class=\"size-full wp-image-61 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21.png\" alt=\"\" width=\"515\" height=\"35\" \/>\r\n\r\nci+1 is either generated in the ith bit (gi = 1), or propagated from the (i-1)th bit (ci = 1 and pi = 1) (maybe both).\r\n\r\n<img class=\"size-full wp-image-62 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-22.png\" alt=\"\" width=\"155\" height=\"40\" \/>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-63 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23.png\" alt=\"\" width=\"642\" height=\"165\" \/>\r\n\r\nNow all ci\u2019s can be generated in constant time (independent of n) of 2 more gate delays after gi\u2019s and pi\u2019s are available. This is illustrated below.\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-64 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24.png\" alt=\"\" width=\"572\" height=\"239\" \/>\r\n\r\n<img class=\"size-full wp-image-65 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25.png\" alt=\"\" width=\"433\" height=\"518\" \/>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-66 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26.png\" alt=\"\" width=\"439\" height=\"166\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The above figure shows the logic diagram of the MSI chip 74x283 for a 4-bit adder All carries can be generated by the carry-look-ahead logic in 2 gate delays after gi\u2019s and pi\u2019s are available, and all sum bits can be made available in constant time of 6 gate delays, independent of number of bits in the adder.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><strong style=\"text-align: justify;font-size: 1em\">Two-level carry look-ahead <\/strong><span style=\"text-align: justify;font-size: 1em\">: The carry look-ahead adder requires AND and OR gates with as many as (n + 1) inputs, which is impractical in hardware realization. To compromise, we pack n =4 bits as a block with carry look-ahead, and still use ripple carry between the blocks.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-67 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27.png\" alt=\"\" width=\"563\" height=\"310\" \/>\r\n\r\nThere are n \/ 4 blocks in an n-bit adder and the total gate delays can be found as:\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-68 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28.png\" alt=\"\" width=\"541\" height=\"222\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">When n = 64, the number of gate delays is 36. To improve the speed further using the same idea, define 2nd-level generate and propagate functions:<\/p>\r\nP0 = p3p2p1p0\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">If all 4 bits in a block propagate, the block propagates a carry.<\/p>\r\n&nbsp;\r\n\r\nG0 = g3 + p3g2 + p3p2g1 + p3p2p1g0\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">If at least one of the 4 bits generates carry and it can be propagated to the MSB, the block generates a carry. Now c4 can be generated in constant time (independent of n):<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-69 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29.png\" alt=\"\" width=\"625\" height=\"488\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Combining 4 blocks of 4-bit carry-lookahead adder as a super block, we get a 16-bit adder with 2 levels of carry-lookahead logic.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-70 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30.png\" alt=\"\" width=\"585\" height=\"229\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">There are n \/ 16 super blocks in an n-bit adder and the total gate delays can be found as:<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-71 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31.png\" alt=\"\" width=\"631\" height=\"256\" \/>\r\n\r\nWhen n = 64, the number of gate delays is 14.\r\n<p style=\"text-align: justify\">The very same idea can be carried out to the third level so that the carries, c16, c32, c48, and c64 can be generated simultaneously by the 3rd level carry-look ahead logic:<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-72 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32.png\" alt=\"\" width=\"560\" height=\"158\" \/>\r\n\r\n&nbsp;\r\n\r\n<strong>Binary multiplication<\/strong>\r\n\r\n&nbsp;\r\n\r\n<strong>Multiplication of positive numbers<\/strong>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The manual multiplication algorithm carried out by hand and applicable to unsigned or positive numbers is illustrated below. Each bit of the multiplier is examined and either 0\u2019s or the multiplicand are entered in each row, depending on the examined multiplier bit being a 0 or a 1, respectively.<\/p>\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-73 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33.png\" alt=\"\" width=\"380\" height=\"153\" \/>\r\n\r\n<\/div>\r\n<div>\r\n\r\nThe same multiplication can be implemented using combinational logic alone as shown below.\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-74 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34.png\" alt=\"\" width=\"593\" height=\"413\" \/>\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-75 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35.png\" alt=\"\" width=\"493\" height=\"292\" \/>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">The basic cell has an AND gate which passes on 0 or the multiplicand bit, depending on whether the multiplier bit is a 0 or a 1. The full adder adds the multiplicand \/ 0, carry in and the partial product bit from above. Note the\u00a0<span style=\"text-align: initial;font-size: 1em\">arrangement of this multiplier is similar in structure to the manual algorithm indicated earlier.<\/span><\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Multiplication can also be carried out using both combinational and sequential techniques. The adder in the ALU unit can be used sequentially. The algorithm, example and register organization are illustrated below.<\/p>\r\n\r\n<\/div>\r\n<div>\r\n\r\n<img class=\"size-full wp-image-76 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36.png\" alt=\"\" width=\"486\" height=\"381\" \/>\r\n\r\n<img class=\"size-full wp-image-77 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37.png\" alt=\"\" width=\"701\" height=\"483\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n\r\n<img class=\"size-full wp-image-78 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38.png\" alt=\"\" width=\"530\" height=\"368\" \/>\r\n\r\n&nbsp;\r\n\r\n&nbsp;\r\n<p style=\"text-align: justify\">Register A is initially loaded with all 0\u2019s, Q with the multiplier and M, with the multiplicand. The final double length product is loaded in A, Q. the control sequencer checks the LSB of the multiplier and gives the ADD \/ NOADD control\u00a0<span style=\"font-size: 1em\">signal. The MUX passes on the multiplicand or 0\u2019s depending on the LSB bit. After the addition the product is shifted right, thus shifting out the checked multiplier bit and bringing in the next bit to be tested to the LSB position. This sequence is continued n times and the final product is available in A, Q. The simulation is given above.<\/span><\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">The above technique holds good only for positive numbers. For negative numbers, the easiest way of handling is to treat the sign bits separately and attach the sign of the product finally. The other option for a negative multiplicand is to sign extend the 2\u2019s complement of the negative multiplicand and carry out the usual process. But, if the multiplier is negative, this technique doe not work. So, the option is to complement both the numbers and then handle the negative multiplicand and positive multiplier.<\/span><\/p>\r\n\r\n<\/div>\r\n&nbsp;\r\n<p style=\"text-align: justify\">There is yet another uniform method of handling positive as well as negative numbers. You will see that in the next module.<\/p>\r\n&nbsp;\r\n<p style=\"text-align: justify\">To summarize, we have discussed the fixed point arithmetic unit. We looked at binary addition, subtraction, fast adders \u2013 carry look ahead adders and binary multiplication techniques.<\/p>\r\n&nbsp;\r\n\r\n<strong>Web Links \/ Supporting Materials<\/strong>\r\n\r\n&nbsp;\r\n<ul>\r\n \t<li>Computer Organization, Carl Hamacher, Zvonko Vranesic and Safwat Zaky, 5th.Edition, McGraw- Hill Higher Education, 2011.<\/li>\r\n \t<li>Computer Organization and Design \u2013 The Hardware \/ Software Interface, David A. Patterson and John L. Hennessy, 4th.Edition, Morgan Kaufmann, Elsevier, 2009.<\/li>\r\n<\/ul>\r\n&nbsp;","rendered":"<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The objectives of this module are to discuss the operation of a binary adder \/ subtractor unit and calculate the delays associated with this circuit, to show how the addition process can be speeded up using fast addition techniques, and to discuss the operation of a binary multiplier.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Ripple carry addition<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The digital circuit that generates the arithmetic sum of two binary numbers of length n is called an n-bit binary adder. It is constructed with n full-adder circuits connected in cascade, with the output carry from one full-adder connected to the input carry of the next full-adder. The Figure below shows the interconnections of four full-adders (FAs) to provide a 4-bit binary adder. The input carry to the binary adder is C0 and the output carry is C4. The S outputs of the full-adders generate the required sum bits. The n data bits for the A inputs come from one register (such as R1), and the n data bits for the B inputs come from another register (such as R2). The sum can be transferred to a third register or to one of the source registers (R1 or R2), replacing its previous content.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-57 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18.png\" alt=\"\" width=\"382\" height=\"198\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18.png 382w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18-300x155.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18-65x34.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18-225x117.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-18-350x181.png 350w\" sizes=\"auto, (max-width: 382px) 100vw, 382px\" \/><\/p>\n<p><strong>Binary Adder-Subtractor<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The subtraction of binary numbers can be done most conveniently by means of complements. The addition and subtraction operations can be combined into one common circuit by including an exclusive-OR gate with each full-adder. A 4-bit adder-subtractor circuit is shown in Figure. The mode input M controls the operation. When M = 0, the circuit is an adder and when M = 1, the circuit becomes a subtractor. Each exclusive-OR gate receives input M and one of the inputs of B. When M = 0, we have B XOR 0 = B. The full adders receive the value of B, the input carry is 0, and the circuit performs A plus B. When M =1, we have B XOR 1=B\u2019 and C0 = 1. The B inputs are all complemented and a 1 is added through the input carry. The circuit performs the operation A plus the 2\u2019s complement of B. For unsigned numbers, this gives A &#8211; B if A &gt;= B or the 2\u2019s complement of (B-A) if A&lt;B. For signed numbers, the result is A &#8211; B provided there is no overflow.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-59 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19.png\" alt=\"\" width=\"608\" height=\"471\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19.png 608w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19-300x232.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19-65x50.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19-225x174.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-19-350x271.png 350w\" sizes=\"auto, (max-width: 608px) 100vw, 608px\" \/><\/p>\n<div>\n<p>&nbsp;<\/p>\n<p>If you have to construct adders of larger sizes, these n-bit adder blocks can be cascaded as shown above.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"text-align: initial;font-size: 1em\">Now, let us calculate the delay associated in doing a basic operation like addition. We know that combinational logic circuits can&#8217;t compute the outputs instantaneously. There is some delay between the time the inputs are sent to the circuit, and the time the output is computed. Let&#8217;s say the delay is <\/span><strong style=\"text-align: initial;font-size: 1em\">T<\/strong><span style=\"text-align: initial;font-size: 1em\"> units of time. Suppose you want to implement an <\/span><strong style=\"text-align: initial;font-size: 1em\">n-bit<\/strong><span style=\"text-align: initial;font-size: 1em\"> ripple carry adder. How much total delay is there? Since an <\/span><strong style=\"text-align: initial;font-size: 1em\">n-bit<\/strong><span style=\"text-align: initial;font-size: 1em\"> ripple carry adder consists of <\/span><strong style=\"text-align: initial;font-size: 1em\">n<\/strong><span style=\"text-align: initial;font-size: 1em\"> adders, there will be a delay of <\/span><strong style=\"text-align: initial;font-size: 1em\">nT<\/strong><span style=\"text-align: initial;font-size: 1em\">. This is <\/span><strong style=\"text-align: initial;font-size: 1em\">O(n)<\/strong><span style=\"text-align: initial;font-size: 1em\"> delay. Why is there this much delay? After all, aren&#8217;t the adders working in parallel? While the adders are working in parallel, the carries must &#8220;ripple&#8221; their way from the least significant bit and work their way to the most significant bit. It takes <\/span><strong style=\"text-align: initial;font-size: 1em\">T<\/strong><span style=\"text-align: initial;font-size: 1em\"> units for the carry out of the rightmost column to make it as input to the adder in the next to rightmost column. Thus, the carries slow down the circuit, making the addition linear with the number of bits in the adder. For example, consider the expressions for the sum and the carry.<\/span><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-60 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20.png\" alt=\"\" width=\"490\" height=\"65\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20.png 490w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20-300x40.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20-65x9.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20-225x30.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-20-350x46.png 350w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The carry takes two delays (a sum of products expression) and the sum takes three delays (one additional delay for the complement). Thus, as n increases, the delays become very high. Total time for computing the final n-bit sum from is 2(n-1) + 3 gate delays. When, n = 64, there will be 129 gate delays.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">There are two ways to make the adder add more quickly. One is to go in for better technology, which again has its own limitations. The second option is to use more logic as discussed below.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Fast adders: Carry look-ahead adders<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Carry lookahead adders add much faster than ripple carry adders. They do so by making some observations about carries. The bottle neck for ripple carry addition is the calculation of ci, which takes linear time proportional to n, the number of bits in the adder. To improve, we define gi, the <em>generate function<\/em> as gi = xi yi and pi, the <em>propogate function<\/em> as pi = xi + yi.<\/p>\n<p>&nbsp;<\/p>\n<p>If gi\u00a0 = 1, the ith bit generates a carry, ci+1 = 1.<\/p>\n<p>&nbsp;<\/p>\n<p>If pi\u00a0 = 1, the ith bit propagates a carry ci from (i-1)th bit to (i+1)th bit ci+1.<\/p>\n<p>&nbsp;<\/p>\n<p>Both gi and pi can be generated for all n bits in constant time (1 gate delay).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-61 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21.png\" alt=\"\" width=\"515\" height=\"35\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21.png 515w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21-300x20.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21-65x4.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21-225x15.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-21-350x24.png 350w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/p>\n<p>ci+1 is either generated in the ith bit (gi = 1), or propagated from the (i-1)th bit (ci = 1 and pi = 1) (maybe both).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-62 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-22.png\" alt=\"\" width=\"155\" height=\"40\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-22.png 155w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-22-150x40.png 150w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-22-65x17.png 65w\" sizes=\"auto, (max-width: 155px) 100vw, 155px\" \/><\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-63 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23.png\" alt=\"\" width=\"642\" height=\"165\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23.png 642w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23-300x77.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23-65x17.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23-225x58.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-23-350x90.png 350w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\" \/><\/p>\n<p>Now all ci\u2019s can be generated in constant time (independent of n) of 2 more gate delays after gi\u2019s and pi\u2019s are available. This is illustrated below.<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-64 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24.png\" alt=\"\" width=\"572\" height=\"239\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24.png 572w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24-300x125.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24-65x27.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24-225x94.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-24-350x146.png 350w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-65 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25.png\" alt=\"\" width=\"433\" height=\"518\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25.png 433w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25-251x300.png 251w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25-65x78.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25-225x269.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-25-350x419.png 350w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-66 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26.png\" alt=\"\" width=\"439\" height=\"166\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26.png 439w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26-300x113.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26-65x25.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26-225x85.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-26-350x132.png 350w\" sizes=\"auto, (max-width: 439px) 100vw, 439px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The above figure shows the logic diagram of the MSI chip 74&#215;283 for a 4-bit adder All carries can be generated by the carry-look-ahead logic in 2 gate delays after gi\u2019s and pi\u2019s are available, and all sum bits can be made available in constant time of 6 gate delays, independent of number of bits in the adder.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><strong style=\"text-align: justify;font-size: 1em\">Two-level carry look-ahead <\/strong><span style=\"text-align: justify;font-size: 1em\">: The carry look-ahead adder requires AND and OR gates with as many as (n + 1) inputs, which is impractical in hardware realization. To compromise, we pack n =4 bits as a block with carry look-ahead, and still use ripple carry between the blocks.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-67 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27.png\" alt=\"\" width=\"563\" height=\"310\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27.png 563w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27-300x165.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27-65x36.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27-225x124.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-27-350x193.png 350w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/p>\n<p>There are n \/ 4 blocks in an n-bit adder and the total gate delays can be found as:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-68 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28.png\" alt=\"\" width=\"541\" height=\"222\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28.png 541w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28-300x123.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28-65x27.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28-225x92.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-28-350x144.png 350w\" sizes=\"auto, (max-width: 541px) 100vw, 541px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">When n = 64, the number of gate delays is 36. To improve the speed further using the same idea, define 2nd-level generate and propagate functions:<\/p>\n<p>P0 = p3p2p1p0<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">If all 4 bits in a block propagate, the block propagates a carry.<\/p>\n<p>&nbsp;<\/p>\n<p>G0 = g3 + p3g2 + p3p2g1 + p3p2p1g0<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">If at least one of the 4 bits generates carry and it can be propagated to the MSB, the block generates a carry. Now c4 can be generated in constant time (independent of n):<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-69 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29.png\" alt=\"\" width=\"625\" height=\"488\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29.png 625w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29-300x234.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29-65x51.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29-225x176.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-29-350x273.png 350w\" sizes=\"auto, (max-width: 625px) 100vw, 625px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Combining 4 blocks of 4-bit carry-lookahead adder as a super block, we get a 16-bit adder with 2 levels of carry-lookahead logic.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-70 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30.png\" alt=\"\" width=\"585\" height=\"229\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30.png 585w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30-300x117.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30-65x25.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30-225x88.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-30-350x137.png 350w\" sizes=\"auto, (max-width: 585px) 100vw, 585px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">There are n \/ 16 super blocks in an n-bit adder and the total gate delays can be found as:<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-71 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31.png\" alt=\"\" width=\"631\" height=\"256\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31.png 631w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31-300x122.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31-65x26.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31-225x91.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-31-350x142.png 350w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/p>\n<p>When n = 64, the number of gate delays is 14.<\/p>\n<p style=\"text-align: justify\">The very same idea can be carried out to the third level so that the carries, c16, c32, c48, and c64 can be generated simultaneously by the 3rd level carry-look ahead logic:<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-72 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32.png\" alt=\"\" width=\"560\" height=\"158\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32.png 560w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32-300x85.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32-65x18.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32-225x63.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-32-350x99.png 350w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Binary multiplication<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Multiplication of positive numbers<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The manual multiplication algorithm carried out by hand and applicable to unsigned or positive numbers is illustrated below. Each bit of the multiplier is examined and either 0\u2019s or the multiplicand are entered in each row, depending on the examined multiplier bit being a 0 or a 1, respectively.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-73 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33.png\" alt=\"\" width=\"380\" height=\"153\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33.png 380w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33-300x121.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33-65x26.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33-225x91.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-33-350x141.png 350w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\n<\/div>\n<div>\n<p>The same multiplication can be implemented using combinational logic alone as shown below.<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-74 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34.png\" alt=\"\" width=\"593\" height=\"413\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34.png 593w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34-300x209.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34-65x45.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34-225x157.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-34-350x244.png 350w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-75 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35.png\" alt=\"\" width=\"493\" height=\"292\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35.png 493w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35-300x178.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35-65x38.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35-225x133.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-35-350x207.png 350w\" sizes=\"auto, (max-width: 493px) 100vw, 493px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">The basic cell has an AND gate which passes on 0 or the multiplicand bit, depending on whether the multiplier bit is a 0 or a 1. The full adder adds the multiplicand \/ 0, carry in and the partial product bit from above. Note the\u00a0<span style=\"text-align: initial;font-size: 1em\">arrangement of this multiplier is similar in structure to the manual algorithm indicated earlier.<\/span><\/p>\n<\/div>\n<div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Multiplication can also be carried out using both combinational and sequential techniques. The adder in the ALU unit can be used sequentially. The algorithm, example and register organization are illustrated below.<\/p>\n<\/div>\n<div>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-76 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36.png\" alt=\"\" width=\"486\" height=\"381\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36.png 486w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36-300x235.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36-65x51.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36-225x176.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-36-350x274.png 350w\" sizes=\"auto, (max-width: 486px) 100vw, 486px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-77 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37.png\" alt=\"\" width=\"701\" height=\"483\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37.png 701w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37-300x207.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37-65x45.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37-225x155.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-37-350x241.png 350w\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-78 aligncenter\" src=\"http:\/\/csp2.epgpbooks.inflibnet.ac.in\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38.png\" alt=\"\" width=\"530\" height=\"368\" srcset=\"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38.png 530w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38-300x208.png 300w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38-65x45.png 65w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38-225x156.png 225w, https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-content\/uploads\/sites\/46\/2018\/07\/2-38-350x243.png 350w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">Register A is initially loaded with all 0\u2019s, Q with the multiplier and M, with the multiplicand. The final double length product is loaded in A, Q. the control sequencer checks the LSB of the multiplier and gives the ADD \/ NOADD control\u00a0<span style=\"font-size: 1em\">signal. The MUX passes on the multiplicand or 0\u2019s depending on the LSB bit. After the addition the product is shifted right, thus shifting out the checked multiplier bit and bringing in the next bit to be tested to the LSB position. This sequence is continued n times and the final product is available in A, Q. The simulation is given above.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\"><span style=\"font-size: 1em\">The above technique holds good only for positive numbers. For negative numbers, the easiest way of handling is to treat the sign bits separately and attach the sign of the product finally. The other option for a negative multiplicand is to sign extend the 2\u2019s complement of the negative multiplicand and carry out the usual process. But, if the multiplier is negative, this technique doe not work. So, the option is to complement both the numbers and then handle the negative multiplicand and positive multiplier.<\/span><\/p>\n<\/div>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">There is yet another uniform method of handling positive as well as negative numbers. You will see that in the next module.<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: justify\">To summarize, we have discussed the fixed point arithmetic unit. We looked at binary addition, subtraction, fast adders \u2013 carry look ahead adders and binary multiplication techniques.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Web Links \/ Supporting Materials<\/strong><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li>Computer Organization, Carl Hamacher, Zvonko Vranesic and Safwat Zaky, 5th.Edition, McGraw- Hill Higher Education, 2011.<\/li>\n<li>Computer Organization and Design \u2013 The Hardware \/ Software Interface, David A. Patterson and John L. Hennessy, 4th.Edition, Morgan Kaufmann, Elsevier, 2009.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"author":2,"menu_order":5,"template":"","meta":{"_acf_changed":false,"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":["dr-a-p-shanthi"],"pb_section_license":""},"chapter-type":[],"contributor":[58],"license":[],"class_list":["post-55","chapter","type-chapter","status-publish","hentry","contributor-dr-a-p-shanthi"],"part":3,"_links":{"self":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":5,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/55\/revisions"}],"predecessor-version":[{"id":438,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/55\/revisions\/438"}],"part":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/parts\/3"}],"metadata":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapters\/55\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/pressbooks\/v2\/chapter-type?post=55"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/contributor?post=55"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/ebooks.inflibnet.ac.in\/csp2\/wp-json\/wp\/v2\/license?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}