CS231 (Spring 06) Review Session - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

CS231 (Spring 06) Review Session

Description:

Now we're using for both arithmetic addition and the logical OR operation. ... Since you are only implementing letters A-J, you may assume that the remaining ... – PowerPoint PPT presentation

Number of Views:22
Avg rating:3.0/5.0
Slides: 40
Provided by: Xia91
Learn more at: http://www.cs.uiuc.edu
Category:

less

Transcript and Presenter's Notes

Title: CS231 (Spring 06) Review Session


1
CS231 (Spring 06)Review Session
  • Sangkyum Kim
  • Feb 17, 2006

2
Outline
  • Addition
  • Multiplication
  • Subtraction
  • MP Example

3
A Complete ALU Circuit
4
Binary addition by hand
5
Adding two bits (half adder)
0 0 0 0 1 1 1 0 1 1 1 10
C XY S X Y X Y X ? Y
6
Adding three bits
0 0 0 00 0 0 0 01 0 1 0 01 0
1 1 10 1 0 0 01 1 0 1 10 1 1
0 10 1 1 1 11
(These are the same functions from the decoder
and mux examples.)
7
Full adder equations
S ?m(1,2,4,7) X Y Cin X Y Cin X
Y Cin X Y Cin X (Y Cin Y Cin) X
(Y Cin Y Cin) X (Y ? Cin) X (Y ?
Cin) X ? Y ? Cin Cout ?m(3,5,6,7) X Y
Cin X Y Cin X Y Cin X Y Cin (X Y X
Y) Cin XY(Cin Cin) (X ? Y) Cin XY
8
Full adder circuit
S X ? Y ? Cin Cout (X ? Y) Cin XY
9
A 4-bit adder
10
An example of 4-bit addition
A1011 (eleven), B1110 (fourteen)
Woohoo! The final answer is 11001 (twenty-five).
11
Hierarchical adder design
12
Some other Issues
  • Gate Delays
  • Ripple Carry Adder
  • Carry Lookahead Adder

13
Quiz 8.4
For unsigned addition
Based on the 4-bit ripple adder figure. Addition
would be overflow if and only if _____
  • CO 1
  • (A3 B3 1) Or (A3 ? B3 1 C3 1)

14
Outline
  • Addition
  • Multiplication
  • Subtraction
  • MP Example

15
A 2x2 binary multiplier
16
Outline
  • Addition
  • Multiplication
  • Subtraction
  • MP Example

17
Converting signed numbers to decimal
  • Convert 110101 to decimal, assuming this is a
    number in
  • (a) signed magnitude format
  • (b) 1s complement
  • (c) 2s complement

18
Comparing the signed number systems
19
A twos complement subtraction circuit
  • A B A B 1

20
An adder-subtractor circuit
21
Some other Issues
  • Signed Overflow
  • Sign Extension
  • Going from 4-bit to 8-bit numbers
  • 0101 (5) ? 0000 0101 (5)
  • 1100 (-4) ? 1111 1100 (-4)

22
Examples from the past Exams
23
Examples from the past Exams
24
Examples from the past Exams
25
Examples from the past Exams
26
Examples from the past Exams
27
Examples from the past Exams
28
Outline
  • Addition
  • Multiplication
  • Subtraction
  • MP Example

29
MP Example - Problem
  • Input

The input to your circuit will be the low 4
bits of the ASCII value for the character being
displayed. These values are shown as N3-N0 in the
truth table below. Since you are only
implementing letters A-J, you may assume that the
remaining six 4-bit patterns will never be used,
and so are don't care situations.
Character ASCII N3 N2 N1 N0
A 65 0 0 0 1
B 66 0 0 1 0

J 74 1 0 1 0
30
MP Example - Problem
  • Output

Your circuit will produce seven outputs, one for
each of the seven line segments. We'll name the
outputs T, U, V, W, X, Y, Z, as illustrated right.
A B C D E F G H
I J
31
MP Example Truth Table
32
MP Example K-Maps
33
MP Example K-Map Simplification
34
MP Example K-Map Simplification
35
MP Example Two Level Implementation
36
MP Example NAND Implementation
37
MP Example Decoder Implementation
38
MP Example Multiplexer Implementation
39
THANK YOU!
Write a Comment
User Comments (0)
About PowerShow.com