Assignment 2
Assignment 2
Individual Work:
All assignments in this course are to be completed individually. Students are advised to read the
guidelines for avoiding plagiarism located on the course website.
Late Penalty:
Submission Instructions:
This assignment must be submitted on paper to the appropriate assignment drop box on the second
floor of math sciences. Please ensure that your name, your student ID number and your TA's name are
legibly written and clearly visible on the front of your submission.
Description:
This assignment provides an opportunity for you to gain additional experience with Boolean logic and
the techniques used to represent numbers within a computer. You are strongly discouraged from
simply using a calculator for the conversions. Similar questions will appear on the midterm and final
exams. Calculators are not permitted for any exams in this course.
1.0 (1 point each) Create truth tables for the following expressions:
1.1 (1 point each) Draw logic gates to represent the expressions from the previous question. Ensure
that you clearly label each input, and the output.
5610 = ?2
5610 = ?3
5610 = ?8
5610 = ?12
5610 = ?16
22110 = ?2
22110 = ?3
22110 = ?8
22110 = ?12
22110 = ?16
2.2 (1 point each) Convert the following numbers to the base indicated:
3312 = ?8
168 = ?2
202103 = ?9
3132334 = ?16
0xF2 = ?8
2.3 (2 points each) Convert 34.34 base 10 to binary, base 3, octal, and hexadecimal. Any fractions
that do not terminate should be truncated to 4 digits in the fractional part.
2.4 (2 points each) Convert 43.2 base 8 to binary, base 3, decimal and hexadecimal. Any fractions
that do not terminate should be truncated to 4 digits in the fractional part.
3.0 (0.5 points each) Consider a computer that represents numbers using a sequence of 23 bits.
4.1 (One point for each system) List all representations of the base 10 value 0 in signed magnitude,
one’s complement and two’s complement. Express your answer in 8 bits.
5.0 (One point for each sum, 0.5 for each type of overflow for each sum) Perform the following
additions on 8-bit numbers, generating an 8-bit result. Negative numbers are represented using two’s
complement. For each addition, clearly indicate if unsigned and/or signed overflow occurred or not.
Grading:
Half marks are possible on many questions if you show your work. Responses that only include the
answer cannot receive partial credit.