Solution for Spring 2002 CSCI 255 Practice Homework 2

Problem 1

Add the following six-bit twos-complement number. Which, if any, of the additions result in an overflow?

100100 + 011010111110
010110 + 111111010101

Neither addition results in an overflow. Overflow never occurs when adding numbers of different signs.

Problem 2

Compute the following bit-wise logical operations on six-bit binary numbers.

011011 AND (101000 OR 000001)011011 AND 101001
001001
NOT(001100) AND NOT(011110)110011 AND 100001
100001

Problem 3

Complete a truth table to describe the logic circuit shown below.
Problem 3 logic circuit

inputoutput
ABCX
0000
0010
0100
0111
1000
1011
1100
1111

You can solve the problem in a couple of ways. First, you can just "plug in" all eight input combinations and see what they produce on the output. Or, you can determine what the function is algebraicly, in this case it simplifies to A C + B C, and then complete a truth table. Unless you are particularly good in Boolean algebra, you'll find the first method easier.