Description
Goals:
• Get you familiar with data representation and simple logic operations for this course.
Requirements:
• Finish the questions section below. Points for each question included in parenthesis.
• Show your work to get full credit. ZERO point without steps for a result.
• Please start early. ZERO point for late submission. After the 11:59pm on the due day,
you can’t submit your assignment anymore.
• Check deliverables section below. ZERO point for hand-written or scanned homework,
since hand-written could be hard to recognize and harm your grade.
Deliverables:
• Save your solutions of questions as a pdf document. You can use this document as
worksheet.
• Name document as a “Firstname_Lastname.pdf”.
• Submit your “Firstname_Lastname.pdf” through the Canvas system. You do not need
to submit hard copies.
Rebuttal period:
• You will be given a period of 3 business days to read and respond to the comments
and grades of your homework or project assignment. The TA may use this opportunity
to address any concern and question you have. The TA also may ask for additional
information from you regarding your homework or project.
Questions:
1. (9 points) Convert the following unsigned base 2 numbers (binary) to base 16 numbers
(hexadecimal):
A. 0110 0001 1111
B. 1000 1111 1100
C. 0001 0110 0100 0101
2. (27 points) Convert the following binary numbers to base 10 numbers (decimal). Each time
if binary numbers are represented in:
a) Signed magnitude representation.
1) 1100 1010 =
2) 1111 0010 =
3) 1000 0111 =
b) One’s complement representation.
1) 1100 1010 =
2) 1111 0010 =
3) 1000 0111 =
c) Two’s complement representation.
1) 1100 1010 =
2) 1111 0010 =
3) 1000 0111 =
For example, question A, if 1100 1010 is a binary number represented in signed magnitude
representation, what is the decimal value? Also do it again if 1100 1010 is a binary number in
one’s complement representation and two’s complement representation. There are 9 separate
answers in total.
3. (36 points) Convert the following base 10 (decimal) values to binary numbers (8-bits). Each
binary result represented in:
a) Signed magnitude representation.
1) -100d =
2) -16d =
3) -21d =
4) -0d =
b) One’s complement representation.
1) -100d =
2) -16d =
3) -21d =
4) -0d =
c) Two’s complement representation.
1) -100d =
2) -16d =
3) -21d =
4) -0d =
(There are 12 separate answers in total.)
4. (4 points) What is the range of:
A. An unsigned 7-bit number?
B. A signed 7-bit number?
5. (12 points) Solve following bitwise operations (∧ = AND, ∨ = OR)
e.g. 0101 ∧ 0011 = 0001
1. 1000 ∧ 1110
2. 1000 ∨ 1110
3. (1000 ∧ 1110) ∨ (1001 ∧ 1110)
6. (9 points) Please demonstrate each step in the calculation of the arithmetic operation 25 –
65. (both 25 and 65 are signed decimal numbers)
7. (3 points) Mathematically the answer in Q6 is -40d. Please verify your answer in Q6 using a
conversion of 2’s and decimal numbers.