YouTuber Mattias Jähnke, aka engineerish, demonstrates how to build and read a binary clock. The parts include a Raspberry Pi, some LEDs, and a 3D printed case.

Let’s face it, we’re all pros at life. Walking, eating, breathing — it’s all so easy! Time to makes things challenging again, starting with telling time!

Familiar with binary? Probably you’ve heard about it in connection with electronics. That’s because it’s the number system used in digital technology, understood by every computer and smartphone on the planet. People, on the other hand, tend to prefer reading more than just ones and zeros…

In his video, YouTuber Mattias Jähnke, aka engineerish, builds his very own binary clock. At the core of the clock is a Raspberry Pi running a simple Python script. It commands three strips of LEDs, one for hours, one for minutes, and one for seconds.

Sound complicated? Perfect! As Jähnke says, “If you have a problem with your friends being able to tell the time way too easily while in your house, this is your answer.”

Jähnke 3D printed the case himself. The back, which holds most of the components, is made of black PLA. The front is white PLA and is thin enough to allow light from the LEDs to shine through.

Understanding a Binary Clock

Most of the world counts using a base-10 system, called decimal. That means each symbol in a number can have one of ten values: 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9. Binary is a base-2 system, where each symbol can take on one of two values: 0 or 1.

In decimal, each position in a number represents a power of 10. For example, in the number 678,

  • the 8 represents 8 x 1 (10⁰),
  • the 7 represents 7 x 10 (10¹), and
  • the 6 represents 6 x 100 (10²).

600 + 70 + 8 = 678.

In binary, each position represents a power of 2. So, in the binary number 10111, from right to left, we have

  • 1 x 1 (2⁰),
  • 1 x 2 (),
  • 1 x 4 (),
  • 0 x 8 (), and
  • 1 x 16 (2⁴).

Therefore, 10111 in binary is 1 + 2 + 4 + 0 + 16 = 23 in decimal.

Think you got it? Try it the other way around. How do you write the decimal number 9 in binary? 42? The answers are at the bottom of the article. (Tip: Repeatedly divide by two and look at the remainder each time!)

A binary number with x positions can at most represent a decimal number of 2ˣ. That’s why, in Matthias’ clock, each of the lines representing hours, minutes, and seconds consists of only 6 LED circles. 2⁶ is 64, which is greater than 59, the highest number shown on a clock.

(In fact he could have represented the hours with only 5 circles, because 2⁵ is 32, which is greater than 24. I guess he just wanted to be consistent.)

9 in decimal is 1001 in binary. 42 is 101010.

Source: Raspberry Pi

Mattias Jähnke building his binary clock

Advertisement
Advertisement
Advertisement