Linux Format

Build an 8-bit binary counter in Python

We’re taking a somewhat different tack for this tutorial. We’ll be learning about the binary numbering system and using Python to build an LED 8-bit binary counter. In digital electronics, a binary number is a base-2 numeral system that uses two symbols, zero and one. By comparison, the decimal number system requires ten different symbols or digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. In digital electronics this is called the base-10 numeral system.

In either base system, the symbols that are used to denote a number take on a different place value depending upon their position. Using the decimal numeral system, the number 114 represents the sum of (1 x 10 ) + (1 x 10 ) + (4 x 10 ). The digit

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format2 min read
OBS Studio
Version: 30.0.2 Web: https://obsproject.com There are lots of good options for recording screencasts, but if you want to live-stream T your desktop, one of the best options is OBS Studio. The app works with all the major online streaming providers, s
Linux Format1 min read
Wine For Wayland
2023 was a great year for the Wayland driver for Wine. The goal was to move forward from the experimental phase and make the driver a proper upstream component. A year later, after several merge requests, many people are now already able to use the l
Linux Format2 min read
Back Issues Missed One?
ISSUE 313 April 2024 Product code: LXFDB0313 In the magazine Discover how to use the ultimate hacker’s toolkit, staying out of trouble while doing so. And join us as we take the Puppy Linux developer’s new distro for a run and explore its container

Related