title: Python - bitshifting with 32bit version vs 64bit versions
body: <h2>Context</h2>
  <p>I have an application which outputs data into files and which verifies the data via checksums. While everything was working correctly with <code>Python 3.8.0 32bit</code>, I observed different checksums being generated with <code>Python 3.8.4 64bit</code>. Following the data that was being dumped incorrectly, I believe I've narrowed it down to this code (as the files that fail are the only ones using this function).</p>
  <p>The purpose of this method is to take a single value, 0-65535, and split it into two separate &quot;bytes&quot;.</p>
  <pre class="lang-py prettyprint-override"><code>def integer_to_lsb_msb(value: int) -&gt; List[int]:
  
      if value &lt; 0 or value &gt; 65535:
          raise ValueError(&quot;The input value does not qualify as a '16bit' value&quot;, value)
  
      lsb = value &amp; 0xFF
      msb = ((value &gt;&gt; 8) &amp; 0xFF)
      return [lsb, msb]
  </code></pre>
  <h3>Question</h3>
  <p>Does python not process code in an architecture independent way? If not, is there a way to check the architecture and run custom code to ensure identical output with both 32bit and 64bit versions?</p>