Problem 1: Convert the following numbers. (5mins) 1.1) Decimal 11 to 8-bit Binary: 00001011 1.2) Decimal -11 to 8-bit Binary: 11110101 1.3) Decimal 11.875 to Binary (as many bits as needed): 1011.111 1.4) Decimal -11.875 to IEEE 754 Single Precision (Show in hexadecimal): 0XC13E0000. Problem 2: Add these two numbers: A = 1.5 B = 1.5 2.1) Convert A to IEEE 754 Single precision // 0X 3FC0 0000 2.2) Use module fp_add(sum, exp_overflow, a_original,b_original) from the Notes 10 to add A and B; Show the output by using these lines: $display(" sum = %h\n",sum); $display(" sum = %d\n",sum); Sumbit the output and the testbench program(around 10 lines). 2.3) Decimal output for the second line is not 3,although 1.5 + 1.5 = 3.0. Why? => IEEE 754 Format so 40400000. Problem 3: To fix the 2.3 problem, Write a conversion module which will take input in IEEE 754 format and produce output in decimal format. dec_conversion(dec_sum,sum); 3.1) Show the output by using these lines: $display(" sum = %h\n",sum); $display("decimal sum = %d\n",dec_sum); => sum =40400000 => decimal sum = 4 ################################ //assume positive integer number... //sum is greater than 1; module dec_conversion(dec_sum,sum); output dec_sum; input [31:0] sum; reg [23:0]frac; reg [31:0] sum1; reg [7:0] exp,diff; reg sign; real dec_sum; always @(sum) begin exp = sum[30:23]; frac = {1'b1,sum[22:0]}; sign = sum[31]; diff = exp; if(diff >=127) // greater than 1; begin diff = diff -127; frac = frac >>(23-diff); end $display( "decimal sum = %d\n",frac); dec_sum = frac; end endmodule ######################################## 3.2) Sumbit the output and the code for the conversion module. 3.3) Name your program hw33.v and leave it on your account. Problem 4: Add these two numbers: A = 1.5; B = 1.5; Use module module fp_add_seq(sum, exp_overflow, ready,a_original,b_original,start,clk) from Notes 10 to add A and B; Use clk which has #1 delay. // #1; // clk =~clk; 4.1) Show the output by using this line: $display(" sum = %h\n",sum); =>sum = 40400000 4.2) Sumbit the testbench program( around 25 lines). ########TESTBENCH########### module test(); integer i,j; reg ck; wire ready; reg start; wire [31:0] sum; wire exp_overflow; reg [31:0] a_original,b_original; //fp_add fpadd(sum, exp_overflow, a_original,b_original); fp_add_seq fpadd(sum, exp_overflow, ready,a_original,b_original,start,ck); initial ck = 0; initial begin i = 0; for(i = 1; i<= 33 ;i = i+ 1) begin #1; i = i + 1; ck = ~ck; if(ready) $display("i = %d, sum = %h\n",i,sum); end end initial begin a_original = 31'h3fc00000; b_original = 31'h3fc00000; //3.0 = 40400000 start = 1; $monitor(" sum = %h\n",sum); end endmodule 4.3) True or False. =>False. =>It has 4 steps inside the program and each step takes only 1cycle. since A and B are 32 bits long, the sequential floating point adder ,fp_add_seq(sum, exp_overflow, ready,a_original,b_original,start,clk), will take at least 32 clks to produces right output. 4.4) Bonus Points Prblem( 7 pts): the sequential floating point adder, fp_add_seq(sum, exp_overflow, ready,a_original,b_original,start,clk), will produce right output after ( ) cycles. => 4 steps and each step takes 1cylce