Category Archives: Computer Science

Algorithms in Python: Binary exponentiation

The typical approach to exponentiation of a base b by an exponent n is to repeatedly multiply the base by itself, as such: This is easy to compute for small values but quickly chokes with very large values. A faster … Continue reading

Posted in Computer Science, Programming, tech | Tagged , , , , , , | Leave a comment

Algorithms in Python: Binary Operations

Today I’d like to demonstrate a simple implementation of Kenneth Rosen‘s binary addition and multiplication algorithms as outlined in "Discrete Mathematics and its Applications". Both algorithms are very simple and work the same way we’ve all learned to do decimal … Continue reading

Posted in Computer Science, Programming, tech | Tagged , , , , | Leave a comment