Homework Assignment 8 Advanced Computer Architecture CS 350c Unique Number: 51160 Spring, 2016 Given: March 8, 2016 Due: March 24, 2016 This homework concerns improving your knowledge of combinational logic. 1. Of the 16 possible, what 2-input logical connectives (such as AND, OR) that are complete? That is, what 2-input connectives can be used to implement all of the other 15 connectives? 2. In terms of 2-input logical connectives, what is the equation (in C-language code) for a three-input majority circuit? Please write your answer as a C-language function. Thus, define the function like this: int three_bit_majority( int x, int y, int z ) { int x_and_y = x & y; ... return ( ans ); } where integers x, y, z, have as input either 0 or 1, and fill in the body. The rest of this homework are to be defined in terms of 2-input logical connectives, where each input is a single bit. 3. Write down the equation (in C-language code) for a 4-bit adder. Write a structure definition to return four bits, a carry bit, and an overflow bit. This definition should be implemented as a ripple-carry adder. 4. Write down the equation (in C-language code) for a 4-bit adder that has a carry-save implementation. Use the structure defined for problem 3 (just above) to return the result. 5. Write down the equation for a 4-bit multiplier that expected 4-bit signed numbers and produces a correct 8-bit signed answer. For problems 2 through 5, be sure to run your solutions through the C-compiler and exhaustively test them. 6. Write down the equation for a 32-bit adder (any implementation will do). Can you test it?