Bicycle Adds Reliability With Second Chain

Ignoring the International Cycling Union‘s mostly arbitrary rules for what a bicycle is “supposed” to look like (at least if you want to race), there are actually reasons that the bicycling world has standardized around a few common parts and designs. Especially regarding the drivetrain, almost all bikes use a chain, a freewheel, and a derailleur if there are gears to shift because these parts are cheap, reliable, and easy to repair. But if you’re off grid in a place like Africa, even the most reliable bikes won’t quite cut it. That’s why a group called World Bicycle Relief designed and built the Buffalo bicycle, and the latest adds a second gear with a unique freewheel.

Bicycling YouTuber [Berm Peak] takes us through the design of this bike in his latest video which is also linked below. The original Buffalo bicycle was extremely rugged and durable, with a rear rack designed to carry up to 200 pounds and everything on the bike able to be repaired with little more than an adjustable wrench. The new freewheel adds a second gear to the bike which makes it easier to use it in hilly terrain, but rather than add a complicated and hard-to-repair derailleur the freewheel adds a second chain instead, and the rider can shift between the two gears by pedaling backwards slightly and then re-engaging the pedals.

Of course a few compromises had to be made here. While the new freewheel is nearly as rugged as the old one, it’s slightly more complex. However, they can be changed quite easily with simple tools and are small, affordable, and easy to ship as well. The bike also had to abandon the original coaster brake, but the new rim brakes are a style that are also easy to repair and also meant that the bike got a wheel upgrade as well. Bicycles like these are incredibly important in places where cars are rare or unaffordable, or where large infrastructure needed to support them is unreliable or nonexistent. We’ve seen other examples of bicycles like these being put to work in places like India as well.

Thanks to [Keith] for the tip!

Continue reading “Bicycle Adds Reliability With Second Chain”

Binary Math Tricks: Shifting To Divide By Ten Ain’t Easy

On small CPUs, you often don’t have a multiply or divide instruction. Of course, good programmers know that shifting right and left will multiply or divide by a power of two. But there are always cases where you need to use something that isn’t a power of two. Sometimes you can work it out for multiplication.

For example, multiplying by 10 is common when dealing with conversion between binary and decimal. But since 10n is equal to 8n+2n, you can express that as a bunch of left shift three times to multiply by eight, adding that value to your original value shifted left once to multiply by two.

But division is a different problem. n/10 does not equal n/8-n/2 or anything else simple like that. The other day a friend showed me a very convoluted snippet of code on Stack Overflow by user [realtime] that divides a number by 10 and wanted to know how it worked. It is pretty straightforward if you just stick with the math and I’ll show you what I mean in this post. Turns out the post referenced the venerable Hacker’s Delight book, which has a wealth of little tricks like this.

Continue reading “Binary Math Tricks: Shifting To Divide By Ten Ain’t Easy”