“Can you explain how computers work?” Son was using an ipad and asked me all of a sudden.
“That’s going to be a long lesson. How about I start with the basics: the binary numbers. Everything on your computers are represented in binary numbers.”
“Oh, really? What are binary numbers?”
I moved to a floor lamp, and turned it on, then turned it off. “Look at this lamp, what did I just do?”
“You turned it on and off.”
“So for the lamp, there are two states: off and on. This is true for all electronic devices, including computers. In computers these translate to two digits: 0 and 1. These are the only two digits in any binary number.”
“What about 2, 3 and 4, 5…”
“Right. Those are the digits we normally use. It’s called decimal numbers. When you count 1, 2, 3, 4, 5, 6, 7, 8, 9, what’s the next number?”
“It’s 10.”
“How is 10 written?”
“It’s 1 then 0.”
“See here, when the ones digit reaches 10, we add 1 to the tens digit instead. 11, 12, 13, 14, 15, 16, 17, 18, 19, then 20. Again the ones digit reaches another 10, so the tens digit becomes 2. In binary numbers, we add one to the higher digit whenever the current digit reaches 2. So 1 in decimal numbers is still 1 in binary numbers. 2 in decimal is 10 in binary. You read it as one zero. 3 in decimal is 11 in binary, and so on.”
“Ah, I see. In binary numbers, there are only 0s and 1s. That’s all the numbers in computers!”
“Right, isn’t that magic? You don’t need to worry about the details on how to convert decimal numbers into binary numbers. You will learn that later.
“Binary numbers actually have a long history. People noticed them a long long time ago. For example, this is an ancient Chinese symbol:
“This is called YinYang and BaGua. YinYang is the circle inside. Everything has a Yin side and a Yang side, just like the front and the back of a coin. The eight symbols in the outer circle are called BaGua. Ba really is eight in Chinese. Each of the symbols has three lines, either a continuous line or a broken one. If you replace the continuous line with 1 and the broken line with 0, these eight symbols are really 0 to 7 in binary numbers!”
BTW, YinYang and BaGua have thousands of years of history and have profound influence in East Asian culture, for example, philosophy (Taoism) and even KungFu (Taiji & others)! For proof, just look at the national flag of South Korea: