0% found this document useful (0 votes)
34 views14 pages

09-Arithmetic Circuits II

This document discusses arithmetic functions that can be implemented using basic circuits like adders. It describes a 4-bit by 3-bit binary multiplier and how to compute the product. It also discusses how to implement other functions like increment, decrement, and multiplication by constants using contraction to remove unused portions of adders. Sign extension is described as a way to change the number of bits used to store a number while keeping the same value.

Uploaded by

Hiba Mughal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views14 pages

09-Arithmetic Circuits II

This document discusses arithmetic functions that can be implemented using basic circuits like adders. It describes a 4-bit by 3-bit binary multiplier and how to compute the product. It also discusses how to implement other functions like increment, decrement, and multiplication by constants using contraction to remove unused portions of adders. Sign extension is described as a way to change the number of bits used to store a number while keeping the same value.

Uploaded by

Hiba Mughal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 14

Other Arithmetic Functions

Section 4-5
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 }
2
Computing the Product
• Let us work out the multiplication
on the board:

3
Multiplier

4-Bit by 3-Bit Binary Multiplier

4
Contraction
Can implement other functions ( Like
increment, decrement ) by using basic
arithmetic circuits (e.g. Adder) And
removing unused portions

• This is called contraction

5
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?)
Hiding Box
Hiding Box
Hiding Box

Hiding Box

Hiding Box
6
Customized adder Reference

To increment A = { A2 A1 A0 }, do

A2 A1 A0 + 001; Ignore C3

C2

7
Eliminate Unneeded Gates
No need
for C3
0

C
C22

C2 C1

Cell 2 Cell 1 Cell 0

8
Multiplication by Constant
Case 1: Constant is a power of two

Case 2: Constant is NOT a power of


two

9
Multiplication by Power of 2
• Just wires

C=4*B

• Division by power of 2 similar

C=B/4

10
Multiplication by A Constant
Which Is Not A Power Of 2

AND gates removed


because A is a
constant

First adder removed


by contraction

11
Contraction Not Always Best

• Sometimes it pays to rethink the


function
♦ Example: study decrementer in book
(Example 4-6 page 167)

12
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

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

14

You might also like