Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using Python Suppose that you are a computer engineer implementing hardware to decode an 8-bit minifloat floating point number. Every floating point number in this
Using Python
Suppose that you are a computer engineer implementing hardware to decode an 8-bit "minifloat" floating point number. Every floating point number in this system is normalized, such that a floating point number a is written as a = (-1) X (1.M) x 2". s represents the sign bit, which is bit 0 of the 8- bit floating point number. E represents the exponent field, which is bits 1-4 of the floating point number. E is written in excess 8 encoding, which means that converting bits 1-4 into a base-10 integer and subtracting 8 gives the exponent. M represents the significand, which are bits 5-7 in the floating point number. For example, if you have (1,1,1,1,0,0,0,0] as your input minifloat number, your exponent is converting 1110 to base 10 and minus 8, which is 14 - 8 = 6. Your significant should be 1.000. Therefore you should output (-1)1 x (1.000) x26= -64. Write a short program to decode a list of 8-bit "minifloat" numbers, stored in minifloats, into a list of Python floats. Each "minifloat" is a numpy array of 1's and O's. Store each decoded float in outputs, a list of floating point numbers. The setup code defines the following variable(s) and/or function(s): Name minifloats Type Description list of minifloat floating point numbers list Your code snippet should define the following variables: Name Type list Description list of decoded floating point numbers outputsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started