Электроника МК-61/Random Numbers Finished Translation

From Wiki

Jump to: navigation, search

8.5 Calculations with the pseudorandom number generator

The pseudorandom number generator can be used to obtain pseudorandom sequences of numbers. Sequences obtained on the calculator include acyclic and periodic parts. Lengths of these parts, their structure and distribution over the interval from 0 to 1 depends on the contents of the Y register and storage registers(?). Starting with identical initial conditions results in obtaining the same sequence of numbers.

The program [П→X] [0] [В↑] [K] [СЧ] [X→П] [0] [С/П] [БП] [0] [0] will produce a pseudorandom sequence of numbers on the display. The value in register zero determines the sequence of numbers. For example, this program, entered and executed with all registers initially cleared, will produce a fixed sequence of numbers containing 89 numbers in the acyclic part and 145 numbers in the periodic part.

Notes:

1. Formal program listing, translated

00 60 П→X 0 recall 0
01 0E В↑ enter
02 3L [K] СЧ rand
03 40 X→П 0 store 0
04 50 С/П R/S
05 51 БП goto
06 00 00 00

2. While it's true that if you enter this program at powerup and execute it before doing anything else you will always get the same sequence. But merely clearing the stack and storage registers isn't sufficient to restart the sequence. Re-entering a specific value into register zero doesn't guarantee the sequence, either.

3. In the first paragraph, I use the phrase "storage registers". The machine translation gives this as "service cells of memory". I don't know whether these are the same thing. Is there a memory segment that I do not have direct access to? служебных means "service", but also means "secondary" or "auxiliary". Other than register zero, I see nothing happening in registers or in the weirder areas of program memory.

Back to Электроника МК-61

Personal tools