<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>About &amp;quot;long&amp;quot; format</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22358/about-long-format</link><description>Hi.
I have a question.
I tested that nrf52 get datas from sensors.
But the code was not moved well,
I made code to test bit shift.
Please see my code. 
 #include &amp;lt;stdio.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;

long a = 0;
a = (1&amp;lt; 24) |</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 May 2017 04:36:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22358/about-long-format" /><item><title>RE: About "long" format</title><link>https://devzone.nordicsemi.com/thread/87889?ContentTypeID=1</link><pubDate>Fri, 26 May 2017 04:36:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:029f304a-ff1c-464c-8128-b0348ed61d29</guid><dc:creator>Sagisawa Yukichi</dc:creator><description>&lt;p&gt;Thank you!
I made a mistake:(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: About "long" format</title><link>https://devzone.nordicsemi.com/thread/87888?ContentTypeID=1</link><pubDate>Fri, 26 May 2017 04:23:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba6c386f-9899-4c68-9dc6-c95f1ed67779</guid><dc:creator>RK</dc:creator><description>&lt;pre&gt;&lt;code&gt;(1&amp;lt; 24)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;that&amp;#39;s not a shift, it&amp;#39;s a comparison which will return true which is usually &amp;#39;1&amp;#39;, so your first two expressions are equivalent to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;1 + 2 &amp;lt;&amp;lt; 16 + 4 &amp;lt;&amp;lt; 8
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;== 1 + 131,072 + 1,024 = 132,105&lt;/p&gt;
&lt;p&gt;the last expression just evaluates to &amp;#39;1&amp;#39;, the other two bits are zero&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>