Bone Up on Your Multiplication Skills

John Napier was a Scottish physicist, mathematician, and astronomer who usually gets the credit for inventing logarithms. But his contributions to simplifying mathematics and building shorthand solutions didn’t end there. In the course of performing the many calculations he needed to practice these subjects in the 1500s, Napier invented a kind of computing mechanism for multiplication. It’s a physical manifestation of an old system known as lattice multiplication or gelosia.

Lattice multiplication makes use of the multiplication table in order to multiply huge numbers together quickly and easily. It is thought to have originated in India and moved west into Europe. When the lattice method reached Italy, the Italians named it gelosia after the trellised window covering it resembled, which was commonly used to keep prying eyes away from one’s possessions and wife.

Continue reading “Bone Up on Your Multiplication Skills”

The Trouble With Intel’s Management Engine

Something is rotten in the state of Intel. Over the last decade or so, Intel has dedicated enormous efforts to the security of their microcontrollers. For Intel, this is the only logical thing to do; you really, really want to know if the firmware running on a device is the firmware you want to run on a device. Anything else, and the device is wide open to balaclava-wearing hackers.

Intel’s first efforts toward cryptographically signed firmware began in the early 2000s with embedded security subsystems using Trusted Platform Modules (TPM). These small crypto chips, along with the BIOS, form the root of trust for modern computers. If the TPM is secure, the rest of the computer can be secure, or so the theory goes.

The TPM model has been shown to be vulnerable to attack, though. Intel’s solution was to add another layer of security: the (Intel) Management Engine (ME). Extremely little is known about the ME, except for some of its capabilities. The ME has complete access to all of a computer’s memory, its network connections, and every peripheral connected to a computer. It runs when the computer is hibernating, and can intercept TCP/IP traffic. Own the ME and you own the computer.

There are no known vulnerabilities in the ME to exploit right now: we’re all locked out of the ME. But that is security through obscurity. Once the ME falls, everything with an Intel chip will fall. It is, by far, the scariest security threat today, and it’s one that’s made even worse by our own ignorance of how the ME works.

Continue reading “The Trouble With Intel’s Management Engine”

Drawn in by the Siren’s Song

When I say “siren” what do you think of? Ambulances? Air raids? Sigh. I was afraid you were going to say that. We’ve got work to do.

You see, the siren played an important role in physics and mathematics about 150 years ago. Through the first half of the 1900s, this fine apparatus was trivialized, used for its pure noise-making abilities. During the World Wars, the siren became associated with air raids and bomb shelters: a far cry from its romantic origins. In this article, we’re going to take the siren back for the Muses. I want you to see the siren in a new light: as a fundamental scientific experiment, a musical instrument, and in the end, as a great DIY project — this is Hackaday after all.

Continue reading “Drawn in by the Siren’s Song”

Misleading Tech: Kickstarter, Bomb Sights, and Medical Rejuvinators

Every generation thinks it has unique problems and, I suppose, sometimes it is true. My great-grandfather didn’t have to pick a cell phone plan. However, a lot of things you think are modern problems go back much further than you might think. Consider Kickstarter. Sure, there have been plenty of successful products on Kickstarter. There have also been some misleading duds. I don’t mean the stupid ones like the guy who wants to make a cake or potato salad. I mean the ones that are almost certainly vaporware like the induced dream headgear or the Bluetooth tag with no batteries.

Overpromising and underdelivering is hardly a new problem. In the 30’s The McGregor Rejuvenator promised to reverse aging with magnetism, radio waves, infrared and ultraviolet light. Presumably, this didn’t work. Sometimes products do work, but they don’t live up to their marketing hype. The Segway comes to mind. Despite the hype that it would revolutionize transportation, the scooter is now a vehicle for tourists and mall cops.

One of my favorite examples of an overhyped product comes from World War II: The Norden Bomb Sight. What makes the Norden especially interesting is that even today it has a reputation for being highly accurate. However, if you look into it, the Norden–although a marvel for its day–didn’t always live up to its press.

Continue reading “Misleading Tech: Kickstarter, Bomb Sights, and Medical Rejuvinators”

Sort Faster with FPGAs

Sorting. It’s a classic problem that’s been studied for decades, and it’s a great first step towards “thinking algorithmically.” Over the years, a handful of sorting algorithms have emerged, each characterizable by it’s asymptotic order, a measure of how much longer an algorithm takes as the problem size gets bigger. While all sorting algorithms take longer to complete the more elements that must be sorted, some are slower than others.

For a sorter like bubble sort, the time grows quadradically longer for a linear increase in the number of inputs; it’s of order O(N²).With a faster sorter like merge-sort, which is O(N*log(N)), the time required grows far less quickly as the problem size gets bigger. Since sorting is a bit old-hat among many folks here, and since O(N*log(N)) seems to be the generally-accepted baseline for top speed with a single core, I thought I’d pop the question: can we go faster?

In short — yes, we can! In fact, I’ll claim that we can sort in linear time, i.e a running time of O(N). There’s a catch, though: to achieve linear time, we’ll need to build some custom hardware to help us out. In this post, I’ll unfold the problem of sorting in parallel, and then I”ll take us through a linear-time solution that we can synthesize at home on an FPGA.

Need to cut to the chase? Check out the full solution implemented in SystemVerilog on GitHub. I’ve wrapped it inside an SPI communication layer so that we can play with it using an everyday microcontroller.

To understand how it works, join us as we embark on an adventure in designing algorithms for hardware. If you’re used to thinking of programming in a stepwise fashion for a CPU, it’s time to get out your thinking cap!

Continue reading “Sort Faster with FPGAs”

J.C. Bose and the Invention of Radio

The early days of electricity appear to have been a cutthroat time. While academics were busy uncovering the mysteries of electromagnetism, bands of entrepreneurs were waiting to pounce on the pure science and engineer solutions to problems that didn’t even exist yet, but could no doubt turn into profitable ventures. We’ve all heard of the epic battles between Edison and Tesla and Westinghouse, and even with the benefit of more than a century of hindsight it’s hard to tell who did what to whom. But another conflict was brewing at the turn of 19th century, this time between an Indian polymath and an Italian nobleman, and it would determine who got credit for laying the foundations for the key technology of the 20th century – radio.

Continue reading “J.C. Bose and the Invention of Radio”

Why No Plane Parachutes? And Other Questions.

This week I was approached with a question. Why don’t passenger aircraft have emergency parachutes? Whole plane emergency parachutes are available for light aircraft, and have been used to great effect in many light aircraft engine failures and accidents.

But the truth is that while parachutes may be effective for light aircraft, they don’t scale. There are a series of great answers on Quora which run the numbers of the size a parachute would need to be for a full size passenger jet. I recommend reading the full thread, but suffice it to say a ballpark estimate would require a million square feet (92903 square meters) of material. This clearly isn’t very feasible, and the added weight and complexity would no doubt bring its own risks.

Continue reading “Why No Plane Parachutes? And Other Questions.”