Showmedo is financed by a subscription club, membership of which grants access to all of our 160+ specially produced videos. These include our 50 video introduction to Python programming, and our recently completed Open-office migration collection.

(Showmedo is undergoing major changes. To
report any problems viewing the videos please
email us and include
browser and OS specifics. Cheers - Kyran.)

This video begins looking at available bit operations and what they do.

NOT, OR, AND, XOR, and TEST are examined, allowing us to set, reset, complement, and check individual bits, among a few other things. Next episode will examine operations related to bit-shifting and have our first experiment of the tutorial.

Got any questions?

Video statistics:

Thank-yous, questions and comments

If this video tutorial was helpful please take some time to say thank-you to the authors for their hard work. Feel free to ask questions.
Let the author know why their video tutorial was useful - what are
you learning about? Did the video tutorial save you time? Would you like to see more?

Sorry about the confusion; the sentence got pretty long so the meaning might've gotten lost. Some examples to clarify and elaborate:

0 xor 1 has an odd number (i.e. 1) of inputs that are ones, so the output is 1.

If you have a 3-way XOR gate, the value of xor(0,1,1) is 0, since it has an even number (i.e. 2) of ones, but xor(0,0,1) is 1, since it has an odd number (i.e. 1) of ones.

If you had a 10-way XOR gate, xor(1,0,0,1,1,0,1,0,0,1) is 1, since it has an odd number (i.e. 5) of ones.

In a different context, suppose that you have an array of dwords where every value is duplicated an even number of times except one value, which is duplicated an odd number of times. If you XOR all of the values together, the final result will be the value that's duplicated an odd number of times; this follows from that XOR is commutative (a XOR b = b XOR a) and nilpotent (a XOR a = 0).

I think we'll mostly just be using XOR for stuff like zeroing registers and negating floating-point numbers, but hopefully this helps give a bit better insight into XOR. :)

Educating the Open-source Community With Showmedo

Although as important as the software it supports, education
and documentation are relatively neglected in the Open-source
world. Coders love to code, and explaining how best to use or
improve the software tends to be deferred or even
sidelined.

At Showmedo we believe the community can play a vital role
here and also say thanks for the tools and software that make
our lives easier. If you have a piece of software you love or a
programming langugage you are enthusiastic about, why not make
a screencast showing others how to use it? All the stuff you
wish you'd been told, the tips, tricks, insights that would
have saved you time and frustration.

Screencasting is easier than you think, and we're happy to
help you. You can
emailus for
advice or just use some of the how-to screencasts on the site.
This
screencasting learning-pathis a
good place to start.

CLUB SHOWMEDO

Are you learning Python? To keep the site running clean and ad-free we've started Club ShowMeDo. The club will allow you access to some special videos we're making to pass on programming skills we consider important to the development and enjoyment of Free Open Source Software (FOSS).

The focus at the moment is on developing with the Python programming language, one of the backbones of the FOSS movement with a huge number of included and third-party libraries.

THANKS

Feedback

Showmedo's development is fairly rapid and bugs will inevitably creep in. If you have any problems please drop us a line using the contact address below. Likewise, any suggestions for improvements to the site are gratefully received.