Chapter 33: The Spiritual Road with the Gate
33.
"If you want to make an addition machine, you first need to use the spiritual path to implement logical operations. ”
Cheng Li explained to the old man when Fang Xiaochun was preparing the materials.
"Do you mean that you want to use the spiritual path to achieve the change of yin and yang?"
"Yes, you should know the difference in base calculations. Cheng Li asked.
"This is naturally known, yin-yang arithmetic is the study of only yin and yang arithmetic changes, is binary operations. ”
"Innate gossip is octal operation, plus acquired gossip is hexadecimal operation. ”
"We humans are used to decimal arithmetic. The old man said eloquently.
Qingling Island's research on the base system is still relatively in-depth
This also saved Cheng Li a lot of tongue, otherwise it would be very troublesome to explain the concept of the base system to a group of people who don't understand the base system at all.
The decimal system is a kind of carry method artificially prescribed in mathematics, and the decimal system is every decimal one. So when 9 becomes 10, it goes from 1 digit to 2 digits.
Humans are accustomed to calculating in decimal because they have ten fingers.
However, because the computer only has a high and low level, it can only recognize 0 and 1, so it can only perform binary calculations.
Binary is every 2 into 1, 0 for 0, 1 for 1, but from 2 is different from other bases, to start 1.
Therefore, the binary 2 is represented by 10. 3 is 11, and 4 is 100.
If you use the decimal and binary correspondence, it becomes.
0=000
1=001
2=010
3=011
4=100
......
And so on.
In the yin-yang arithmetic on Qingling Island, yin represents 0 and yang represents 1, which is actually a binary expression.
So Cheng Li said: "The calculator I want to make next is a binary calculator that performs yin-yang operations. As long as it's implemented, it's not a problem to convert to other bases, which you should understand. ”
The old man nodded and said, "This is naturally no problem." As long as you can achieve yin-yang operation, it is considered successful. The road is simple, as long as the yin-yang operation is realized, other things are naturally not a problem. ”
At this time, Fang Xiaochun had already brought all the materials Cheng Li said, she was a little Lori, holding a lot of things, but she looked very relaxed, and it seemed that her strength was still quite strong.
Fang Xiaochun threw everything in front of Cheng Li, and said expressionlessly: "Bring it." ”
"Good work. ”
Cheng Li couldn't help but want to touch Fang Xiaochun's little head again, but thinking that the business was important, he still stopped his hand and began to come to the pile of materials with full attention, and tinkered.
Cheng Li first picked up a crystal thread and tied it with a spirit stone.
A crystal wire is a conductor that allows spiritual power to operate in it, and is functionally similar to a wire.
Just tie the crystal wire to the spirit stone.
Then Cheng Li tied the extended crystal wire to two series switches, and in the middle, connected a magic weapon of illumination.
This illuminating magic weapon is called the spiritual lamp, which belongs to the most basic magic weapon, as long as there is spiritual power through, it will glow and light up the surroundings. For cultivators, this is a very ordinary magic weapon.
For Cheng Li, this is equivalent to a light bulb, except that this light bulb is not driven by electricity, but by spiritual power.
"Alright, the first logical spirit path, done. Cheng Li stood up and pointed to a connected spiritual path on the ground and said.
This spiritual path, anyone who has studied junior high school physics on the earth, can see at a glance that it is a series circuit.
The spirit stone is the power supply, and the crystal wire goes out along the two ends, connecting two switches and a spirit lamp in series, which constitutes the simplest series circuit.
And such a series circuit, on the logic circuit, has a special name, that is, "and gate".
The old man looked at the spiritual path connected to the ground, and asked with some confusion: "This spiritual path is ...... with logic?" What does it matter if yin and yang change?"
Cheng Li explained with great interest: "Of course it has a relationship, this is the most basic logical spiritual path, we can call it the door spirit road, and this door spirit road is called "and the door"!"
I remember you said before that harmony is one of the three basic logics of yin and yang change, representing the prosperity of yin and the decline of yang. ”
"That's right. ”
"Then why is it called Menling Road?"
"Because the gateway is like a gate, when data passes through the gate from the input, it is computed and the output is generated. Therefore, it is called the Door Spirit Road. ”
Cheng Li said with some excitement: Next, I will demonstrate it for you. ”
Then, Cheng Li pointed to the spiritual lamp.
First of all, we need to define the message that the lantern represents when it is lit and extinguished. ”
"When the lantern is lit, it is yang. ”
"When the lamp goes out, it is cloudy. ”
"That's fine, right?"
The old man nodded and said: "Yin and yang changes represent everything, the spiritual lamp is lit and extinguished, and naturally it can also be defined by yin and yang, so there is no problem." ”
Cheng Li immediately pointed to the switch on the spiritual path and said, "Then let's define the switch on the spiritual path."
"The opening and closing are yang. ”
"The switch is off, and it is yin. ”
"No problem, right?"
The old man said thoughtfully: "Naturally, it is also possible to disconnect for yin and close for yang, appropriate." ”
"Okay, let's take a look at it right away. ”
Cheng Li first disconnected the two switches, and the spiritual lamp was extinguished at this time.
"The two switches are all disconnected, that is, we have two yin inputs at the input end, and the output result, the spiritual lamp is extinguished, which is also yin. ”
That is to say, in this logical spiritual path, the input is two yin, and the output is yin, that is, two yin are yin. ”
Then Cheng Li closed one of the two switches, and the other switch was disconnected, and at this time, the spiritual lamp was still extinguished.
"Two switches, arbitrarily close one of them, and the other one is disconnected, which is equivalent to the input of one yin and one yang, and the output result is that the spiritual lamp is still extinguished, which is also yin.
That is, one yin and one yang are yin. ”
In the end, Cheng Li closed the two switches, and at this time, the spiritual lamp suddenly shone and was lit!
"Then I turned both switches on, which is equivalent to two yangs, and the lantern was lit. ”
In other words, two yangs are yang. ”
Finally, Cheng Li concluded.
In other words, this logical path can carry out such a logical operation.
"Two yin is yin, two yang is yang, and one yin and one yang are yin. ”
"This is one of the three basic yin and yang changes, the 'and' logic. ”
"Because in the logic of 'and', only two yangs are yang, and all other situations are yin, so it can be said that yin flourishes and yang declines. ”