Chapter 1, con't., Combinatorial circuits - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Chapter 1, con't., Combinatorial circuits

Description:

Chapter 1, con't., Combinatorial circuits – PowerPoint PPT presentation

Number of Views:149
Avg rating:3.0/5.0
Slides: 18
Provided by: Larry435
Learn more at: http://www.cs.umd.edu
Category:

less

Transcript and Presenter's Notes

Title: Chapter 1, con't., Combinatorial circuits


1
Chapter 1, con't., Combinatorial circuits
2
Basic logic gates
  • An and gate
  • An or gate
  • A not gate

3
Discrete StructuresCMSC 250Lecture 6
4
Combining determining I/O relationship
  • From a circuit to a Boolean formula
  • p ? (q r)

5
Draw a circuit for
  • p, q r are inputs.
  • Simplify before building the circuit.

p q r output
1 1 1 1
1 1 0 1
1 0 1 0
1 0 0 1
0 1 1 0
0 1 0 0
0 0 1 0
0 0 0 0
6
Number conversions
  • Different number system bases are used when
    convenient
  • some commonly-used bases are 10 (decimal), 2
    (binary), 8 (octal), 16 (hexadecimal)
  • the base tells how many different numerals are
    used
  • the base also determines the value of each place
  • Conversions from anything to base 10
  • use the definition of the number system
  • Conversions from base 10 to anything
  • use repeated integer division

7
Addition of binary numbers
  • Carry if the number would be too large for the
    number system- if it is greater than 1

1001
10
1001
11
1011
10
1101
111
8
Discrete StructuresCMSC 250Lecture 7
9
Addition of octal and hexadecimal numbers
  • Carry if the number would be too large for the
    number system (larger than 7 or 15)

7238
128
2658
338
ABC16
1216
CDE16
ED16
10
Two's complement
  • To represent negative values in binary
  • Find the binary equivalent of the absolute value.
  • Pad on the left to completely fill the bits in
    the specified bit width
  • Switch all of the 1's to 0's and 0's to 1's.
  • Add 1 to the result.
  • Example find the 8-bit two's complement
    representation of -43
  • 4310 1010112
  • 001010112
  • 110101002
  • 110101012 -4310

11
Using a circuit for adding two bits
input
output
p q carry sum
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
  • Write as a logic expression
  • Translate to circuits

12
Half adder
  • p and q are binary values (1 bit each)
  • sum (p ? q) (p q)
  • carry (p q)

13
Full adder (for three bits)
  • p, q, and r are binary digits
  • p q r produces a sum value and a carry value

14
Parallel adders
  • Chain these half adders and full adders together
    for multi-bit addition
  • X1X2X3 Y1Y2Y3 CA1A2A3

X3
Y3
X2
Y2
X1
Y1
15
Discrete StructuresCMSC 250Lecture 8
16
Draw a circuit for
a b c output
0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 1
0 1 0 0 0 0 1 0 0
0 1 1 0 0 1 0 0 1
1 0 0 0 1 0 0 0 0
1 0 1 0 1 1 0 0 1
1 1 0 1 0 0 1 0 0
1 1 1 1 1 0 0 0 1
17
Topic not covered
  • Simplifying circuits- there are techniques which
    exist (which are complex).
Write a Comment
User Comments (0)
About PowerShow.com