Chapter 125 When the Abacus Meets Binary: The First Mechanical Computer of the Qin Dynasty
Chapter 125 When the Abacus Meets Binary: The First Mechanical Computer of the Qin Dynasty
Autumn arrived earlier in Xianyang than usual. Outside the Epang Palace, ginkgo leaves carpeted the ground in gold, but inside the office hall of the Qin Empire's Bureau of Statistics, the atmosphere was as somber as the dead of winter.
There were no swords clashing here, only the crackling sound of abacus beads clashing, as dense as a downpour.
Prime Minister Li Si has been losing a lot of hair lately. He held a "Final Report on the Allocation of Materials and Cost Accounting for the Third Phase of the National Railway Network Project" in his hand, his hands trembling as if he were playing a pipa.
"Still haven't figured it out?" Li Si roared at the row of red-robed mathematics professors in front of him. "It's been three days! Three days! I... no, I'm going to turn my hair white with worry! It's just calculating the optimal solution for resource allocation, isn't it?"
The leader, a mathematics PhD and the contemporary "Sage of Calculation" of the Qin Dynasty, Zhang Cang, had two huge dark circles under his eyes and held a golden nanmu abacus that had been worn smooth and shiny, looking utterly hopeless.
"Prime Minister," Zhang Cang's voice was hoarse, as if he had swallowed a handful of sand, "this is not just about the allocation of 'a few' supplies. It involves the flow of grain, steel, and coal across thirty-six prefectures and twelve hundred counties nationwide. Moreover, His Majesty has demanded the introduction of 'variables'—to take into account the impact of weather, road damage, and even the probability of drivers falling ill… The amount of calculation involved is astronomical!"
"puff--"
In the corner, a young arithmetic apprentice suddenly coughed up a mouthful of blood, still clutching the abacus tightly in his hand, and then collapsed onto the table.
"Quick! Imperial Physician! Another one has fainted!" Zhang Cang skillfully directed the servants to carry the person away, then turned to Li Si with a wry smile, "Prime Minister, this is the fifth one carried out today. Our brains are made of flesh and blood, not magical artifacts of gods. Multiplying and dividing these hundreds of thousands of data points can really kill people."
Li Si felt a chill run down his spine as he looked at the young man being carried away.
The industrial machines of the Qin Dynasty were running too fast, generating data that overwhelmed these poor human calculators like a flood. Before, building the Great Wall only required calculating the stones and laborers; now, building a railway requires calculating stress, curvature, thermal expansion and contraction…
"If only the Grand Tutor G could still be running at full power," Li Si sighed, reminiscing about the good old days when "you could ask the Grand Tutor for help."
Meanwhile, on the third basement floor of the Qin Royal Institute of Technology in western Xianyang, an even more insane experiment was underway.
The place reeks of engine oil, the burnt smell of metal being cut, and a noise that would frighten most people.
"No! The gear ratio is wrong!"
Hu Hai was wearing a greasy overall, with goggles pushed up on his head, making his face look like a smeared cat. He was holding a huge wrench and yelling at a monstrous brass machine in front of him.
This machine is as big as a room, composed of thousands of intricate gears, connecting rods, cams, and crankshafts. It looks like the inside of a clock magnified countless times, or a metal labyrinth.
"The carry mechanism is stuck!" Hu Hai kicked the machine's base. "Teacher Wang! This 'decimal' mechanical structure is too complicated! The gear meshing keeps malfunctioning! Can we try a different approach?"
Wang Jianguo, holding blueprints, was squatting inside the machine adjusting the drive shaft. Hearing the shout, he poked his head out from among a pile of gears: "What kind of approach? The blueprints Little G gave us are for a 'difference engine,' which is originally used to calculate polynomials. Its principle is to turn multiplication and division into addition and subtraction."
"I mean," Hu Hai's eyes gleamed with a fanatical light, "didn't Little G mention something called 'binary' before? It only has 0 and 1, only 'on' and 'off'. Like yin and yang, like a switch."
"Use a machine to implement binary?" Wang Jianguo was taken aback. "That would require even more parts, but the machine would become three times larger."
"Big is big!" Hu Hai excitedly waved the wrench. "Qin has plenty of steel and plenty of land! As long as the calculations are accurate, I'll even accept a plan as big as building a city! The key issue now is that this damned decimal gear has to advance once every revolution, causing too much wear! If we used a binary gear, it would be a push-pull lever, so simple!"
Standing on the high observation platform, Little G (now just a tiny pixel) looked down at the almost deranged prince and suddenly sent a message to Wang Jianguo's brain-computer interface.
[A qualitative leap in Hu Hai's logical thinking has been detected. He is attempting to surpass Babbage and directly reach the threshold of Turing, albeit in a purely mechanical way.]
"Is this what talent is?" Wang Jianguo wondered to himself.
"Never mind!" Hu Hai suddenly made a decision. "Disassemble this set of gears! Where are the Gongshu family members? Where did they all go? Make me ten thousand new push-pull rods! I want to combine 'Leibniz' and 'Mozi' into one!"
Three months later.
A huge tent was erected in the square in front of Zhangtai Palace. Under the tent, the "monster" that had just been transported from the Polytechnic Institute was covered.
To power this machine, a high-pressure steam pipeline was even specially laid, connecting it to the boiler room next to the square.
Ying Zheng sat on the high platform. Although he had abdicated, his imposing presence still silenced everyone present. Fusu sat beside him, nervously watching the red cloth.
"Father," Fusu asked in a low voice, "this thing... can it really work? I heard that Huhai used up half of the copper from the Imperial Treasury this year to make it."
"Whether it will work or not, we'll only know after we try," Ying Zheng said calmly. "Are Li Si's men ready?"
On the other side of the square, Li Si and Zhang Cang led the Qin Dynasty's top one hundred mathematics scholars, each with a table, an abacus, and a thick stack of draft paper in front of them. They were full of vigor, as if they were about to go to the battlefield.
This is a battle to defend human dignity. They don't believe that a pile of cold, hard metal can compare to the brilliance of the human brain.
"What's the topic?" Zhang Cang asked arrogantly.
Wang Jianguo stepped forward and took out a sealed scroll: "This is the ocean current and wind resistance correction data table for the 'Invincible Qin' circumnavigation voyage proposed by the Navy. We need to calculate the coordinates of the best resupply points on twelve major routes over the next three years. It involves 3,600 variables and requires approximately 50,000 high-precision floating-point calculations."
Upon hearing "fifty thousand times," Zhang Cang's face twitched, but he still gritted his teeth and said, "The mathematicians of Qin are fearless! Begin!"
"Crackling and popping—"
The sound of a hundred abacuses turning simultaneously echoed across the square, like a sudden downpour on banana leaves, rapid and rhythmic. The fingers of the mathematics PhDs moved so fast that only afterimages could be seen, and draft papers flew like snowflakes.
On the other side, Hu Hai simply snapped his fingers calmly.
"ignition."
Several shirtless craftsmen turned on the steam valve.
"Boom—Swoosh—"
White steam billowed out, and the enormous flywheel began to slowly turn. Then, a series of sickeningly loud yet mechanically beautiful "click-clack" sounds rang out.
That's tens of thousands of gears meshing, and thousands of push-pull rods reciprocating.
Hu Hai took out a stack of cardboard with holes punched in it (punched cards) and stuffed it into the machine's "mouth" like feeding food.
"Eat up, baby." Hu Hai patted the machine's cold exterior. "Don't choke."
Half an hour has passed.
A commotion began to break out among the mathematics PhDs. Some were sweating profusely, some had cramped fingers, and some were frantically scribbling on their draft papers.
"No! There's a mistake in the decimal point! The rest is ruined!" A PhD student slammed the abacus to the ground in despair.
"Recalculate! Recalculate now!" Zhang Cang roared, but his hands were trembling slightly. Fatigue is inevitable for the human brain under intense computation. Once fatigue sets in, errors spread like a plague.
Meanwhile, the machine maintained its indifferent, steady rhythm.
"Click, click, click..."
It remains calm and composed, unmoved by joy or sorrow. It doesn't get anxious because of the large amount of calculation, nor is it annoyed by the tediousness of decimal points. As long as the steam pressure is sufficient, it can keep calculating until the end of time.
"Data overflow warning!" a craftsman shouted. "Gear set number three is overheating!"
"Water it!" Hu Hai roared, "Water it with cold water!"
Buckets of cold water were poured onto the scalding brass gears, instantly creating plumes of white mist. The machine roared through the mist, like a colossal beast breathing in the clouds.
Another quarter of an hour passed.
At the rear of the machine, a long strip of paper was ejected, printed with a series of neat numbers (although the numbers were printed with ink stamps and were somewhat blurry, they were still clearly legible).
"It's done." Hu Hai picked up the paper strip, blew on the ink, and walked towards the platform with a relaxed expression.
At this time, Zhang Cang's team had only completed one-tenth of the calculations, and due to several errors in the process, they were undergoing a painful review.
Zhang Cang looked at the paper strip in Hu Hai's hand, and the abacus in his hand fell to the ground with a "thud".
Pearls and jade splattered everywhere.
This is not just a broken abacus, but a shattering of humanity's sense of intellectual superiority that has lasted for thousands of years.
The pixels of Little G flickered slightly.
It looked at that bulky, noisy behemoth that spewed black smoke. The computing power of this thing was less than one trillionth of its own, and even less than that of a 21st-century electronic calculator.
But in Little G's eyes, this machine was so beautiful.
It saw the embodiment of logic. It saw "if" become the deflection of a lever, and "then" become the meshing of gears.
This is the spark.
Little G silently recorded this moment in the database.
Even if I leave, even if the Qin Dynasty never developed vacuum tubes and transistors, as long as they mastered this "mechanical logic," they could deduce the critical mass of an atomic bomb and calculate the trajectory of a rocket. Intelligence no longer depended on the physical body; intelligence was endowed with a body of steel.
It seemed as if it could see two thousand years later, these gears had become silicon wafers, and this steam had become electricity. And it all started in this square filled with the smell of coal ash.
Ying Zheng stepped down from the high platform and came to the machine that was still trembling slightly.
A wave of heat hit me, mixed with the smell of engine oil.
"What is this thing called?" Ying Zheng asked Hu Hai.
"Your subject hasn't named it yet." Hu Hai scratched his head. "I originally wanted to call it 'Great Qin No. 1 Difference Engine,' but Teacher Wang said it was too corny."
Ying Zheng reached out and stroked the scorching hot bronze shell. He felt the vibrations within, vibrations that were not the pulse of life, but the rhythm of pure reason.
"In the past, when I encountered things I couldn't calculate, I would consult the heavens, tortoise shells, and yarrow stalks," Ying Zheng said slowly. "Later, I consulted Little G. But I knew that was all asking for help."
He turned around, looking at the ashamed-looking mathematics PhDs, and then at the tireless machine.
"This machine has taught me a lesson. Although the way of Heaven is lofty and distant, it can still be calculated. As long as the gears mesh tightly enough and the logic is deduced deeply enough, there is no destiny in this world that cannot be calculated."
"It's not called a difference engine."
Ying Zheng's voice echoed in the main square.
"If it can calculate the supply of provisions, it can calculate the hearts of the people; if it can calculate the ocean currents, it can calculate the fate of the Qin Dynasty. It will calculate this chaotic heavens with crystal clarity!"
"Bestowed the name—Calculator of Heaven."
"Calculating the Heavens" was placed in the deepest part of the Royal Academy of Sciences, becoming the national treasure of the Qin Dynasty.
And what follows is a completely new profession.
Because the machines require people to punch holes (write programs), the Polytechnic Institute established a "Drilling Department".
The first batch of "punchers" (who later became programmers) were mostly women because they were more skillful and meticulous.
Every day, you can see a group of young people in neat uniforms discussing things in the courtyard:
"Hey, in your grain and fodder scheduling algorithm yesterday, did you punch the hole in the third row crookedly? It caused the machine to freeze for half an hour."
"Don't even mention it, that was a 'logic bug,' I spent all night trying to get that real bug stuck in the gears out."
Zhang Cang, the former "Master of Calculation," did not lose his job. He became the chief verification officer of "Calculation Breaker."
He stopped using the abacus and began to study how to transform complex real-world problems into "hole language" that machines could understand.
One day, while teaching his students, Zhang Cang pointed to the roaring machine and said:
"Children, don't be fooled by the fact that it's just a pile of iron. It's more honest than we are. People lie, they're lazy, they make mistakes in their accounts because of selfishness. But it doesn't. It's one when it's one, and zero when it's zero. That's the 'Tao,' the purest Tao."
In the dead of night, Hu Hai would occasionally sneak into the machine room, apply some oil to the bearings of "Calculating the Sky," and then mutter to himself:
"Hey everyone, what do you think Chang'e actually looks like? Once I upgrade you to the tenth generation, can you help me calculate when my father's temper will improve?"
The machine did not answer; only the gears occasionally made a soft "click" due to inertia, as if it were some kind of response from the future.
Hu Hai didn't care that no one answered, and continued to enjoy how to upgrade "Calculate the Heavens".
xymnovel