MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply TodayWrite a function which takes a scalar single-precision floating-point number as input and returns its binary representation as a string of zeros and ones.

**Example 1**

x = single( **1.25** );

y = **'00111111101000000000000000000000'**

**Example 2**

x = realmax('single'); % = **3.4028235e+038**

y = **'01111111011111111111111111111111'**

19 correct solutions
18 incorrect solutions

Last solution submitted on Dec 01, 2013

1 Comment

Noah
on 18 Jul 2012

Cody doesn't have a license for the Fixed_Point_Toolbox? I'd expect Cody would be able to get a pretty sweet deal on it from The Mathworks.

1 Comment