CENG 241 Digital Design 1 Lecture 5 - PowerPoint PPT Presentation

About This Presentation
Title:

CENG 241 Digital Design 1 Lecture 5

Description:

Title: CS116-Computer Architecture Subject: Chapter 1:Computer Abstraction & Technology Author: Originally:Tod Amon / Modifed & Augmented:M.Malaty – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 23
Provided by: Originall2
Category:

less

Transcript and Presenter's Notes

Title: CENG 241 Digital Design 1 Lecture 5


1
CENG 241Digital Design 1Lecture 5
  • Amirali Baniasadi
  • amirali_at_ece.uvic.ca

2
This Lecture
  • HW 2 Due Friday June 13 th.

3
Three-input XOR Function
F A XOR B XOR C
Multiple input XOR is 1 only if the number of 1
variables is odd ODD function
4
ODD Function Implementation
5
Four-input XOR Function
F detects odd number of 1s, F detects even
number of 1s
6
Parity Generation and Checking
  • Parity bit extra bit to ensure correct
    transmission of data
  • Parity bit is included in the message to make the
    number of 1s either odd (odd parity) or even
    (even parity).
  • We can use XOR to see if the number of 1s is
    odd.
  • We can use XOR-invert to see if the number of 1s
    is even.
  • We include the XOR output in the message
  • Later at receiver we check the number of 1 bits
    to see if the transmission is correct.

7
Parity Generation and Checking circuits
8
Combinational Logic
Combinational Logic Output only depends on
current input Sequential LogicOutput depends on
current and previous inputs
9
Design Procedure
  • 1.The number of inputs and outputs?
  • 2.Derive the truth table
  • 3.Obtain the Boolean Function
  • 4.Draw the logic diagram, verify correctness

10
Design Procedure example
  • Binary Adder-Subtractor
  • Basic block is a half adder.
  • Half Adder Design
  • 1.needs 2 inputs 2 outputs
  • 2. Truth Table
  • x y C S
  • 0 0 0 0
  • 0 1 0 1
  • 1 0 0 1
  • 1 1 1 0
  • 3. Sxyxy Cxy

11
Half Adder circuit
12
Full Adder?
  • Truth Table
  • x y z C S
  • 0 0 0 0 0
  • 0 0 1 0 1
  • 0 1 0 0 1
  • 0 1 1 1 0
  • 1 0 0 0 1
  • 1 0 1 1 0
  • 1 1 0 1 0
  • 1 1 1 1 1

13
Full Adder Map
14
Full Adder Circuit
15
Full Adder Circuit
Half adder ?
16
4-bit Adder Circuit
But this is slow...
17
Binary Subtractor
  • Subtraction is done by using complements
  • As 2s Complement A1
  • A-B A B1

18
4-bit adder subtractor
19
Binary Multiplier
  • Binary mult. Is done the same way of decimal
    mult.
  • Multiplicand is multiplied by each bit of the
    multiplier.

20
Binary Multiplier
21
4-bit by 3-bit Binary Multiplier
B3 B2 B1 B0
A2 A1 A0 A0B3
A0B2 A0B1 A0B0 A1B3 A1B2 A1B1
A1B0 A2B3 A2B2 A2B1 A2B0
22
HW 2
  • Homework 2 Chapter 4 problems 5, 6(a), 9, 20(a)
  • Due Friday June 13th.
Write a Comment
User Comments (0)
About PowerShow.com