How to get uint8_t data of uint32_t : <p>I'm working with a microcontroller where the sensor I'm trying to interface sends uint8_t data. The issue is I can read the pin with a uint32_t function.</p>

<p>So I guess I can read the pin with the uint32_t, but I have to "extract" it. But I'm getting nonsense... </p>

<pre><code>uint32_t number = 429496729;

uint8_t x1 = (number &gt;&gt; (8*0)) &amp; 0xff;
uint8_t x2 = (number &gt;&gt; (8*1)) &amp; 0xff;
uint8_t x3 = (number &gt;&gt; (8*2)) &amp; 0xff;
uint8_t x4 = (number &gt;&gt; (8*3)) &amp; 0xff;
</code></pre>

<p>printing x3 for instance gives me "™". Same with x1. Whats going on here?</p>
