This document is about IFN503: Assessment 2 – Deliverable 1 which includes questions related to ASCII representation, IEEE 754 floating point format, and Little Man Computer program.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
IFN503: Assessment 2 – Deliverable 1 Due Date: 11:59pm Sunday 8thSeptember 2019 (Week 7) Submission: Online via Blackboard Weighting: 20%; Total Marks: 60; Individual Instructions on how to present your answers. 1.Include the actual question and give your answers below each part of the question, including all the working for each part of the question. 2.Any plagiarism on the actual question would be ignored. Question 1(10 marks) What is theASCII representationfor the character string+15.3682in the following number systems: (a)Hexadecimal : 31 35 2e 33 36 38 32 (b)Binary 00110001 00110101 00101110 00110011 00110110 00111000 00110010 (c)Octal 611 522 706 315 434 062 (d)Decimal 13850746402781234 Question 2(20 marks) (a)Represent thefixed point decimal number+ 78.875 inIEEE 754 floating point format. Express your final answer inhexadecimalshowing all the working. (10 marks) Sign bit 31- 0 78 in binary is 0100 1110 .875 in binary is .875 x 2 = 1.750 .750 x 2 = 1.500 .500 x 2 = 1.000 S0 .875 in binary = 111 Complete number is 0100 1110.111 This gives exponent = 127 + 6 = 133 Mantissa = 00111011100000000000000 Together in hex: 0x429dc000 (b)Consider ahypothetical floating point formatwhich is similar to IEEE 754 format except that it uses 6 bit excess-31 notation for the exponent, and 25 bits 1
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
for the mantissa in a 32 bit machine. Represent the decimal number from part (a) in hexadecimal using this hypothetical format. Show all the working. (4 Marks) Sign bit = 0 78 in binary = 0100 1110 .875 in binary 111 Exponent is 31 + 6 = 37 = 100101 Mantissa = 0011101110000000000000000 Final representation 01001010011101110000000000000000 In hex 0x94EE 0000 (c)The hexadecimal number C37DD000 represents a decimal number using IEE 754 floating point format. Whatdecimal numberdoes this represent? Show all the working. (6 Marks) Binary representation : 11000011011111011101000000000000 Sign bit = 1 means negative number Exponent = 10000110 = 134 then actual value = 143-127 = 7 Mantissa = 11111011101000000000000 After denormalization and shifting by exponent value 1111110.11101000000000000 In decimal 253.8125 Question 3(30 marks) Write aLittle Man Computerprogram usingsymbolic addressingthat shows as output thesumsof theoddvalues from 1 to 15 (inclusive). The output will consist of thesumsof the following sequence: 1, 1+ 3, 1 + 3 + 5, 1 + 3 + 5 + 7,….., 1 + 3 + 5 …… + 15. Use the concepts of the Little Man Computer introduced inLecture 4only. No input is required to do this task. What do you notice about the output results that are produced by this sequence? Note: 1.Use the executableLMC2.exe(provided with Tutorial 4) to test your program. 2.You will need to submit your LMC program, pasted below the other answers for this question. 2
LDA 09 OUT STO 11 LDA 12 ADD 10 STO 12 ADD 11 BR 01 HLT# then terminate the program DAT 001# 09 initial value DAT 002# 10 constant for series DAT 000# 11 num1 previous result DAT 001# 12 num2 next num to add ----------------------------------------------- 3