CSC 103: How Computers Work

Homework 1: Binary Numbers and Boolean Algebra

Due: Monday March 28 at the beginning of class

Question 1

Perform the following additions in binary:
	 10110 + 10011 =  
	 
	11110 + 10110 = 

Write the following binary number in base 10 (decimal), showing your work clearly (work like a computer):

11001010

Question 2

Convert the following base 10 (decimal) number to binary, again working like a computer and showing each step. Any systematic method is fine for this part (counting divisions of 2 and starting from the left, tabulating remainders and starting from the right, etc).

71

Question 3

Convert the following base 3 (ternary) number into a base 8 (octal), showing your work. Bonus if you find a way to convert directly without going through base 10!

20121

Question 4

If you have not done so already, complete Lab 1 (turn in a printout of the half-adder as part of this homework). Now we'll complete the full-adder. A half-adder basically stands in isolation because it can't take the carry from a previous column as input in a multi-bit addition. The full-adder therefore incorporates not only the two bits of a number to sum, but also the carry-out bit from the previous column as a carry-in input bit, called ci.

First, complete the truth table below for the full-adder.

ci x1 x2 co s
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1

After that, create a new Logisim project (or make a copy of the half-adder and modify that) and create a circuit for the full-adder. Make sure to test all combinations of inputs. Include a printout of your circuit with your homework.

Question 5

What is the truth table for this boolean function?

f = ( a and b ) or ( a and not c ) or ( not b )
The result should be a truth table where the first columns contain all possible inputs, and the last column should contain the resulting output (0 or 1, corresponding to false or true) for each combination. Again make sure to show your work.

To hand in

Turn in a paper copy of your solutions at the beginning of class on Monday. If you are unable to print some part of the assignment, you may turn it in on Moodle.


Credit: based on assignments by Dominique Thiebaut and Jerod Weinman