StormNalinHW13

pdf

School

Northeastern University *

*We aren’t endorsed by this school

Course

2322

Subject

Computer Science

Date

Feb 20, 2024

Type

pdf

Pages

5

Uploaded by BailiffOxideAntelope36

Report
Nalin Storm EECE 2322 Digital Design & Computer Organization Professor Kimani Homework 13 19 April, 2023 Question 1: The output provided by Hwk_Main_datapath_MSD.sv provided the expected output for the decoded instruction jal that replaced beq. The encoded instruction successfully jumped the PC register -40 registers to the very first instruction, add. I verified my implementation was successful because the PC register that followed the jal instruction was 0x00010000 which is the very first instruction, exactly 40 registers previous. Below are a summary of the changes made to the file:
Question 2a: a. Express the following base 10 number in IEEE 754 single-precision floating-point format. Express your answer in hexadecimal . (show your steps) −13.5625 Step 1. Convert 13 to binary: 13/2 = 6, Remainder = 1 6/2 = 3, Remainder = 0 3/2 = 1, Remainder = 1 1/2 = 0, Remainder = 1 13 in decimal is 1101 in binary Step 2. Convert 0.5625 to binary 0.5625 * 2 = 1.125 1.125 1 0.125 * 2 = 0.25 0.25 0 0.25 * 2 = 0.5 0.5 0 0.5 * 2 = 1 1 1 0.5625 in binary is 1001
13.5625 1101.1001 Step 3. Convert to base 2 scientific notation 1101.1001 1.1011001 * 10 3 Step 4. Determine sign bit & exponent bits Sign bit is 1 (negative) Exponent bits are 127 + 3 = 130 130 converted to binary is 10000010 Step 5. Combine all three parts (sign, exponent, mantissa) to form binary number Sign bit = 1 Exponent bits = 10000010 Mantissa = 1011001 -13.5625 in binary is 1 10000010 10110010000000000000000 Step 6. Convert to hexadecimal using the table below 1100 0001 0101 1001 0000 0000 0000 0000 C 1 5 9 0 0 0 0 Hexadecimal Binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
-13.5625 represented in IEEE 754 single-precision floating-point format in hexadecimal is: 0xC1590000 Question 2b: b. Express the following IEEE 754 single - precision floating - point number into decimal (base 10). (show your steps) 0x4375A000 Step 1. Convert to binary using table in previous question 0x4375A000 in binary is 0 10000110 11101011010000000000000 Step 2. Split up the bits Sign bit = 0 Exponent bits = 10000110 Mantissa = 1110101101 Step 3. Determine exponent 10000110 is 2 1 + 2 2 + 2 7 = 134 – 127 = 7 Exponent is 7 Step 4. Determine scientific notation number 1.1110101101 * 10 7 11110101.101 Step 5. Convert whole number binary to decimal 2 0 + 2 2 + 2 4 + 2 5 + 2 6 + 2 7 = 245
Step 6. Convert decimal number binary to decimal Working backwards: Binary Result Multiplication 1 1.0 0.5 * 2 0 0.5 0.25 * 2 1 1.25 0.625 * 2 0.625 Step 7. Combine decimal numbers Since sign bit = 0 from step 2, 0x4375A000 converted into decimal (base 10) is 245.625