<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Umwandlung von 4 Bytes in 1 Float ?]]></title><description><![CDATA[<p>Guten Morgen C/C++ Forum,</p>
<p>ich habe ein Anliegen zur Umwandlung von bytes in float, d.h. ich bekomme von einem Messtechnik-Computer (per socket connection, client/server) Messdaten im nachfolgenden byte Format (so steht es in der zugehörigen Beschreibung),</p>
<p>1. byte =&gt; FRAC-L<br />
2. byte =&gt; FRAC-M<br />
3. byte =&gt; FRAC-H<br />
4. byte =&gt; SGN+EXP</p>
<p>da meine Programmierung &quot;sozusagen Datenmüll erzeugt&quot; ist mein Anliegen, ob mir jemand eine korrekte Umwandlung <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> der vorstehenden 4 bytes in 1 float oder eine entsprechend vorhandene Funktion <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> empfehlen kann,</p>
<p>mit freundlichen Grüssen</p>
<p>ZZR-1100</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/212335/umwandlung-von-4-bytes-in-1-float</link><generator>RSS for Node</generator><lastBuildDate>Wed, 14 Oct 2026 17:24:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/212335.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 05 May 2008 05:55:18 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Umwandlung von 4 Bytes in 1 Float ? on Mon, 05 May 2008 05:55:18 GMT]]></title><description><![CDATA[<p>Guten Morgen C/C++ Forum,</p>
<p>ich habe ein Anliegen zur Umwandlung von bytes in float, d.h. ich bekomme von einem Messtechnik-Computer (per socket connection, client/server) Messdaten im nachfolgenden byte Format (so steht es in der zugehörigen Beschreibung),</p>
<p>1. byte =&gt; FRAC-L<br />
2. byte =&gt; FRAC-M<br />
3. byte =&gt; FRAC-H<br />
4. byte =&gt; SGN+EXP</p>
<p>da meine Programmierung &quot;sozusagen Datenmüll erzeugt&quot; ist mein Anliegen, ob mir jemand eine korrekte Umwandlung <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> der vorstehenden 4 bytes in 1 float oder eine entsprechend vorhandene Funktion <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> empfehlen kann,</p>
<p>mit freundlichen Grüssen</p>
<p>ZZR-1100</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1503395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1503395</guid><dc:creator><![CDATA[ZZR-1100]]></dc:creator><pubDate>Mon, 05 May 2008 05:55:18 GMT</pubDate></item><item><title><![CDATA[Reply to Umwandlung von 4 Bytes in 1 Float ? on Mon, 05 May 2008 06:05:02 GMT]]></title><description><![CDATA[<p>hm... wär da nicht ein union angebracht?</p>
<pre><code class="language-cpp">union Test
{
   float zahl; //sizeof(float) == 4
   char bytes[4];
};

Test t;
t.bytes[0] = FRAC-L;
t.bytes[1] = FRAC-M;
t.bytes[2] = FRAC-H;
t.bytes[3] = SGN+EXP;

std::cout &lt;&lt; t.zahl &lt;&lt; std::endl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1503398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1503398</guid><dc:creator><![CDATA[zwutz]]></dc:creator><pubDate>Mon, 05 May 2008 06:05:02 GMT</pubDate></item><item><title><![CDATA[Reply to Umwandlung von 4 Bytes in 1 Float ? on Mon, 05 May 2008 06:37:50 GMT]]></title><description><![CDATA[<p>Vielen Dank &quot;zwutz&quot; !!!</p>
<p>Es klappt wirklich hervorragend, ich muss halt nur die bytes nicht von 1..4 einlesen sondern von 4..1, aber das hängt ja mit der byte-Reihenfolge zusammen daweil der Messtechnik-Computer ein Microsoft-PC ist und der Auswerte-Computer eine Unix-Workststion, wie dem auch sei es klappt wirklich hervorragend,</p>
<p>nochmals Vielen Dank</p>
<p>ZZR-1100</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1503412</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1503412</guid><dc:creator><![CDATA[ZZR-1100]]></dc:creator><pubDate>Mon, 05 May 2008 06:37:50 GMT</pubDate></item></channel></rss>