CSE370 Quiz 3 Solution


1. We require a circuit that can add 3 4-bit unsigned numbers. This could be done using 2 4-bit adders, however, we are going to do it this way:

(a) Write down the values of the carrys (Carrys[3:0]) and sums (Sums[3:0]) output by the top row of full adders for the case when X, Y, and Z are 5, 10, and 4, respectively. What is the final sum (S[3:0]) and carry-out (CO)?

Carrys = 0100, Sums = 1011
 [CO, S] = [0, A] + [0, B] + [0, 0, 0, 0, CI]
         = [0, Sums] + [Carrys, 0] + [0, 0, 0, 0, CI]
         = 01000 + 01011 + 00000
         = 10011
S = 0011, CO = 1

(b) Describe how the circuit above works and how it adds three numbers (in just a couple of sentences). Also explain how the carry-out is derived.

We can think of the addition as proceeding by first adding all the binary digits for each place value in parallel. We then shift the carrys over to the next place (shifting in a 0 at the low-order bit) and add to obtain the result. The carry-out could be one due to a carry-out from the high-order bit or as a result of the addition of sums and carrys.


Comments to: cse370-webmaster@cs.washington.edu (Last Update: )