10101 - About those binary numbers we use every day

About those binary numbers we use every day

August 2012

It was 1980. Fluke had been using in-house minicomputers in our engineering labs for several years by then, and I had done some computer program development work of my own on the automated test systems we were selling.

In addition to access from video terminals, the minicomputers we used had a programming console where we could directly key in short program sequences, and the switches used to enter the binary numbers were color coded in three-bit groups to facilitate the use of something called octal notation (using digits 0 through 7) in our program notes. Other computer makers were using hexadecimal notation - four bit groups that included digits 0 through 9 and the first six letters of the alphabet.

How computers and cell phones and digital multimeters think

Chuck's desktop

I'm sure it's not news to you that all the digital wonders of our modern world speak in a language made up of binary bits - the on/off states of groups of solid state switches.

As an exercise to show how this works, I've captured an image of my laptop computer's 13-inch desktop screen. The information displayed when I look at the properties of this image reveals the following: Image size: 1,366 x 768 (total pixels on screen = 1,049,088)

That requires 11 binary bits to define a vertical column on the screen, and 10 more bits to define a unique pixel in that column.

It's an impressive number of pixels, but that's only the beginning. Each pixel has red-green-blue (RGB) color information associated with it - 8 bits per pixel, allowing 256 different states for each. The number of carefully organized binary bit combinations used to display color on the screen is 25,178,112. As you might imagine, it is difficult for the human mind to grasp the details of program code or computed data when it's displayed as a seemingly endless series of ones and zeros. So, we use different number systems to think about them. So far, on this page, I've used the decimal notation we all use - counting by 10s - to communicate with you. In binary, the decimal value "10" is represented as "1010" - an 8 bit plus a 2 bit. One hundred is seen as 1100100 - a 64 bit plus a 32 bit plus a 4 bit. In the octal notation I was using back in 1980, I would think of the binary equivalent of the decimal number 100 (1100100 binary) in groups of three bits, with possible digit values up to 7.

 decimal 100 binary 001 100 octal 1 4 4

Now I could refer to it as 144 octal while keeping the binary bits straight in my head.

Decimal 1,049,088 (the number of pixels on my screen) requires 21 binary bits:

 binary 100 000 000 001 000 000 000 octal 4 0 0 1 0 0 0

If you work with computers at all, you have probably seen computer memory addresses with a mix of letters and numerals, such as 2AF3. In this case, a binary number is represented in what we call hexadecimal notation.

Wikipedia tells us this: »
"It uses sixteen distinct symbols, most often the symbols 0 - 9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a - f) to represent values ten to fifteen. For example, the hexadecimal number 2AF3 is equal, in decimal, to (2 × 163) + (10 × 162) + (15 × 161) + (3 × 160), or 10995."

You can bet a Fluke engineer used one or more of these notation systems to help keep things straight as he or she wrote the programs that make your digital test tool work.

Today, our interface with the bits running around in our computers, phones, and digital test tools is via keyboards, mice, and touch sense swipes, pinches, and taps. But, the engineers who develop the products we use, including Fluke's family of test tools, still have to understand how to deal with the raw data, and they still use representations such as octal and hexadecimal notation to keep track of what's going on in a computer's memory. That's why you may see an error message on your computer with memory address information.

Back to 1980

21st birthday cake candle comparison

So, what's with the "10101" in the headline at the beginning of this column?

Back again to 1980, on the occasion of my son's 21st birthday. His mother and sister had prepared his birthday cake, including candles. They took a shortcut with the candles - using numeral candles instead of the classic birthday ones.

Instead of putting 21 individual candles on the cake, however, they had five candles shaped as the digits 0 and 1 arranged as 10101. My surprised son and I read the display as the binary number representing the decimal number 21 - a 16 bit, plus a 4 bit, plus a 1.

When we complimented the ladies on their correct binary notation, their response was a puzzled look. My daughter said, "I don't know about binary, that's a 10 + 10 + 1." And it is, if you add them up in decimal. We still chuckle about that incident.

Either way, it was an improvement, don't you think?