Tag Archives: programming

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

Algorithms in Python: Base Expansion

I felt it would be helpful to folks interested in Python and studying algorithms, to review some commonly studied algorithms in Computer Science by providing a small description and a Python implementation of each algorithm. This week, we’ll cover an … Continue reading

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