Why Nostr? What is Njump?
/ balooun
npub1tfx…4mkt
2023-11-30 18:33:26
in reply to nevent1q…f3rq

balooun on Nostr: Bedienungsanleitung Diese Computersimulation zeigt Ihnen, wie ein Computer arbeitet ...

Bedienungsanleitung

Diese Computersimulation zeigt Ihnen, wie ein Computer arbeitet und wie Sie ihn programmieren. Dabei geht es ums Prinzip. Erfahren Sie, wie man mit einem Grundgerüst aus ganz weigen Befehlen Programme schrieben kann, die komplizierte Probleme lösen.

Für Ihr erstes Programmbeispiel - eine Addition -, das wir schon einmal in den Programmspeicher geschrieben haben, benötigen Sie nur eine Anzahl Streichhölzer und einen Stift (Kugelschrieber oder Bleistift). Der Stift dient als Programmzeiger, damit Sie immer wissen, was zu tun ist.

Die Streichhölzer werden in den Datenregistern zu Zahlen zusammengelegt. Der Computer wird diese Zahlen manipulieren, indem er Streichhölzer dazulegt oder wegnimmt.

Der Aufbau der Maschine

Legen Sie Ihren Stift als Programmzeiger zu Beginn der Simulation immer so aufs Formular, daẞ seine Spitze auf Programmspeicherzelle Nr. 1 zeigt. Also Startspellung wie eingezeichnet. Neben den Programmspeicher-Zellen-Nummern finden Sie die Inhalte der Zellen un könen am Befehlssymbol (in der ersten Zelle ist es 1) erkennen, welcher befehl auszuführen ist. Nach dem Befehlssymbol folgt eine Zahl. Sie gibt an, welches Datenregister betroffen ist, oder wohin der Programmzähler neu zeigen soll. Im Kasten unten im Know-how-computer steht die Beschreibung eines jeden Befehls. Dort is für die ja nur im konkreten Fall bestimmte Zahel XX als Platzhalter geschrieben. Wenn Ihr Programmzähler also am Anfang auf die Speicherzelle 1 zeigt, dann lesen Sie bei unserem Additionsprogramm s 4. In der Mitte unten steht, was bei s zu tun ist: Setzen Sie an Stelle von XX diesmal 4 ein also PC auf Programmspeicher-Zelle 4.

Wenn Sie eine 1 addieren sollen, dann legen Sie einfach ein zusätzliches Streichholz in das vom Programmbefehl angesprochene Datenregister zu den dort möglicherweise schon vorhandenen. Beim Subtrahieren einer 1 nehmen Sie ein Streichholz weg.

Wenn Sie den Programmzähler um 1 erhöhen sollen, lassen Sie die Spitze einfach auf die nächste Zelle zeigen, die auf die momentane Stellung folgt. Und wie bereits erwähnt, wenn Sie den PC auf XX setzen sollen, dann lassen Sie die Spitze auf die XXte Programm-Speicher-Zelle zeigen.

...

Program-Speicher

Program-Speicher Zellen-Nummern

. . .

Der Know How Computer

Entwickelt von Wolfgang Back (WDR) und Ulrich Rohde (PC Magazin)

. . .

Programmzähler PZ

. . .

Die Befehle:

+ = Addiere 1 zum Inhalt von Datenregister XX und erhöhe PZ um 1

- = Subtrahiere 1 vom Inhalt von Datenregister XX un erhöhe PZ um 1

S = Setze PC auf XX

O = Prüfe, ob der Inhalt vom Datenregister XX gleich 0 ist. Wenn ja, dann erhöhe PZ um 2; wenn nein, dann erhöhe PZ um 1

Stop = Stop

. . .

Datenregister

...

Alles klar? Dann starten Sie das Spiel mit dem Computer.

Ein einfaches Additionsprogramm haben wir für Sie schon im Programmspeicher vorbereitet. Legen Sie dazu eine Anzahl Streichhölzer in das Datenregister 1 und eine andere Anzahl in das Datenregister 1 und eine andere Anzahl in das Datenregister 2. Am besten mehr als eins aber weniger als fünf, damit die Sache am Anfang nicht zu mühsam wird.

Der Programmzähler (Stift) muẞ jetzt zu Beginn auf die Programmspeicherzelle 1 zeigen. Lesen Sie den Inhalt der angezeigten Programm-speicherzelle und vergleichen Sie anhand des Symbols, welcher Befehl ausgeführt werden soll.

Der erste Befehl lautet s 4

Das erste Symbol ist ein s, also führen Sie den Befehl s aus: Sie sollen den Programmzähler auf Programm-speicherzelle 4 setzen. Also lassen Sie die Stiftspitze auf Zelle 4 zeigen. Dort steht 0 2.

Der neue Befehl lautet 0, bitte führen Sie ihn aus. Anstelle von XX setzen Sie jetzt die 2 ein: Sie sollen prüfen, ob der Inhalt des Datenregisters 2 Null ist.

Angenommen, es liegt mindestens ein Streichholz in Datenregister 2, dann bewegen Sie den Programm-zähler um genau eine Stelle weiter, die Spitze zeigt dann auf Programmspeicherzelle 5. Dort steht s 2. Also s durchführen, dabei XX durch 2 ersetzen. Der Programmzähler zeigt jetzt auf die zweite Programmspeicherzelle.

Der Befehl darin lautet +1. Zur Ausführung müssen Sie zum Inhalt von Datenregister 1 ein Streichholz dazulegen und den Programmzähler um 1 erhöhen - er zeigt dann auf die Zelle 3. Dort steht - 2. Sie müssen also aus Datenregister 2 ein Streichholz wegnehmen und wieder den Programmzähler um 1 erhöhen.

Er zeigt dann wieder auf Befehlszelle mit dem Inhalt 0 2. Erneut prüfen Sie, ob im zweiten Datenregister keine Streichhölzer mehr liegen. Wenn doch, dann wiederholt sich das Ganze mit dem Befehl s 2 in Befehlszelle 5. Wenn aber Datenregister 2 Null ist, dann müssen Sie jetzt den Programmzeiger um 2 Stellen weiterbewegen, er zeigt dann auf Befehlszelle 6, darin steht Stop.

Was tut das Trainingsprogramm? Es addiert einfach die Zahlen in Register 1 und 2, indem es den Inhalt von Register 1 solange um ein Streichholz erhöht, solange es aus Register 2 eins wegnehmen kann. Als Ergebnis steht die Summe dann in Register 1. So einfach denkt ein Computer.
...
...
...
English
...
User manual

This computer simulation shows you how a computer works and how to program it. This is about principle. Learn how to write programs that solve complicated problems with a basic framework of completely different commands.

For your first program example - an addition - that we have already written to the program memory, you only need a number of matches and a pen (ballpoint pen or pencil). The pen serves as a program pointer so that you always know what to do.

The matches are merged into numbers in the data registers. The computer will manipulate these numbers by adding or taking away matches.

The structure of the machine

As a program pointer, always place your pen on the form at the beginning of the simulation so that its tip points to program memory cell No. 1. So Startspellung as indicated. In addition to the program memory cell numbers, you will find the contents of the cells and you can recognize which command to execute by the command symbol (in the first cell it is 1). The command symbol is followed by a number. It indicates which data register is affected, or where the program counter should point again. In the box at the bottom of the know-how computer is the description of each command. There is written XX as a placeholder for the numbers that are only determined in the specific case. So if your program counter points to memory cell 1 at the beginning, then read our addition program s 4. In the middle at the bottom it says what to do with s: Instead of XX this time 4, put a PC on program memory cell 4.

If you want to add a 1, then just put an additional match in the data register addressed by the program command to the ones that may already be there. When subtracting a 1, they take away a match.

If you want to increase the program counter by 1, just let the tip point to the next cell that follows the current position. And as already mentioned, if you want to set the PC to XX, then let the tip point to the XXth program memory cell.

...

Program memory

Program Memory Cell Numbers

. . .

The Know How Computer

Developed by Wolfgang Back (WDR) and Ulrich Rohde (PC Magazin)

. . .

Program counter PZ

. . .

command:

+ = Add 1 to the content of data register XX and increase PZ by 1

- = Subtract 1 from the content of data register XX and increase PZ by 1

S = Set PC to XX

O = Check whether the content of the data register XX is equal to 0. If yes, then increase PZ by 2; if no, then increase PZ by 1

Stop = Stop

. . .

Data Register

...

Are you all right? Then start the game with the computer.

We have already prepared a simple addition program for you in the program memory. To do this, put a number of matches in the data register 1, and another number in the data register 1, and another number in the data register 2. It is best to put more than one but less than five, so that the matter does not become too troublesome at the beginning.

The program counter (pin) must now point to the program memory cell 1 at the beginning. Read the contents of the displayed program memory cell and use the icon to compare which command should be executed.

The first command is s 4

The first symbol is an s, so execute the command s: you should set the program counter to program memory cell 4. So let the pen tip point to cell 4. There is 0 2 there.

The new command is 0, please run it. Instead of XX, you now use the 2: you should check whether the content of the data register 2 is null.

Suppose there is at least one match in data register 2, then move the program counter by exactly one place further, the tip then points to program memory cell 5. There it says s 2. So perform s, replacing XX with 2. The program counter now points to the second program memory cell.

The command in it is +1. For execution, you need to add a match to the contents of data register 1 and increase the program counter by 1 - it will then point to cell 3. There it says - 2. So, you need to take a match from data register 2 and again increase the program counter by 1.

He then points again to command cell with content 0 2. Check again whether there are no more matches in the second data register. If so, then the whole thing is repeated with the command s 2 in command cell 5. But if data register 2 is zero, then you now have to move the program pointer by 2 digits, it then points to command cell 6, it says Stop.

What does the training program do? It simply adds the numbers in registers 1 and 2 by incrementing the contents of register 1 by one match as long as it can take one away from register 2. As a result, the sum is then in register 1. That's how simple a computer thinks.
Author Public Key
npub1tfx5r3eychv8rlz2jjcm5uaejkdqw4k7rjwrh7y8u50kny79xuvswz4mkt