How the world runs
דְּבָרְךָ נִצָּב בַּשָּׁמָיִם

The Source Code

Your phone runs millions of lines of code you never see. You only see the screen. The Kabbalah says the world works in a similar way. Eight questions, each leading to the next.

Start with question 1

One rule first. Nothing is like God (Yeshayahu 40:25). The Torah still uses pictures "to let the ear hear what it is able to hear" (Rashi on Shemot 19:18). The Rambam (Rabbi Moshe ben Maimon, Egypt, 1100s) adds the limit: a picture can describe what God does, never what He is (Moreh Nevuchim 1:54). So the computer here describes how the world is run. It does not describe God.

Question 1

What is the world made of?

Every app starts as code: a text that says what to build. The Midrash (the Sages' teachings on the Torah) says the world also started from a text. A builder does not build a palace out of his head. He works from plans. God did the same, and His plans were the Torah.

כָּךְ הָיָה הַקָּדוֹשׁ בָּרוּךְ הוּא מַבִּיט בַּתּוֹרָה וּבוֹרֵא אֶת הָעוֹלָם

"In the same way, the Holy One, blessed be He, looked into the Torah and created the world."

Bereishit Rabbah 1:1

And code is made of characters. Sefer Yetzirah (one of the oldest books of the Kabbalah) says God made everything by combining the 22 Hebrew letters. It calls letters "stones" and the words they make "houses": two stones build two houses, three build six, seven build 5,040, "and from here on, go and count what the mouth cannot say" (4:12).

Tanya (by Rabbi Shneur Zalman of Liadi, 1700s, the founder of Chabad) takes this down to one rock. The word אֶבֶן, "stone," is the letters of God's words at creation, combined step by step until they spell "stone." That combination is what keeps the stone in existence (Sha'ar HaYichud VehaEmunah ch. 1).

אבגדהוזחטיכלמנסעפצקרשת אֶבֶן "STONE"
The letters of creation, combined, are what a stone is made of (Tanya, Sha'ar HaYichud 1).
Next questionBut code is only text. Something has to run it.
Question 2

What keeps it running?

The Zohar (the central book of the Kabbalah) says it plainly: "It was not the Torah that created the world. The Holy One created the world by looking into the Torah" (Zohar II:161a). Code does not run itself.

Here a computer picture can go wrong. A programmer finishes an app and goes home, and the app keeps running. Tanya says picturing God that way is the root mistake of people who deny that He watches over the world. Its example is a silversmith: once he makes a cup, the cup no longer needs him. But the smith only reshaped silver that already existed. God made the world from nothing, so it needs Him every moment.

Tanya proves it from the splitting of the sea. God moved the water "with a strong east wind all night" (Shemot 14:21). Why all night? If the wind had stopped for a moment, the water would have flowed back.

צָרִיךְ לִהְיוֹת כֹּחַ הַפּוֹעֵל בַּנִּפְעָל תָּמִיד, לְהַחֲיוֹתוֹ וּלְקַיְּימוֹ

"The power of the Maker must always be inside the thing that was made, to keep it alive and in existence."

Tanya, Sha'ar HaYichud VehaEmunah 2

So a better picture is a live stream, where even the screen is being streamed. Cut the signal and nothing is left. The Baal Shem Tov (Rabbi Yisrael ben Eliezer, Ukraine, 1700s, the founder of Chassidut) read "Forever, Hashem, Your word stands in the heavens" (Tehillim 119:89) this way: the words "Let there be a sky" are still standing inside the sky, keeping it there (quoted in Tanya, Sha'ar HaYichud ch. 1). We say it every morning before Shema: God "renews the work of creation every day, constantly."

Next questionIf God's word is inside a stone, how does it get from Him all the way down to a stone?
Question 3

How does it get from God to a stone?

Through layers. Software has them too: the source at the core, services on top of it, small functions on top of those, and the screen. The Kabbalah calls its layers the four worlds:

Ein SofBeyond the machineאֵין סוֹף

"Without end." God as He is. Not a layer, and not part of the machine at all. "You run them, and no one runs You" (Tikkunei Zohar 17a).

AtzilutThe sourceאֲצִילוּת

Emanation. The ten sefirot, the ten ways God runs the world. Here "He and His vessels are one" (Tikkunei Zohar 3b).

BeriahServicesבְּרִיאָה

Creation. The first level where anything seems to exist on its own: souls and the highest angels.

YetzirahFunctionsיְצִירָה

Formation. The world of the angels, each with one job.

AsiyahThe screenעֲשִׂיָּה

Action. Our physical world, where it all shows up.

One light runs through every layer. Lower layers cover it more (Tanya ch. 36).

The Ramak (Rabbi Moshe Cordovero, Tzfat, 1500s) finds three of these names in one verse: "I created him, I formed him, I also made him" (Yeshayahu 43:7; Pardes Rimonim 16:1). And the layers are not closer to God or farther from Him. He fills them all equally. They differ only in how much they hide Him (Tanya ch. 36).

The Ramchal (Rabbi Moshe Chaim Luzzatto, Italy, 1700s) has a word for the whole system: hanhagah, "the way the world is run." Our closest word is "operating system." He says the entire Kabbalah is only "the details of knowing the hanhagah" (Klach Pitchei Chochmah 1:4), and that it all stands on one foundation:

יחוד האין סוף ב"ה הוא - שרק רצונו ית' הוא הנמצא, ואין שום רצון אחר נמצא אלא ממנו, על כן הוא לבדו שולט, ולא שום רצון אחר. ועל יסוד זה בנוי כל הבנין

"The oneness of the Infinite means that only His will exists, and no other will exists except from Him. So He alone is in control, and no other will. The whole building is built on this foundation."

Ramchal, Klach Pitchei Chochmah 1:3

Rav Chaim of Volozhin (the leading student of the Vilna Gaon, 1700s-1800s) says the same in Nefesh HaChaim: each force really runs the level below it, and still "there is nothing besides Him, no real power at all" (3:12).

Next questionSomething carries out the work inside those layers. The Torah has a name for it.
Question 4

Who does the work?

Angels. In Parshat Vayera three "men" come to Avraham's tent. Why three? Rashi (Rabbi Shlomo Yitzchaki, France, 1000s) answers from the Midrash: there were three jobs.

אחד לבשר את שרה ואחד להפך את סדום ואחד לרפאות את אברהם, שאין מלאך אחד עושה שתי שליחיות

"One to tell Sarah, one to overturn Sedom, and one to heal Avraham, because one angel does not do two missions."

Rashi on Bereishit 18:2

In computer terms, an angel is like a function: a small piece of code with one job. The Gemara names them: Michael told Sarah, Refael healed Avraham, Gavriel overturned Sedom (Bava Metzia 86b). The Rambam goes further: the Sages call every force of nature an angel, and each force has one action (Moreh Nevuchim 2:6). Others disagree with him, among them the Ramban (on Bereishit 18:1).

The Ramchal says every part of nature has angels appointed over it, and they are only "His servants, who do His word" (Derech Hashem 1:5). His example: in a storm, the angel over the trees works to hold them up, but when God decrees the storm, the angel over the wind wins (Derech Hashem 2:5:4). Each force pushes its own job. Only the decree from above decides.

Where the picture breaks A function is lifeless code. Angels "are alive and know their Creator" (Rambam, Yesodei HaTorah 2:8). What they lack is choice: an angel is "one single, specific power," so the prophet calls angels "the ones who stand" (Nefesh HaChaim 1:10, on Zechariah 3:7). The picture is about one thing: who holds the power. An angel has none of its own.

Next questionIf angels and forces do the work, why not ask them for help directly?
Question 5

So why not ask them for help?

Because that is exactly how avodah zarah (idol worship) began. The Rambam tells it in steps (Hilchot Avodah Zarah 1:1-3):

  1. In the days of Enosh, Adam's grandson, people knew there is one God, and that He made the stars to run the world.
  2. They reasoned: the stars are His servants, and a king wants his ministers honored. So honoring the stars must be what God wants.
  3. They built the stars temples and brought them offerings, still saying it was the Creator's will. The Rambam calls this "the root of idol worship."
  4. Over time, God's Name was forgotten. Only a few people still knew Him.
  5. Then Avraham, as a boy, asked: how can the sky keep turning with no one turning it? It cannot turn itself.
AS IT SHOULD BEKingTHE BUGKing
Left: every request goes to the top. Right: people turn to the servants, and in time the King is forgotten (Rambam, Hilchot Avodah Zarah 1).

They never said there is no God. The Ramban (Rabbi Moshe ben Nachman, Spain, 1200s) says the first idol worshippers served angels while admitting that "the great power and complete ability belong to God Above" (on Shemot 20:3). In code terms: they called the sub-process directly and forgot who runs it. So every request goes to the top.

לֹא יְצַוַוח לֹא לְמִיכָאֵל וְלֹא לְגַבְרִיאֵל אֶלָּא לִי יְצַוַוח וַאֲנִי עוֹנֶה לוֹ מִיַּד

"He should not cry out to Michael or to Gavriel. He should cry out to Me, and I answer him right away."

Yerushalmi Berachot 9:1 (Rabbi Yudan)

The Rambam makes it the fifth of his Thirteen Principles: angels and stars "run by built-in nature, with no judgment and no choice," and it is not right to serve them "as go-betweens" (Commentary on the Mishnah, Sanhedrin 10).

Next questionIf God runs everything directly, why can't we see Him?
Question 6

Then why can't we see Him?

Because the world is built to hide Him. The Hebrew word for world, עוֹלָם (olam), comes from הֶעְלֵם (he'elem), "hiding." The world hides the light inside it, so that it looks like it exists on its own (Likkutei Torah, Shabbat Shuvah). The Arizal (Rabbi Yitzchak Luria, Tzfat, 1500s) calls this tzimtzum. Tanya and the Nefesh HaChaim both explain that it does not mean God left. It means He is hidden.

Why hide? The Ramchal says God wants to give us good that we earn, because good that is simply handed to you is not really yours (Derech Hashem 1:2-3). Hiding leaves room to choose. And it is not forever.

רצה הרצון העליון לגלות ולברר אמתת יחודו... מה שהוא מסתיר פניו ונותן מקום לרע לימצא, עד שיחזור ויגלה טובו, והרע לא ימצא עוד, ונראה יחוד ממשלתו

"The Supreme Will wanted to reveal and make clear the truth of His oneness. ... He hides His face and makes room for evil to exist, until He reveals His goodness again, evil is gone, and His sole rule is seen."

Ramchal, Da'at Tevunot 42

The Gemara finds Queen Esther in the Torah's words "I will surely hide My face," haster astir (Devarim 31:18; Chullin 139b). Megillat Esther never mentions God's name, and He runs every line of it.

Where the picture breaks No program can truly choose. Its output is fixed by the code, or random. The Rambam says "no one forces him and no one pulls him" (Hilchot Teshuvah 5:2). God wanted people to choose, the way He wanted fire to go up, and that is why a person can be judged for what he does (5:4).

Next questionThe hiding makes room for one being who can choose. So what is my part?
Question 7

So what is my part?

Everything so far runs from the top down. Only one thing moves the other way.

ונמצאו בעולם ב׳ תנועות כלליות הפכיות. הא׳ טבעית מוכרחת וב׳ בחיריית. הא׳ מלמעלה למטה והב׳ מלמטה למעלה

"So there are two general movements in the world, opposite each other. One is natural and forced, and one is by choice. The first goes from above to below, and the second from below to above."

Ramchal, Derech Hashem 1:5:4
From above forced: angels, nature From below by choice: only you
Two movements in the world, and only one of them is by choice (Ramchal, Derech Hashem 1:5:4).

The Nefesh HaChaim reads "Hashem is your shadow" (Tehillim 121:5) this way: a shadow moves the way you move. So, "so to speak," God chose to move the worlds the way a person moves below (1:7). Smile at your shadow, says the midrash it quotes, and it smiles back.

That is the reason for the whole system: "God desired to have a dwelling place in the lower realms" (Midrash Tanchuma, Nasso 16). The layer with the most hiding is where the point of it all happens. That is why every person must say "the world was created for me" (Mishnah Sanhedrin 4:5).

And one more power no angel has: teshuvah. Reish Lakish says teshuvah out of fear makes sins done on purpose count like accidents, and teshuvah out of love makes them count as merits (Yoma 86b). For wrongs against people, it works only after you make it right with them (Mishnah Yoma 8:9). The past is not deleted. It is put to work for the good.

Where the picture breaks This is not people hacking God. Man can move the world only "because the Master wanted man to be able to choose" (Derech Hashem 1:5:4). And even the bad people choose does not come from "another domain." "In the end it is certainly good, and then it will be known that there is no domain but His" (Klach Pitchei Chochmah 2:2).

Last questionThat is the whole picture. Now, as promised: where does it stop?
Question 8

Where does the picture stop?

1There is no hardware without Him.

The world, down to the ground, is spoken into being every moment.

2The layers are hiding, not distance.

God fills every world equally.

3Angels are alive.

They just have no power of their own.

4Choice is not code.

No program chooses. People do, because God wanted it that way.

5He is not part of the system.

Not the top layer, and not the programmer down the hall.

Rav Kook (Rabbi Avraham Yitzchak HaKohen Kook, the first Ashkenazi Chief Rabbi of the Land of Israel, 1900s) gives the reason to let the picture go. Any picture of God we hold on to, even a smart one, becomes a kind of idol. A picture is useful only as a "spark" pointing past itself.

כל הגדרה באלקות מביאה לידי כפירה, ההגדרה היא אליליות רוחנית

"Every definition of God leads to denial. Definition is spiritual idol worship."

Rav Kook, Orot, Zeronim, Yissurim Memarkim 3

The Rambam ends in the same place. On "To You, silence is praise" (Tehillim 65:2), he writes: "silence before You is the praise" (Moreh Nevuchim 1:59).

Common questions

Is it allowed to compare God to a computer?

As a picture of how He runs the world, yes, with limits. The prophet Hoshea compares God to a lion "to let the ear hear what it can" (Rashi on Shemot 19:18), and the Midrash compares creation to a builder with plans (Bereishit Rabbah 1:1). The limits: it describes His actions, not Him (Moreh Nevuchim 1:54), and it must never suggest the world runs without Him (Tanya, Sha'ar HaYichud 2).

Is this the same as the idea that we live in a simulation?

No. A simulation is fake, and it runs on someone else's machine. In the Torah's picture the world is completely real. It is real because God keeps it in existence every moment, and it exists for a purpose: that people would choose good and make it a home for Him (Midrash Tanchuma, Nasso 16).

Do angels have free will?

No. Tanya says their love and fear of God are natural to them because they have no free choice (Likkutei Amarim 39), and the Nefesh HaChaim calls an angel "one single, specific power" (1:10). That is why a person, who can choose and grow, can rise higher than an angel.

Can I pray to an angel?

Prayer goes to God alone. That is the fifth of the Rambam's Thirteen Principles: not to angels, stars or any other creation, "even as go-betweens." The Yerushalmi says: "Do not cry out to Michael or Gavriel. Cry out to Me" (Berachot 9:1). Some well-known prayers and songs speak to angels, and the poskim discuss how to understand them. Ask your rav.

Why did three angels come to Avraham?

Because there were three jobs, and "one angel does not do two missions" (Bereishit Rabbah 50:2; Rashi on Bereishit 18:2). The Gemara names them: Michael told Sarah about her son, Refael healed Avraham, and Gavriel overturned Sedom (Bava Metzia 86b).

What is tzimtzum?

The Arizal teaches that before creation God's light filled everything, and God "contracted Himself" to make room for worlds (Etz Chaim, Sha'ar 1). Tanya and the Nefesh HaChaim both explain that this does not mean God moved away. It means He is hidden (Tanya, Sha'ar HaYichud 7; Nefesh HaChaim 3:7).

Did Rav Kook compare the world to a machine?

No. The computer picture is ours. Rav Kook gives the rules for using it: any definition of God, held on to, becomes a kind of idol (Orot, Yissurim Memarkim 3). He calls the fullest understanding of God a soul and a body: God's relationship to the world is like a soul's relationship to the body it gives life to (Orot HaTechiyah 1).

Keep learning

Hebrew texts are from Sefaria. English renderings and explanations are Torah Tech originals, and any mistakes are ours. The computer comparison is ours too, not the sources'.

This page is for learning. It is not a halachic ruling.

Torah Tech · torahtech.co/source · The Opportunity Year in Tel Aviv · Learn more and apply at torahtech.co
The Opportunity Year · Tel Aviv, Israel

Learn like this for a year

Torah Tech is a beit midrash in Tel Aviv built for personal and professional growth: Torah learning at the center of every day, and internships at Israeli startups. It is the year a future Jewish leader realizes who he can become, and chooses to become it.