Question: IN MATLAB. For converting from decimal to binary (or binary to decimal), only concern yourselves with numbers only to the left of the decimal or

IN MATLAB. For converting from decimal to binary (or binary to decimal), only concern yourselves with numbers only to the left of the decimal or numbers only to the right. For example, have code written to convert 17 to binary and 0.25 to binary but dont worry about converting 17.25 to binary. Both cases (numbers only to the left or only to the right of the decimal) need to be included in each code for parts 1 and 2. However, be sure to convert any type of number from decimal to IEEE-754 format. Utilize loops (for and while) and if-else constructs. Test your code for #1 on the following numbers: 9, 43, 107, 1003, 0.875 Test your code for #2 on the following numbers: 10001, 0.1011, 111001111, 0.1101101 Test your code for #3 on the following numbers: 36, 0.875, 120 Extra Credit: Write code to account for a repeating segment when converting from decimal to binary. Test your code on 0.68 and 0.4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!