[go: up one dir, main page]

Academia.eduAcademia.edu
1(a). Q = AB + AB A B AB AB 0 0 0 1 0 1 0 1 0 1 1 0 1 0 1 1 Q 1 1 1 1 1(b). Q = A(B + C) + A(B + C) A B C B + C A(B + C) 0 0 0 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 B+C 1 1 1 0 1 1 1 0 1(c). Q = A(B + C) + A + BC A B C B + C A(B + C) 0 0 0 0 0 1 1 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 0 BC 0 1 0 0 0 1 0 0 2. Q = ABC + ABC + ABC A B C ABC ABC 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 ABC 0 0 0 0 0 1 0 0 Circuit: 1 Q 0 0 0 1 0 1 1 0 A(B + C) 0 0 0 0 1 1 1 0 Q 0 1 1 1 1 1 1 1 Q 0 1 1 1 1 1 1 0 Q A B 3(a) Cin = 0, G = Cout a1 a0 b1 b0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 C G 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 3(b) Cin = 1, P = Cout &G 2 a1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 a0 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1 b1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 b0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 G 0 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 Cout [Cin = 1] 0 0 0 1 0 0 1 1 0 1 1 1 1 1 1 1 General formula is: Cout = G + P Cin 3 P 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0
Computer Systems and Architecture Exercise Sheet 1: Logic Combinatorial logic 1. Construct the truth tables for (a) Q = AB + AB (b) Q = A(B + C) + A(B + C) (c) Q = A(B + C) + A + BC 2. Construct a logic circuit with 3 inputs and 1 output with output 1 if and only if exactly some 2 of the inputs are 1. 3. Given a binary addition of 2-bit integers a1 , a0 and b1 , b0 with carry-in Cin , write down the truth table for the carry-out signal Cout when (a) Cin is 0 (the carry is said to have been generated by the two-digit group, and is called G0,1 ) (b) Cin is 1 and a carry out is produced but would not have been generated if Cin had not been 1 (the carry is said to have been propagated by the two-digit group, and is called P0,1 ) Construct logic circuits for both G0,1 and P0,1 (separately), and hence construct a single logic circuit that produces Cout = G0,1 + P0,1 Cin from a1 , a0 and b1 , b0 and Cin . This is called a look-ahead feed-forward carry. Add this circuit into the 4-bit ripple carry adder circuit you have seen drawn with klogic in class, so that every group of 2 bits either generates a carry with this circuit OR in the usual way. You should see a doubling in the speed of transmission of carries. Do you? Try setting the output carry from the 4-bit adder to G0,1,2,3 = G2,3 +G0,1 P2,3 + Cin P0,1 P2,3 . Is it right? Is it even faster? Explain. 1