ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
HW3 solutions
1. [15] Write a Boolean equation in sum-of-products canonical form for each of the
truth tables.
a) , , = 0,7 = () + ()
b) , = 0,2,4,5,7 = + + + +
()
c) , , , = 0,1,2,3,8,10,1
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
Homework 1 (100 points)
Due Wednesday September 14
The following homework problems are to be completed and turned in by the
end of class on the due date.
1. (20pts) The positional number systems we
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
HW5 solutions
The following homework problems are to be completed and turned in by the end of
class on the due date.
1.
[20 points] You are given four Boolean equations:
A(x, y, z) = M(0,2,5)
B(w,x,
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
Homework 7
Due Wednesday November 2
The following homework problems are to be completed and turned in by the end of
class on the due date.
1. [12] Implement the following functions using a 4:1 MUX:
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
HW1 solutions
1. (24pts) Convert each of the following numbers to the indicated base. Show all steps of
the conversion.
(a) E0CF.75 hexadecimal to decimal
E 0CF .7516 = 14 163 + 0 162 + 12 161
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
Homework 2 (100 points)
Due Wednesday September 21
The following homework problems are to be completed and turned in by the
end of class on the due date.
1. [3 pts] A majority gate produces a TRUE o
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
Homework 6
Due Wednesday, October 26
The following homework problems are to be completed and turned in by the end of
class on the due date.
1. [25] Let's examine the tradeoffs inherent in different
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
Homework 3 (100 points)
Due Wednesday September 27
The following homework problems are to be completed and turned in by the
end of class on the due date.
1. [15] Write a Boolean equation in sum-of-p
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
HW2 solutions
1. [3 pts] A majority gate produces a TRUE output if and only if more than half of its
inputs are TRUE. Complete a truth table and write Boolean equation for the three
input ma
ECE 0132: Digital Logic
Fall 2016
ELECTRICAL & COMPUTER
Homework 5
Due Wednesday October 19
The following homework problems are to be completed and turned in by the end of
class on the due date.
1. [20 points] You are given four Boolean equations:
A(x, y
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #5
Bag II: Array implementations
Today, well consider a Bag from the
implementers point of view
Last time, we discussed
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #21
Iterators and iterable
Consider the ADT List
The ADT represents what the client needs to know
to use the data structure
What data is stor
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #2
Designing classes I: Composition and inheritance
First: Questions from last time?
Designing classes: Why even bother?
The
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #6
Bag III: Linked implementations
Assignment 1 is out
If you did not get an email about this, check your
enrollment
Em
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #8
Stack I: ADT and uses
Today, well define a new ADT
Informally, what is a stack?
How does it work?
Stacks in the phy
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #11
Recursion II: Divide & conquer
Recursion thus far
The definition of recursion
The requirements for recursion to succeed
Applied recursion
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #12
Recursion III: Backtracking
Where did we get with recursion after
two lectures?
Defined recursion and presented requirements for it to
s
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #10
Recursion I
What is recursion?
Main idea: Define problem P in terms of
identical but smaller subproblems P'
Requirement
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #22
Queue ADT and implementations
What is a Queue?
Queue: A collection of objects with order, with FIFO (first
in, first out) operations
An
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #26
Binary Search Tree
Recap of trees
A few lectures ago, we introduced trees, our first non-linear
data structure
Terminology
Recursive defi
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #20
List II: Linked implementations and analysis
Let's look at how we can implement
List using linked nodes
Many parts are similar to Linked
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #14
Sorting II: Insertion sort and shellsort
Last time, in Sorting I
We discussed several sorting algorithms, but neither
seemed to be effi
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #27
Priority Queue
A few weeks ago, we talked about
queues
Queue
FIFO: First in, first out
Conceptually, always add at the back and remove
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #19
List I: ADT and array implementations
We've been talking recursion and
sorting for a while
Let's get back to designing data structures
We
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #13
Sorting I: Selection and bubble sorts
Sorting is a common problem that is
used in many areas
and so it's important to learn how to do
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #7
Algorithm analysis
Why should we even care about
algorithm analysis?
With so much variance between computers (and over
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #23
Tree I: ADT and representation in memory
Motivating non-linear data structures
Consider the data structures presented so far
Bag, Stack,
CS 445
Data Structures
William Garrison
bill@cs.pitt.edu
6311 Sennott Square
http:/cs.pitt.edu/~bill/445
Lecture #24
Tree II: Implementation of operations
Last time we introduced trees
The first non-linear data structure weve considered
Today, well look