Dividing by zero — the fundamental no-can-do of arithmetic. It is somewhat surrounded by mystery, and is a constant source for internet humor, whether it involves exploding microcontrollers, the collapse of the universe, or crashing your own world by having Siri tell you that you have no friends.
It’s also one of the few things
gcc will warn you about by default, which caused a rather vivid discussion with interesting insights when I recently wrote about compiler warnings. And if you’re running a modern operating system, it might even send you a signal that something’s gone wrong and let you handle it in your code. Dividing by zero is more than theoretical, and serves as a great introduction to signals, so let’s have a closer look at it.
Chances are, the first time you heard about division itself back in elementary school, it was taught that dividing by zero is strictly forbidden — and obviously you didn’t want your teacher call the cops on you, so you obeyed and refrained from it. But as with many other things in life, the older you get, the less restrictive they become, and dividing by zero eventually turned from forbidden into simply being impossible and yielding an undefined result.
And indeed, if a = b/0, it would mean in reverse that a×0 = b. If b itself was zero, the equation would be true for every single number there is, making it impossible to define a concrete value for a. And if b was any other value, no single value multiplied by zero could result in anything non-zero. Once we move into the realms of calculus, we will learn that infinity appears to be the answer, but that’s in the end just replacing one abstract, mind-boggling concept with another one. And it won’t answer one question: how does all this play out in a processor? Continue reading “Creating Black Holes: Division By Zero In Practice”
Electronics takes a lot of math. Once you’ve mastered all the algebra and calculus, though, it is sometimes a drag to go through the motions. It also can be error-prone. But these days, you have Wolfram Alpha which will do all the work for you and very easily. I use it all the time when I’m too lazy to solve an equation or do an integral by hand. But did you know it actually has some features specifically for electronics?
If you want to do a lot with electronics — or nearly any technical field — you are going to have to learn some math and you shouldn’t just rely on tools like Wolfram to skirt understanding the math. Unfortunately, schools often teach us that the point to math is to get a correct answer. For bookkeepers and at the very final stage of engineering, that may be true. But the real value to math for engineers and scientists is to develop intuition about things. If you increase a capacitor’s value does that make its reactance go up or down? Does a little change in load resistance make a corresponding small change in power consumption or is it a lot more? So you should understand why math works. But once you do, using a tool like Wolfram can free you to focus on the abstract questions instead of the detailed “grunt work.”
Tip #1: Split Personality
Wolfram can’t seem to decide if it is a symbolic math program or a search engine. Sometimes just putting a topic name in can lead to some interesting calculations. For example, look what happens when you enter the word opamp: Continue reading “Wolfram Alpha Electronic Tips”
It was World War II and scientists belonging to the Manhattan Project worked on calculations for the atomic bomb. Meanwhile, in one of the buildings, future Nobel Prize winning theoretical physicist Richard Feynman was cracking the combination lock on a safe because doing so intrigued him. That’s as good a broad summary of Feynman as any: scientific integrity with curiosity driving both his work and his fun.
If you’ve heard of him in passing it may be because of his involvement on the Space Shuttle Challenger disaster commission or maybe you’ve learned something from one of his many lectures preserved on YouTube. But did you know he also played with electronics as a kid, and almost became an electrical engineer?
He was the type of person whom you might sum up by saying that he had an interesting life. The problem is, you have to wonder how he fit it all into one lifetime, let alone one article. We’ll just have to let our own curiosity pick and choose what to say about this curious character.
Continue reading “Richard Feynman: A Life Of Curiosity And Science”
Electronics can be seen as really just an application of physics, and you could in turn argue that physics is the application of math to the real world. Unfortunately, the way most of us were taught math was far from intuitive. Luckily, the Internet is full of amazing texts and videos that can help you get a better understanding for the “why” behind complex math topics. Case in point? [3Blue1Brown] has a video showing how to solve 2D equations using colors. If you watch enough, you’ll realize that the colors are just a clever way to represent vectors and, in fact, the method would apply to complex numbers.
Honestly, we don’t think you’d ever solve equations like this by hand — at least not with the colors. But the intuitive feel this video can give you for how things work is very valuable. In addition, if you were trying to implement an algorithm in software this would be tailor-made for it, although you wouldn’t really use colors there either we suppose.
Continue reading “Solve 2D Math Equations Colorfully”
In 1962, John Glenn sat in his capsule waiting for his rocket engines to light-up and lift him to space. But first, he insisted that Katherine Johnson double-check the electronic computer’s trajectory calculations. While that’s the dramatic version of events given in the recent movie, Hidden Figures, the reality isn’t very far off. Glenn wasn’t sitting on the launchpad at the time, but during the weeks prior to launch, he did insist that Johnson double-check the computer’s calculations.
So who is this woman who played an important but largely unknown part of such a well-known historical event? During her long life, she was a wife, a mother, an African-American, a teacher, and a human computer, a term rarely used these days. Her calculations played a part in much of early spaceflight and in 2015, she was awarded the Presidential Medal of Freedom by President Obama. She also has a building named after her at the Langley Research Center in Hampton, Virginia.
Continue reading “Katherine Johnson: Computer To The Stars”
The Fourier transform underpins so much of our technological lives, in most cases probably without our realising it. The ability to mathematically split a waveform into its frequency components and vice versa underpins much of the field of digital signal processing, and DSP has become an essential part of many electronic devices we take for granted.
But while most of us will know what a Fourier transform is, fewer of us will know anything of how one works. They are a function called from a library rather than performed in themselves. Even when they are taught in schools or university courses they remain something that not all students “get”, and woe betide you if (as your scribe did) you have a sub-par maths lecturer.
The video below the break then is very much worth a look if Fourier transforms are a bit of a mystery to you. In it [Grant Sanderson] explains them through a series of simple graphical examples in a style that perhaps may chalk-and-talk mathematics teachers should emulate. You may still only use Foruier transforms through a library, but after watching this video perhaps some of their mysteries will be revealed.
Continue reading “All The Stuff You Wished You Knew About Fourier Transforms But Were Afraid To Ask”
If you haven’t been following along with Conway’s Game of Life, it’s come a long way from the mathematical puzzle published in Scientific American in 1970. Over the years, mathematicians have discovered a wide array of constructs that operate within Life’s rules, including many that can be leveraged to perform programming functions — logic gates, latches, multiplexers, and so on. Some of these creations have gotten rather huge and complicated, at least in terms of Life cells. For instance, the OTCA metapixel is comprised of 64,691 cells and has the ability to mimic any cellular automata found in Life.
A group of hackers has used OTCA metapixels to create a Tetris game out of Life elements. The game features all 7 shapes as well as the the movement, rotation, and drops one would expect. You can even preview the next piece. The game is the creation of many people who worked on individual parts of the larger program. They built a RISC computer out of Game of Life elements, as well as am assembler and compiler for it, with the OTCA metapixels doing the heavy lifting. (The image at the top of the post is the program’s data synchronizer.
Check out the project’s source code on GitHub, and use this interpreter. Set the RAM to 3-32 and hit run.
For a couple of other examples of Life creations, check out the Game of Life clock and music synthesized from Life automata we published earlier.