<?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[Frage nach bedeutung]]></title><description><![CDATA[<p>Hallo, ich komme nicht weiter, und durch googlen finde ich nicht raus, was hier passiert.</p>
<p>Schonmal danke für Antworten</p>
<p>a[j][26] = (a[j][26]&amp;0xfff)&lt;&lt;4;<br />
a[j][26] = (a[j][26] | ((b[j][i]&amp;0x1)&lt;&lt;1));</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/310454/frage-nach-bedeutung</link><generator>RSS for Node</generator><lastBuildDate>Tue, 04 Aug 2026 19:22:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/310454.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Nov 2012 08:01:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage nach bedeutung on Mon, 12 Nov 2012 08:01:07 GMT]]></title><description><![CDATA[<p>Hallo, ich komme nicht weiter, und durch googlen finde ich nicht raus, was hier passiert.</p>
<p>Schonmal danke für Antworten</p>
<p>a[j][26] = (a[j][26]&amp;0xfff)&lt;&lt;4;<br />
a[j][26] = (a[j][26] | ((b[j][i]&amp;0x1)&lt;&lt;1));</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270013</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270013</guid><dc:creator><![CDATA[Bahaoth]]></dc:creator><pubDate>Mon, 12 Nov 2012 08:01:07 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Mon, 12 Nov 2012 08:23:35 GMT]]></title><description><![CDATA[<p>&amp; ist das binäre UND<br />
| ist das binäre ODER<br />
&lt;&lt; ist die binäre schieben nach links</p>
<blockquote>
<p>&gt; ist die binäre schieben nach rechts</p>
</blockquote>
<p>1. Zeile:<br />
Zuerst wird a mit 0xfff verundet. D.h nur die untersten 12 Bit bleiben so wie sie sind, der Rest wird zu 0.<br />
Dann wird der Wert um 4 Bit nach links geschoben. D.h. Bit 12 wird zu Bit 16, ...., Bit 0 wird zu Bit 4, die unteren 4 Bits werden mit 0 aufgefüllt.</p>
<p>2. Zeile:<br />
Von b wird nur das unterste Bit genommen und um eine Stelle nach links geschoben.<br />
Das Ganze wird dann mit a verodert.</p>
<p>In diesem Fall wird also das Bit 0 von b zu Bit 1 von a.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270017</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Mon, 12 Nov 2012 08:23:35 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Mon, 12 Nov 2012 09:17:54 GMT]]></title><description><![CDATA[<p>Vielen Dank für die schnelle Antwort, Zeile 2 habe ich (das verordern) leider noch nicht verstanden ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270038</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270038</guid><dc:creator><![CDATA[Bahaoth]]></dc:creator><pubDate>Mon, 12 Nov 2012 09:17:54 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Mon, 12 Nov 2012 09:20:07 GMT]]></title><description><![CDATA[<p>Bahaoth schrieb:</p>
<blockquote>
<p>Zeile 2 habe ich (das verordern) leider noch nicht verstanden ...</p>
</blockquote>
<p>Wenn in b[j][i] Bit 0 gesetzt ist, wird in a[j][26] Bit 1 gesetzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270039</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270039</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Mon, 12 Nov 2012 09:20:07 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Mon, 12 Nov 2012 09:23:54 GMT]]></title><description><![CDATA[<p>Ah klaro O.o<br />
danke ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270041</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270041</guid><dc:creator><![CDATA[Bahaoth]]></dc:creator><pubDate>Mon, 12 Nov 2012 09:23:54 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Tue, 13 Nov 2012 08:00:51 GMT]]></title><description><![CDATA[<p>Nun eine weitere Frage zu diesem Thema.<br />
Nun habe ich im Folgenden</p>
<p>( a[j][26] &gt;&gt; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /> &amp; 0x000000ff)<br />
Bedeutet dies, das 8 Nullen von links angeschoben werden?<br />
Sprich ich hätte in a stehen<br />
11100111010000011 dann würde dies zu<br />
0000000011100111010000011 werden, was für die Zahl nicht von Bedeutung währe, aber vll. für meine I2C übermittlung.<br />
dieses würde dann mit 0x000000ff verglichen werden. Macht es da einen unterschied ob es 0xff oder 0x000000ff ist?</p>
<p>Weiterhin habe ich später im Code ein j&gt;&gt;2 stehen.<br />
j ist eine Laufvariable, was macht das für einen Sinn?</p>
<p>Vielen Dank schonmal für Antworten</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270347</guid><dc:creator><![CDATA[Bahaoth]]></dc:creator><pubDate>Tue, 13 Nov 2012 08:00:51 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Tue, 13 Nov 2012 08:05:50 GMT]]></title><description><![CDATA[<p>Bahaoth schrieb:</p>
<blockquote>
<p>Nun eine weitere Frage zu diesem Thema.<br />
Nun habe ich im Folgenden</p>
<p>( a[j][26] &gt;&gt; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /> &amp; 0x000000ff)<br />
Bedeutet dies, das 8 Nullen von links angeschoben werden?</p>
</blockquote>
<p>Nicht ganz. Es bedeutet, dass 8 Bits rechts rausgeschoben werden. Von links wird dann mit Nullen aufgefüllt.</p>
<p>Aus 11100111010000011 wird 00000000111001110. Dann wird noch alles bis auf die letzten 8 Bit ausmaskiert, damit erhältst du 00000000011001110.</p>
<p>Bahaoth schrieb:</p>
<blockquote>
<p>Macht es da einen unterschied ob es 0xff oder 0x000000ff ist?</p>
</blockquote>
<p>Nein.</p>
<p>Bahaoth schrieb:</p>
<blockquote>
<p>Weiterhin habe ich später im Code ein j&gt;&gt;2 stehen.<br />
j ist eine Laufvariable, was macht das für einen Sinn?</p>
</blockquote>
<p>Das kann man an diesem winzigen Fragment allein nicht erkennen. Aber j&gt;&gt;2 ist dasselbe wie j/4.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270349</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Tue, 13 Nov 2012 08:05:50 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Tue, 13 Nov 2012 08:17:45 GMT]]></title><description><![CDATA[<p>Bahaoth schrieb:</p>
<blockquote>
<p>( a[j][26] &gt;&gt; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /> &amp; 0x000000ff)<br />
Bedeutet dies, das 8 Nullen von links angeschoben werden?</p>
</blockquote>
<p>Das kann man so genau nicht sagen.<br />
Wenn a ein unsifgned Type ist, werden 0 eingeschoben.<br />
Wenn a ein signed Typ ist, hängt es vom Compiler ab ob er eine 0 oder eine Kopie des Vorzeichenbits einschiebt.<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/26a0.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--warning"
      title=":warning:"
      alt="⚠"
    /> Das gilt für das rechts schieben.</p>
<p>Beim links schieben wird eine 0 eingeschoben.</p>
<p>Bei deinem Beispiel ist da aber egal, da danach ja eh nur die untersten 8 Bit betrachtet werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270353</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270353</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Tue, 13 Nov 2012 08:17:45 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Tue, 13 Nov 2012 09:42:08 GMT]]></title><description><![CDATA[<p>das mit den vordersten 8 löschen wäre absolut bescheuert, da die in dem Programm welches ich habe gerade erst hinein geschrieben wurden....</p>
<p>a[j][i]= 3700</p>
<p>a[j][i] = (a[j][i]&amp;0xfff)&lt;&lt;4;<br />
a[j][i] = (a[j][i] | ((b[j][i]&amp;0x1)&lt;&lt;1)); // b enthällt immer True oder Flase<br />
a[j][i] = (a[j][i] | (c[j][i]&amp;0x1)); // c enthält immer True oder False</p>
<p>//111001110100 &amp; 0xfff = 111001110100<br />
// &lt;&lt;4 = 1110011101000000<br />
// ((b[j][i]&amp;0x1)&lt;&lt;1)) = | (1 &amp; 1)&lt;&lt;1 = 10<br />
// |10 = 1110011101000010<br />
// (c[j][i]&amp;0x1)) = (1 &amp; 1) = 1<br />
// | 1 = 1110011101000011</p>
<p><a href="http://Out.I2C.CO" rel="nofollow">Out.I2C.CO</a>[j][cha_efm] = (unsigned char) (a[j][i] &amp; 0x000000ff);<br />
cha_efm++;<br />
<a href="http://Out.I2C.CO" rel="nofollow">Out.I2C.CO</a>[j][cha_efm] = (unsigned char) ( (a[j][i] &gt;&gt; <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f60e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--smiling_face_with_sunglasses"
      title="8)"
      alt="😎"
    /> &amp; 0x000000ff);<br />
cha_efm++;</p>
<p>pEfm01-&gt;WriteBlock( ((j&gt;&gt;2)<em>(sizeof(uI2COut)/4)) ,(unsigned char</em>)&amp;Out.Lng[j&gt;&gt;2],(sizeof(uI2COut)/4) ,true);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270381</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270381</guid><dc:creator><![CDATA[Bahaoth]]></dc:creator><pubDate>Tue, 13 Nov 2012 09:42:08 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Tue, 13 Nov 2012 10:18:48 GMT]]></title><description><![CDATA[<p>Bahaoth schrieb:</p>
<blockquote>
<p>das mit den vordersten 8 löschen wäre absolut bescheuert, da die in dem Programm welches ich habe gerade erst hinein geschrieben wurden....</p>
</blockquote>
<p>Die unteren 8 Bits werden zwei Zeilen vorher verarbeitet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270396</guid><dc:creator><![CDATA[MFK]]></dc:creator><pubDate>Tue, 13 Nov 2012 10:18:48 GMT</pubDate></item><item><title><![CDATA[Reply to Frage nach bedeutung on Tue, 13 Nov 2012 10:24:37 GMT]]></title><description><![CDATA[<p>.... Oh man ich glaub ich brauch ne Pause wenn ich sowas nicht mehr sehe...<br />
Danke ......</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2270399</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2270399</guid><dc:creator><![CDATA[Bahaoth]]></dc:creator><pubDate>Tue, 13 Nov 2012 10:24:37 GMT</pubDate></item></channel></rss>