<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>ColdFire/68K Microcontrollers and ProcessorsのトピックWhen is CCR.V bit set?</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198830#M9021</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;General question not related to specific device.&amp;nbsp; I understand it is an arithmetic overflow in simplest terms.&amp;nbsp; Wondering the specific instances where it is set. Tried to research on net and found two answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; XOR of a carry into the sign bit and a carry out of the sign bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For addition, set when positive num + positive num = positive num and when negative num + negative num = positive num.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For subtraction, set when negative num - positive num = negative num and when positive num - negative num = negative num.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have a good description?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jul 2009 05:14:52 GMT</pubDate>
    <dc:creator>tupdegrove</dc:creator>
    <dc:date>2009-07-14T05:14:52Z</dc:date>
    <item>
      <title>When is CCR.V bit set?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198830#M9021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;General question not related to specific device.&amp;nbsp; I understand it is an arithmetic overflow in simplest terms.&amp;nbsp; Wondering the specific instances where it is set. Tried to research on net and found two answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&amp;nbsp; XOR of a carry into the sign bit and a carry out of the sign bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For addition, set when positive num + positive num = positive num and when negative num + negative num = positive num.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For subtraction, set when negative num - positive num = negative num and when positive num - negative num = negative num.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyone have a good description?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 05:14:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198830#M9021</guid>
      <dc:creator>tupdegrove</dc:creator>
      <dc:date>2009-07-14T05:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: When is CCR.V bit set?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198831#M9022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In&amp;nbsp;real world, when we&amp;nbsp;add positive number to positive number we expect positive answer. Sudden negative result is oVerflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding negative to negative&amp;nbsp;shouold give negative result. Positive means oVerflow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And subtractiion is similar to addition, except the sign of one of addend.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HC12 CPU manual gives such V bit equation for ADD&lt;/P&gt;&lt;FONT face="Arial"&gt;V = D15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;•&lt;/FONT&gt; &lt;FONT face="Arial"&gt;M15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;• /&lt;/FONT&gt;&lt;FONT face="Arial"&gt;R15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;+ /&lt;/FONT&gt;&lt;FONT face="Arial"&gt;D15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;• /&lt;/FONT&gt;&lt;FONT face="Arial"&gt;M15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;•&lt;/FONT&gt; &lt;FONT face="Arial"&gt;R15&lt;/FONT&gt;&lt;FONT face="Arial"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT face="Arial"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Arial"&gt;where D15 sign bit of one addend, M15&amp;nbsp;- sign bit of second addend, R15 - sign bit of result.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Arial"&gt;So adding V is set when either 1) both arguments are&amp;nbsp;positive and result negrative, or 2) when both args negative and result positive.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Arial"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for SUB&lt;/P&gt;&lt;FONT face="Arial"&gt;&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT face="Arial"&gt;V = D15 &lt;FONT face="Times New Roman"&gt;• /&lt;/FONT&gt;&lt;FONT face="Arial"&gt;M15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;• /&lt;/FONT&gt;&lt;FONT face="Arial"&gt;R15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;+ /&lt;/FONT&gt;&lt;FONT face="Arial"&gt;D15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;•&lt;/FONT&gt; &lt;FONT face="Arial"&gt;M15&lt;/FONT&gt; &lt;FONT face="Times New Roman"&gt;•&lt;/FONT&gt; &lt;FONT face="Arial"&gt;R15&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT face="Arial"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2009 11:32:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198831#M9022</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2009-07-14T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: When is CCR.V bit set?</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198832#M9023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank-you for the details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just for the record, I meant to say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. For addition, set when positive num + positive num = negative num...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 08:54:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/When-is-CCR-V-bit-set/m-p/198832#M9023</guid>
      <dc:creator>tupdegrove</dc:creator>
      <dc:date>2009-07-15T08:54:00Z</dc:date>
    </item>
  </channel>
</rss>

