Digital Design Tutorial Sheet 6 September 27, 2023 Digital Design 1 Problem - 1 a) b) c) Consider the Adder - Subtractor block shown below. Can this block be used for both signed and unsigned numbers? If so, how would the interpretation of the inputs and outputs change? What is the difference between carry and overflow? What do each of them signify in the context of addition. Give the values of S3, S2, S1, S0, C and V for the following input values and also write the decimal equivalent of both the inputs and outputs considering unsigned inputs. 1) A = 1100, B = 1001 and M = 0 2) A = 0101, B = 1010 and M = 1 September 27, 2023 Digital Design 2 Answer (a) Yes, the block can be used for operating on both signed and unsigned numbers. Unsigned : The inputs are fed in their normal binary representation, with M = 0 performing unsigned addition and M = 1 performing unsigned subtraction. The result of the addition can simply be interpreted in binary format. For subtraction, if A>B, the result is in binary representation, whereas if A<B, the result represents the 2’s complement of B-A. The range of output for n bit block : [0, 2n - 1] Signed : Both the inputs and outputs should be interpreted in the 2’s complement format. The range of output for n bit block : [-2(n-1), 2(n-1) - 1] (b) Overflow is said to occur for an n bit block of the result cannot be represented in n bits. Unsigned Addition : The overflow is simply the carry bit. Signed Addition : The carry bit does not represent an overflow here, the V bit does. Overflow can only occur if both the numbers we are adding are positive, or both are negative. September 27, 2023 Digital Design 3 Solution 1. A = 12, B = 5, {C,S} = 21 S3 = 0, S2 = 1, S1 = 0, S0 = 1, C = 1, V = 1 2. A = 5, B = 10, S = 11 (unsigned) = -5 (signed) S3 = 1, S2 = 0, S1 = 1, S0 = 1, C = 0, V = 1 September 27, 2023 Digital Design 4 Problem - 4 a) Give the truth table of full subtractor? b) Design the same using full adder? September 27, 2023 Digital Design 5 Solution September 27, 2023 Digital Design 6 Solution A S B FA C September 27, 2023 Co Digital Design D B 7 Problem 5 Q1. Design a combinational circuit that subtracts a constant ‘2’ from a 3-bit number using 3 number of Full adder and additional required gates. September 27, 2023 Digital Design 8 Solution September 27, 2023 Digital Design 9 Problem 6 (a) Derive the Boolean expressions for T1 to T4. Evaluate the outputs F1 and F2 as a function of four inputs, A, B, C and D September 27, 2023 Digital Design 10 Problem 6 (b) Make the truth table for inputs A,B,C & D and outputs T1 to T4, F1 & F2. (c) Plot the Boolean output functions obtained in (b) on K-maps (d) Show that the simplified Boolean expressions are equivalent to the ones obtained in (a). September 27, 2023 Digital Design 11 Solution September 27, 2023 Digital Design 12 Solution 4 September 27, 2023 Digital Design 13 Solution 4 September 27, 2023 Digital Design 14 Alternate way of covering September 27, 2023 Digital Design 15 Thank you September 27, 2023 Digital Design 16