T103 - TM103 Tma Ksa Fa23

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Faculty of Computer Studies

Computer Organization and Architecture


T103/TM103

TMA

Fall 2022-2023

Cut-off Date: TBA Total Marks: 20


Content Mark
MARIE
∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙ 10
Digital
Representation
∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙ 10
Plagiarism Warning:
As per AOU rules and regulations, all students are required to submit their own TMA work
and avoid plagiarism. The AOU has implemented techniques for plagiarism detection. You
must provide all references in case you use and quote another person's work in your TMA.
You will be penalized for any act of plagiarism as per the AOU's rules and regulations.

Declaration of No Plagiarism by Student (to be signed and submitted by


student with TMA work):
I hereby declare that this submitted TMA work is a result of my own efforts and I have not
plagiarized any other person's work. I have provided all references of information that I
have used and quoted in my TMA work.

Name of Student:
Signature:
Date:
Problem 1: Working with MARIE (10 Marks)

a) Write MARIE code to perform the following pseudocode excerpt, with an


explanation of each instruction in your code beside it.

Input a value for x


if(x > y)
max= x
else
max=y
Output the value of max

b) Provide a screenshot of the simulation result (A screenshot of the MARIE


Simulator window after running the program, showing the value at the output
window).
Instructions:
- Use “ORG” instruction to start your program at an address equivalent to 1024 10.
- Use your last university ID number to input the new value of x.
For example, if your ID is 2315161678235, then you will use the number 5 as
the value of x (value of y will be used as assigned below)
- Do not forget to change the Input and output boxes to decimal!
- You should include the necessary labels and directives at the end of your
program:
X, Dec 0
Y, Dec 6
max, Dec 0

Problem 2: Working with Digital Representation (10 Marks)


Given the following normalized 14-bit format with an excess-16 bias, answer the
following questions:
1 1 0 0 1 1 1 1 0 0 0 1 0 0
1 1 0 0 0 1 1 0 0 0 1 0 0 0

a- Find the equivalent decimal values of both numbers


b- Add the above given numbers using floating-point arithmetic and show the
result in a normalized 14-bit format with an excess-16 bias.
c- Prove that your answer in part b is correct by checking its decimal equivalent
value with the sum of the equivalent decimal values of both numbers you
calculated in part a.
End of TMA

You might also like