<?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[Untere und obere 8bit eines Short?]]></title><description><![CDATA[<p>Kurze Frage: Wie komme ich an die unteren und oberen 8bit eines 16bit Short Integers? Vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/152852/untere-und-obere-8bit-eines-short</link><generator>RSS for Node</generator><lastBuildDate>Mon, 07 Sep 2026 03:38:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/152852.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 10 Jul 2006 14:13:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Untere und obere 8bit eines Short? on Mon, 10 Jul 2006 14:13:35 GMT]]></title><description><![CDATA[<p>Kurze Frage: Wie komme ich an die unteren und oberen 8bit eines 16bit Short Integers? Vielen Dank!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1095168</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1095168</guid><dc:creator><![CDATA[JPSelter]]></dc:creator><pubDate>Mon, 10 Jul 2006 14:13:35 GMT</pubDate></item><item><title><![CDATA[Reply to Untere und obere 8bit eines Short? on Mon, 10 Jul 2006 14:21:02 GMT]]></title><description><![CDATA[<p>JPSelter schrieb:</p>
<blockquote>
<p>Kurze Frage: Wie komme ich an die unteren und oberen 8bit eines 16bit Short Integers? Vielen Dank!</p>
</blockquote>
<p>Entweder über inline assembly und al und ah.<br />
Oder die einfachere Methode:</p>
<p>short s = irgendeinwert;</p>
<p>char untere_8bit = (char)(s ^ 0xff00) ;<br />
char obere_8bit = (char)s &gt;&gt; 8;</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1095176</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1095176</guid><dc:creator><![CDATA[kennerdsfsdfds]]></dc:creator><pubDate>Mon, 10 Jul 2006 14:21:02 GMT</pubDate></item><item><title><![CDATA[Reply to Untere und obere 8bit eines Short? on Mon, 10 Jul 2006 17:35:21 GMT]]></title><description><![CDATA[<p>kennerdsfsdfds schrieb:</p>
<blockquote>
<p>JPSelter schrieb:</p>
<blockquote>
<p>Kurze Frage: Wie komme ich an die unteren und oberen 8bit eines 16bit Short Integers? Vielen Dank!</p>
</blockquote>
<p>Entweder über inline assembly und al und ah.<br />
Oder die einfachere Methode:</p>
<p>short s = irgendeinwert;</p>
<p>char untere_8bit = (char)(s ^ 0xff00) ;<br />
char obere_8bit = (char)s &gt;&gt; 8;</p>
</blockquote>
<p>char untere_8bit = (char)(s ^ 0xff00) ; Fehler!<br />
Die unteren 8 Bit holt man sich so:<br />
char untere_8bit = (char)(s &amp; 0xff) ;<br />
mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1095321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1095321</guid><dc:creator><![CDATA[haase]]></dc:creator><pubDate>Mon, 10 Jul 2006 17:35:21 GMT</pubDate></item><item><title><![CDATA[Reply to Untere und obere 8bit eines Short? on Mon, 10 Jul 2006 18:16:02 GMT]]></title><description><![CDATA[<p>haase schrieb:</p>
<blockquote>
<p>Die unteren 8 Bit holt man sich so:<br />
char untere_8bit = (char)(s &amp; 0xff) ;</p>
</blockquote>
<p>das geht noch einfacher:</p>
<pre><code>char untere_8bit = (char)s;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1095353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1095353</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Mon, 10 Jul 2006 18:16:02 GMT</pubDate></item></channel></rss>