Docsity

Problem Set 5 | Computer Organization | COMP 411, Assignments of Computer Architecture and Organization

Toggle sidebar
bg1
Comp 411 โ€“ Spring 2007 - 1 - Problem Set #5
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL
Comp 411 Computer Organization
Spring 2007
Problem Set #5
Issued Thursday, 2/22/07; Due Thursday, 3/08/07
Homework Information: Some of the problems are probably too time consuming to be done the
night before the due date, so plan accordingly. Late homework will not be accepted. Feel free to
get help from others, but the work you hand in should be your own.
Problem 1. Mux Madness
During a particularly boring Comp 411 lecture about the universality of NAND and NOR gates,
Chris suddenly realizes that multiplexers are also universal. At the close of lecture he awakes and
jots the following diagram on the back of his lecture notes:
Help explain Chrisโ€™ insight.
a) Give binary values for I0, I1, I2, and I3 which implement the following functions on the
two inputs A and B: AND(A,B), OR(A,B), XOR(A,B), NAND(A,B), and NOR(A,B).
b) Can every 2-input Boolean function be implemented using Chrisโ€™ structure? Explain why
or why not.
The next day, in an effort to impress his TA, Chris attends office hours and explains his
discovery. He decides to make his point by constructing several standard gates using his
structure. Not to be out done, the TA claims that he could build each 2-input gate using only 2
multiplexers.
c) Show how to implement an inverter, as well AND, OR, XOR, NAND, and NOR using
no more than 2-multiplexers to construct each one.
Problem 2. โ€œGo Forth and Multiplyโ€
a) Design logic to perform the multiplication of two, 2-bit unsigned integers producing a 4-
bit result (Hint: write a truth table for each output bit). Draw a gate-level-circuit diagram.
b) Assume that the 2-bit multiplier that you designed in part a) is represented as the
following function block:
๎˜
๎˜‚
๎˜ƒ
๎˜‚
๎˜„
๎˜‚
๎˜
๎˜‚
๎˜ƒ
๎˜‚
๎˜„
๎˜‚
๎˜
๎˜‚
๎˜ƒ
๎˜‚
๎˜„
๎˜‚
๎˜…
๎˜‚
๎˜†
๎˜‚
๎˜‡
๎˜‚
๎˜ˆ
๎˜ˆ
๎˜ˆ
๎˜ˆ
pf2

Partial preview of the text

Download Problem Set 5 | Computer Organization | COMP 411 and more Assignments Computer Architecture and Organization in PDF only on Docsity!

Comp 411 โ€“ Spring 2007 - 1 - Problem Set #

The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL

Comp 411 Computer Organization Spring 2007

Problem Set # Issued Thursday, 2/22/07; Due Thursday, 3/08/

Homework Information : Some of the problems are probably too time consuming to be done the night before the due date, so plan accordingly. Late homework will not be accepted. Feel free to get help from others, but the work you hand in should be your own.

Problem 1. Mux Madness

During a particularly boring Comp 411 lecture about the universality of NAND and NOR gates, Chris suddenly realizes that multiplexers are also universal. At the close of lecture he awakes and jots the following diagram on the back of his lecture notes:

Help explain Chrisโ€™ insight. a) Give binary values for I 0 , I 1 , I 2 , and I 3 which implement the following functions on the two inputs A and B: AND(A,B), OR(A,B), XOR(A,B), NAND(A,B), and NOR(A,B). b) Can every 2-input Boolean function be implemented using Chrisโ€™ structure? Explain why or why not.

The next day, in an effort to impress his TA, Chris attends office hours and explains his discovery. He decides to make his point by constructing several standard gates using his structure. Not to be out done, the TA claims that he could build each 2-input gate using only 2 multiplexers. c) Show how to implement an inverter, as well AND, OR, XOR, NAND, and NOR using no more than 2-multiplexers to construct each one.

Problem 2. โ€œGo Forth and Multiplyโ€ a) Design logic to perform the multiplication of two, 2-bit unsigned integers producing a 4- bit result (Hint: write a truth table for each output bit). Draw a gate-level-circuit diagram. b) Assume that the 2-bit multiplier that you designed in part a) is represented as the following function block:

Comp 411 โ€“ Spring 2007 - 2 - Problem Set #

Use this function block and single-bit full-adders to build a 4-bit multiplier (a multiplier that takes 2, 4-bit inputs and generates an 8-bit result).

c) Design logic to compute the square of a 2-bit unsigned integer. How does this circuit compare to the one you designed in part a)?

Mult

A 1 A 0 B 1 B 0

P 3 P 2 P 1 P 0