Tutorial: ITI1100 - PowerPoint PPT Presentation

About This Presentation
Title:

Tutorial: ITI1100

Description:

Multiplicand: Y = (yM-1, yM-2, ..., y1, y0) Multiplier: X = (xN-1, xN-2, ..., x1, x0) ... With J multiplier bits and K multiplicand bits need JxK AND gates and (J-1) ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 38
Provided by: siteUo8
Category:

less

Transcript and Presenter's Notes

Title: Tutorial: ITI1100


1
Tutorial ITI1100
  • Dewan Tanvir Ahmed
  • SITE, UofO

2
Todays topicsComparatorsMultiplier
3
Comparators
  • A comparator compares a two n-bit binary values
    to determine which is greater or if they are
    equal
  • Consider the simple 1-bit comparator to
    illustrate the design
  • It is possible to extend the design for multi-bit
    numbers

4
Equality Comparator
Design a logic circuit which will compute F0
(A B)
XNOR
X
Z
Y
5
2-bit Equal Comparator Truth Table
b1 b0 a1 a0 F0
0 0 0 0 1
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 1
0 1 1 0 0
0 1 1 1 0
b1 b0 a1 a0 F0
1 0 0 0 0
1 0 0 1 0
1 0 1 0 1
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 1
6
Solution
You can show,
7
N-bit Equal Comparator
8
Not Equal Comparator
  • Design a logic circuit which will compute
  • F (A ltgt B)

F (A B)
i.e. Just invert our Equal Comparator circuit
9
Magnitude Comparator
  • Design a logic circuit which will compute
  • F2 (AgtB)
  • F1 (AltB)

Lets develop a truth table for 2-bits
10
2-bit Magnitude (unsigned) Comparator Truth Table
b1 b0 a1 a0 F2 F1
1 0 0 0 0 1
1 0 0 1 0 1
1 0 1 0 0 0
1 0 1 1 1 0
1 1 0 0 0 1
1 1 0 1 0 1
1 1 1 0 0 1
1 1 1 1 0 0
b1 b0 a1 a0 F2 F1
0 0 0 0 0 0
0 0 0 1 1 0
0 0 1 0 1 0
0 0 1 1 1 0
0 1 0 0 0 1
0 1 0 1 0 0
0 1 1 0 1 0
0 1 1 1 1 0
11
You can show
12
1-bit Comparator
13
8-bit comparator
14
1 bit comparators
  • XgtY only if Xi1, Yi0
  • XltY only if Xi0, Yi1
  • XY only if XiYi0 or XiYi1

15
1 bit comparator with propagated inputs
16
N bit comparator
  • If X Yin is active then the numbers are equal
    so far
  • If XgtYin or XltYin is active, that value is
    simply passed through This corresponds to the
    case where we have checked the high-order bits
    and already know which value is larger.

17
Comparators (computer intelligence?)
  • Let's build a comparator circuit for two 4-bit
    positive binary numbers.
  • Nine inputs, three outputs (three 512 entries
    truth tables?)

18
Designing Comparators Functionally
  • 1. Build a one-bit comparator

AgtB AB' AB A'B' AB AltB
A'B
OR What?
19
Designing Comparators Functionally
  • 2. Add an enable line

20
Build a four-bit Comparator (from four one-bit
ones)
  • Not bad

21
Combinational Multiplier
Basic Concept
multiplicand multiplier
1101 (13) 1011 (11) 1101
product of 2 4-bit numbers is an 8-bit number

1101
Partial products
0000
1101
10001111
(143)
22
Multiplication
  • Example

23
Multiplication
  • Example

24
Multiplication
  • Example

25
Multiplication
  • Example

26
Multiplication
  • Example

27
Multiplication
  • Example
  • M x N-bit multiplication
  • Produce NM-bit partial products
  • Sum these to produce MN-bit product

28
General Form
  • Multiplicand Y (yM-1, yM-2, , y1, y0)
  • Multiplier X (xN-1, xN-2, , x1, x0)
  • Product

29
16X16 Mult. Dot Diagram
  • Each dot represents a bit

30
Combinational Multiplier
Partial Product Accumulation
A0 B0 A0 B0
A1 B1 A1 B0 A0 B1
A2 B2 A2 B0 A1 B1 A0 B2
A3 B3 A3 B0 A2 B1 A1 B2 A0 B3
A3 B1 A2 B2 A1 B3
A3 B3
A3 B2 A2 B3
S6
S4
S7
S5
S3
S2
S1
S0
31
Partial Product Accumulation
Note use of parallel carry-outs to form higher
order sums 12 Adders, if full adders, this is 6
gates each 72 gates 16 gates form the partial
products total 88 gates!
32
Another Representation of the Circuit
Building block full adder and
4 x 4 array of building blocks
33
Parallel Binary Multiplier
34
One-Bit Multiplier Cell
X
35
2-bit by 2-bit Binary Multiplier
With J multiplier bits and K multiplicand bits
need JxK AND gates and (J-1) K-bit adders to
produce JK bits
36
4-bit by 3-bit Binary Multiplier
With J3 (A0A1A2) multiplier bits, K4 (B3B2B1B0)
multiplicand bits need 12 (JxK) AND gates, 2
(J-1) 4-bit(K-bit) adders to produce 7(JK) bits
37
Thank You!
Write a Comment
User Comments (0)
About PowerShow.com