Description
Objective: Learn some core concepts closely relating to assembly language.
Total 15 points
-
(1 point) Why 2’s complement is necessary to perform subtraction in hardware level? Explain your answer.
-
(1 point) Assume that you have three 8-bit storages (called registers) named A, B, and C to store binary numbers. Register A contains 10100111 and register B contains 11110110. Compute A+B and store the value in C register. What is the content of register, C after the computation? Show the computation in details with carries.
-
(2 points) Assume that you have 8-bit storage to store the numbers. Calculate the following operations using two’s complement method (in binary). (Assuming 8-bit registers are used)
70 – 10 – 42
[Hint: Perform the computation in binary system, then convert it back to decimal]
-
(1 point) What is the hexadecimal representation of the following binary numbers? Show the conversion in details.
1101001101111101110011110001
-
(2 points) What is the 16-bit hexadecimal representation of the following signed decimal integer? Show all the steps of conversion in details.
-90
-
(2 points) What is the decimal representation of each of the following signed binary numbers?
-
-
(1 point) 11110101
-
(1 point) 00110101
-
-
(2 point) Evaluate the following Hexadecimal expression. All the numbers are hexadecimal. Show all the steps of computation and the carries.
ABC + CDE – 51E
-
(1 point) Is it possible to store -19 in a 5-bit storage. If your answer is YES, then show how to store –19 in 5-bit register. If your Answer is No, Explain why.
-
(1 point) What is the smallest decimal value you can represent, using a 145-bit signed integer? You can write the number in exponent form.
-
(2 points) What is the Boolean expression for P?
x |
y |
z |
P |
0 |
0 |
0 |
0 |
0 |
0 |
1 |
1 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
1 |
1 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
1 |
1 |
0 |
0 |
1 |
1 |
1 |
0 |
Design a circuit that can produce output P for inputs x, y, and z as expressed in the table above.
Note:
-
Make sure to justify all answers – show all work.
-
The Assignment must be submitted electronically through ICollege.
-
You can do your work in a text editor (Microsoft word, open office, etc.)
-
Or you can do it in a piece of paper, then scan or take a picture of the paper.
-
Upload the answers in a pdf file to iCollege in the respective assignment dropbox.
-
All work must be neat and legible. Illegible work will receive no credit. This includes work where the print contrast or darkness are too faint.
-
The work that you turn in must be your own — copying is not allowed for any assignments.
-
Using another student’s work as your own, allowing another student to use your work as their own, is academic misconduct.