<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mayank Chauhan on Medium]]></title>
        <description><![CDATA[Stories by Mayank Chauhan on Medium]]></description>
        <link>https://medium.com/@chauhanmayank.621?source=rss-2968b478754a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*jNdenbkZ9Uf32Kor.jpg</url>
            <title>Stories by Mayank Chauhan on Medium</title>
            <link>https://medium.com/@chauhanmayank.621?source=rss-2968b478754a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 13:18:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chauhanmayank.621/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Bit Manipulation in Python (All you need to know)]]></title>
            <link>https://medium.com/@chauhanmayank.621/bit-manipulation-in-python-all-you-need-to-know-492299128e09?source=rss-2968b478754a------2</link>
            <guid isPermaLink="false">https://medium.com/p/492299128e09</guid>
            <category><![CDATA[bit-manipulation]]></category>
            <category><![CDATA[problem-solving]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <dc:creator><![CDATA[Mayank Chauhan]]></dc:creator>
            <pubDate>Wed, 10 Jul 2019 21:28:07 GMT</pubDate>
            <atom:updated>2019-07-10T21:28:07.464Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JT1_0qUedbROkvpiVjcQVw.jpeg" /></figure><p><strong>Bit manipulation</strong> is the act of algorithmically <strong>manipulating bits </strong>include low-level device control, error detection ,data compression, encryption algorithms, and optimization.</p><pre><br><em>Bitwise Manipulation</em><br><em>1. Left Shift</em><br><em>        -Shift the bit to left by n , here n = 2</em><br><em>            ex- 1000110(70) &lt;&lt; 2 = 100011000(280)</em><br><em>            or ,1000(8) &lt;&lt; 2 = 100000 = 8 X (2 X 2) n time     multiplyby 2</em><br><em>            or ,1000(8) &lt;&lt; 1 = 10000 = 8 X (2) 1 time multiply by 2</em><br><em>            </em><br><em>2. Right Shift</em><br><em>        -Shift the bit to right by n , here n = 2</em><br><em>            ex- 1000110 &gt;&gt; 2 = 10001(17)</em><br><em>            or ,1000(8) &gt;&gt; 2 = 10(2) = 8 / (2 X 2) n time divide by 2 (floor value)</em><br><em>            or ,1000(8) &gt;&gt; 1 = 100(4) = 8 / (2) 1 time divide by 2    (floor value)</em></pre><pre><em>3. XOR operator (a ^ b) </em><br><em>        - 1 ^ 1 = 0</em><br><em>        - 1 ^ 0 = 1</em><br><em>        - 0 ^ 1 = 1</em><br><em>        - 0 ^ 0 = 0</em><br><em>        </em><br><em>4. 1&#39;s compliment (~a)</em></pre><pre><em>5. 2&#39;s compliment (~a+1) == (-a)</em><br><em>&quot;&quot;&quot;</em></pre><p>Here is the JupyterNotebook for more clear explanation or refer to Gist.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8765b2bda6566c1171c178fee03daa57/href">https://medium.com/media/8765b2bda6566c1171c178fee03daa57/href</a></iframe><p>All JupyterNotebooks with relevant topics.</p><p><a href="https://github.com/mayank6/JupyterNotebooks">https://github.com/mayank6/JupyterNotebooks</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=492299128e09" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>