1 / 14

Other Arithmetic Functions Section 4-5

Other Arithmetic Functions Section 4-5. Combinational Multiplier. Example: 4-Bit Multiplicand B = {B 3 B 2 B 1 B 0 } 3-Bit Multiplier A = {A 2 A 1 A 0 } Product is a 7-Bit number, C = {C 6 C 5 C 4 C 3 C 2 C 1 C 0 }. Computing the Product.

Télécharger la présentation

Other Arithmetic Functions Section 4-5

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Other Arithmetic FunctionsSection 4-5

  2. Combinational Multiplier Example: • 4-Bit Multiplicand B = {B3 B2 B1 B0} • 3-Bit Multiplier A = {A2 A1 A0} • Product is a 7-Bit number, C = {C6 C5 C4 C3 C2 C1 C0 }

  3. Computing the Product • Let us work out the multiplication on the board:

  4. 4-Bit by 3-Bit Binary Multiplier Multiplier

  5. Contraction Can implement other functions ( Like increment, decrement ) by using basic arithmetic circuits (e.g. Adder) And removing unused portions • This is called contraction

  6. Hiding Box Hiding Box Hiding Box Hiding Box Hiding Box Incrementing • Very common • Computation of memory address for the next instruction to execute by CPU • Use a customized adder To increment A = { A2 A1 A0 }, do A2 A1 A0 + 001; Do not use C3 (why?)

  7. Reference C2 Customized adder To increment A = { A2 A1 A0 }, do A2 A1 A0 + 001; Ignore C3

  8. C2 C2 C1 Cell 0 Eliminate Unneeded Gates No need for C3 0 C2 Cell 2 Cell 1

  9. Multiplication by Constant Case 1: Constant is a power of two Case 2: Constant is NOT a power of two

  10. C = 4 * B C = B / 4 Multiplication by Power of 2 • Just wires • Division by power of 2 similar

  11. AND gates removed because A is a constant First adder removed by contraction Multiplication by A ConstantWhich Is Not A Power Of 2

  12. Contraction Not Always Best • Sometimes it pays to rethink the function • Example: study decrementer in book (Example 4-6 page 167)

  13. Sign Extension • Changing the number of bits used to store a number is common • Example: • -5 in stored in 4-bits (1011) • to store -5 in 8 bits, extend the “Sign Bit” in the 4 left most bits • 1011 is changed to 1111 1011 • 1011 = -5 • 1111 1011 is also -5

  14. We’ve Covered • Adders • Ripple carry • Subtracting unsigned numbers • New design for adder-subtractor • Signed numbers • Signed addition/subtraction • Multiplication – just basic • Modified Circuits

More Related