Difference between revisions of "CSC270 Homework 3 2016"

From dftwiki3
Jump to: navigation, search
(Created page with "--~~~~ ---- <br /> =Problem 1= <br /> Below is a binary adder. We have seen it in class. <br /> 700px|center <br /> <br /> <br /> <br /> <br /> <br ...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 20:13, 9 February 2016 (EST)
 
--[[User:Thiebaut|D. Thiebaut]] ([[User talk:Thiebaut|talk]]) 20:13, 9 February 2016 (EST)
 
----
 
----
 +
<br />
 +
<bluebox>
 +
This assignment is due on Thursday 2/18/16, at 11:55 p.m.  You can work on this assignment individually or in a pair.  Submit your answer as a pdf, on Moodle.
 +
</bluebox>
 +
<br />
 +
<br />
 +
__NOTOC__
 
<br />
 
<br />
 
=Problem 1=
 
=Problem 1=
 
<br />
 
<br />
Below is a binary adder.  We have seen it in class.
+
Below is a 32-bit binary adder.  We have seen it in class.  It outputs ''a''+''b'', where ''a'' is represented by ''a''<sub>31</sub>...''a''<sub>0</sub>, and ''b'' by ''b''<sub>31</sub>...''b''<sub>0</sub>.
 
<br />
 
<br />
 
[[Image:BinaryAdder.png|700px|center]]
 
[[Image:BinaryAdder.png|700px|center]]
 
<br />
 
<br />
 +
;Question 1
 +
:Using this design as inspiration, design a 32-bit subtraction circuit, that will output ''a''-''b'', if ''a'' and ''b'' are the two integers whose bits are shown in the diagram. 
 +
 +
::''Hints'':  ''a''-''b'' is really ''a'' + the 2's complement of ''b''.
 
<br />
 
<br />
 +
;Question 2
 +
:Design a circuit that has 3 input sets: ''a'', a 32-bit signal, ''b'', another 32-bit signal, and ''x'', a 1-bit signal.  The circuit has 33 outputs.  When ''x'' is 0, the circuit outputs ''a''+''b''.  When ''x'' is 1, the circuit outputs ''a''-''b''.
 
<br />
 
<br />
 
<br />
 
<br />

Latest revision as of 20:30, 9 February 2016

--D. Thiebaut (talk) 20:13, 9 February 2016 (EST)



This assignment is due on Thursday 2/18/16, at 11:55 p.m. You can work on this assignment individually or in a pair. Submit your answer as a pdf, on Moodle.




Problem 1


Below is a 32-bit binary adder. We have seen it in class. It outputs a+b, where a is represented by a31...a0, and b by b31...b0.

BinaryAdder.png


Question 1
Using this design as inspiration, design a 32-bit subtraction circuit, that will output a-b, if a and b are the two integers whose bits are shown in the diagram.
Hints: a-b is really a + the 2's complement of b.


Question 2
Design a circuit that has 3 input sets: a, a 32-bit signal, b, another 32-bit signal, and x, a 1-bit signal. The circuit has 33 outputs. When x is 0, the circuit outputs a+b. When x is 1, the circuit outputs a-b.