JPS6224818B2 - - Google Patents

Info

Publication number
JPS6224818B2
JPS6224818B2 JP56134427A JP13442781A JPS6224818B2 JP S6224818 B2 JPS6224818 B2 JP S6224818B2 JP 56134427 A JP56134427 A JP 56134427A JP 13442781 A JP13442781 A JP 13442781A JP S6224818 B2 JPS6224818 B2 JP S6224818B2
Authority
JP
Japan
Prior art keywords
random number
display
displayed
key
dice
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired
Application number
JP56134427A
Other languages
Japanese (ja)
Other versions
JPS5835641A (en
Inventor
Toshihiko Sumya
Kenichiro Yoneda
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sharp Corp filed Critical Sharp Corp
Priority to JP56134427A priority Critical patent/JPS5835641A/en
Publication of JPS5835641A publication Critical patent/JPS5835641A/en
Publication of JPS6224818B2 publication Critical patent/JPS6224818B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators

Description

【発明の詳細な説明】[Detailed description of the invention]

本発明はキー手段により任意に指定した数を最
大値として、その数の範囲内で適宜乱数を発生し
得る新規な乱数発生装置に関するものである。 従来の乱数発生装置は、発生する乱数の最大値
が予め固定的に定められているためにその使用範
囲に制限があつた。また、プログラム機能を備え
たものはその最大値の変更は可能であるが、複雑
なプログラム上の手続を必要とするためにほとん
ど実用に供し得ないものであつた。 それゆえ、本発明の目的は、乱数の最大値を簡
単に変更できて、その使用範囲に全く制限されな
い汎用性に富んだ乱数発生装置の提供にある。 本発明のもう1つの目的は、乱数表示に工夫を
施してゲーム性を加味すると共に、乱数表示をよ
り一層見易くした乱数発生装置の提供にある。 本発明の他の目的は、操作性に優れた乱数発生
装置の提供にある。 以下図にもとづいて本発明装置の一実施例を詳
細に説明する。 第1図は本発明装置を電子式卓上計算機に搭載
した例を示す。図中、1は中央処理装置
(CPU)、2は読み出し専用メモリー(ROM)、3
は読み出し/書込みメモリー(RAM)、4は計算
に必要な0〜9の置数キー、フアンクシヨンキ
ー、オンクリアキーON/C及び乱数発生キー
RNDを備えたキーボード、5は表示バツフア、
6は表示体である。 上記CPU1はROM2に予め書き込まれた手順
に従つてキーを読んだり、或いはROM3の内容
を表示体6に表示する等の制御を行なう。 上記ROM2はキーの読み込みや表示を行なう
ための手順及びRAM3に書き込まれた数値、数
式に従つて演算等の動作を行なう手順を記憶す
る。一方、RAM3は数値及び数式を記憶するメ
モリであり、この他、CPU1の処理過程で用い
られる種々の条件フラツグ、カウンタも記憶す
る。 第2図は本発明装置に用いられるRAMの一部
を示すもので、特に、演算結果とか発生させた乱
数を記憶するレジスタXと、乱数表示の際に置数
キーにより指定した数を乱数のとり得る最大の数
として記憶し、又、通常は“6”という数をその
最大の数として記憶するレジスタMAXを備えて
いる。 SはCPU1からのストローブ信号、Kはキー
ボードKEY4から出力されるキー信号である。 上記表示体6は演算結果の表示エリアの他に乱
数表示エリアを備えている。この乱数表示エリア
では後述のサイコロ表示(2個同時に表示でき
る)コイン表示が可能なように構成されている。 即ち、第3図は置数キーにて設定した乱数のと
り得る最大の数が“3”以上のときの表示例であ
つて、この場合はa〜iの1個若しくは2個のサ
イコロ表示となる。 一方、第4図は設定した数が“2”のとき、即
ち結果が“1”か“2”の2通りのときの表示例
を示し、この場合はコインを投じたときの飛跡7
とその結果を意味する白丸(表側)8若しくは黒
丸(裏側)9とによるコイン表示となる。上記飛
跡7は第5図l〜pに示すように分割された各セ
グメントが順に点灯されてあたかもコインが投じ
られたように表示され、この飛跡の表示完了後に
コインを投じた結果である表(白丸)若しくは裏
(黒丸)が表示されるように構成されている。 次に乱数表示の際のキー操作について述べる。 まず、乱数のとり得る最大の数を“3”以上に
設定するときには、たとえば、
The present invention relates to a novel random number generation device that can appropriately generate random numbers within the range of a number arbitrarily designated by a key means as the maximum value. Conventional random number generators have a limited range of use because the maximum value of random numbers to be generated is fixed in advance. Furthermore, although it is possible to change the maximum value with a programmable function, it is almost impossible to put it to practical use because it requires complicated programming procedures. Therefore, an object of the present invention is to provide a versatile random number generator that can easily change the maximum value of random numbers and is not limited in its range of use. Another object of the present invention is to provide a random number generation device that adds a gaming aspect to the random number display by making the random number display even easier to see. Another object of the present invention is to provide a random number generator with excellent operability. An embodiment of the apparatus of the present invention will be described in detail below based on the drawings. FIG. 1 shows an example in which the device of the present invention is mounted on an electronic desktop calculator. In the figure, 1 is the central processing unit (CPU), 2 is the read-only memory (ROM), and 3 is the central processing unit (CPU).
is the read/write memory (RAM), 4 is the 0 to 9 numeric keys necessary for calculation, the function key, the on clear key ON/C, and the random number generation key.
Keyboard with RND, 5 is display buffer,
6 is a display body. The CPU 1 performs controls such as reading keys or displaying the contents of the ROM 3 on the display 6 according to a procedure written in the ROM 2 in advance. The ROM 2 stores procedures for reading and displaying keys and procedures for performing calculations and other operations according to numerical values and formulas written in the RAM 3. On the other hand, the RAM 3 is a memory that stores numerical values and formulas, and also stores various condition flags and counters used in the processing process of the CPU 1. Figure 2 shows a part of the RAM used in the device of the present invention. In particular, it shows a register X that stores calculation results and generated random numbers, and a register It is provided with a register MAX which stores the maximum possible number and usually stores the number "6" as the maximum number. S is a strobe signal from the CPU1, and K is a key signal output from the keyboard KEY4. The display body 6 has a random number display area in addition to the display area for calculation results. This random number display area is configured to be able to display dice (two dice can be displayed at the same time) and coins, which will be described later. That is, Fig. 3 is an example of a display when the maximum possible random number set using the number key is "3" or more, and in this case, one or two dice of a to i are displayed. Become. On the other hand, Fig. 4 shows an example of the display when the set number is "2", that is, there are two results, "1" or "2". In this case, the trajectory 7 when the coin is thrown is shown.
The coin is displayed with a white circle (front side) 8 or a black circle (back side) 9 indicating the result. The track 7 is displayed as if a coin had been thrown by lighting up each divided segment in turn as shown in Figure 5 l to p, and after the display of this track is completed, the table ( The screen is configured so that the back (white circle) or the back (black circle) is displayed. Next, key operations when displaying random numbers will be described. First, when setting the maximum possible random number to "3" or more, for example,

【式】の順でキー操作す る。この場合、最初のPress the keys in the order of [expression]. Ru. In this case, the first

【式】キーの操作でサ イコロ表示エリア内の二個のサイコロの内容がそ
れぞれランダムに変更表示され、これが乱数表示
のスタートとなる。そして、二度目の
By operating the [Formula] key, the contents of the two dice in the dice display area are randomly changed and displayed, and this is the start of random number display. And the second time

【式】 キー操作後しばらくしてから表示内容がストツプ
し、この場合1〜9までの乱数が二個のサイコロ
表示エリアで2通り同時に表示される。 又、乱数のとり得る最大の数を“2”に設定す
る場合は、
[Formula] After a while after the key operation, the display contents stop, and in this case, two random numbers from 1 to 9 are displayed simultaneously in the two dice display areas. Also, if you want to set the maximum possible random number to "2",

【式】の順にキー操作 する。この場合は第4図のj又はkの如くコイン
表示となる。 更に、上記最大の数を指定しない場合は、
Operate the keys in the order of [expression]. In this case, the coins will be displayed as j or k in FIG. Additionally, if you do not specify the maximum number above,

【式】の如くキー操作する。 この場合は乱数のとり得る最大の数が自動的に
“6”に設定されて、1〜6までの乱数がサイコ
ロ表示される。 なお、乱数のとり得る最大の数を“0”又は
“1”というように、乱数をとり得ない数のとき
も上記同様、自動的に“6”に設定されるように
構成されている。 第6図はフローチヤートを示し、この図により
今少し詳細に動作を説明する。 まずジヤツジJ1において、乱数発生が実行され
る直前に数値が計算機に入力されているか否かを
判定し、入力されているときはジヤツジJ2に移行
してその数値が“3”以上か否かの判定を行う。
判定の結果、否であれば更にジヤツジJ3に進んで
入力された数値が“2”に等しいか否かの判定を
行なう。 ここで、入力された数値が“2”に等しいとき
は点線イで囲んだコイン表示のフローに入る。即
ち、まずステツプA1にてコインの飛跡表示を行
なう(第5図l〜p参照)。そしてジヤツジJ4
よりその飛跡表示の完了を確認すると、ステツプ
A2に進んで読み出し書込みメモリーRAM3のレ
ジスタXにおいて乱数を発生させてコインの表裏
を決定し、ステツプA3において第4図j若しく
はkの如くコイン表示を行う。 一方、前記ジヤツジJ1における判定の結果、ま
だ数の指定が成されていない場合、或いはジヤツ
ジJ2及びJ3による判定の結果、指定した数が0又
は1のときはサイコロ表示フローロのステツプ
A4に進み、前記読み出し書込みメモリーRAM3
のレジスタMAXに予め設定された数値6を記憶
させて、以後、1〜6までの乱数表示となる。 更に、前記ジヤツジJ2の判定の結果、置数が3
以上のときは上記同様サイコロ表示フローロのス
テツプA5に移行し、この場合は置数をそのまま
上記RAM3のレジスタMAXに記憶するものとな
つている。 この様に、レジスタMAXに“3”以上の数値
が記憶されると、1回目のRNDキー操作でステ
ツプA6に進み、上記レジスタMAXに記憶されて
いる数値の範囲内で上記レジスタXに乱数を発生
させる。そして、ステツプA7では上記レジスタ
Xにおける乱数発生に関係して、乱数をランダム
にサイコロ表示し(第3図参照)、2回目のRND
キー操作で、その表示内容を適当なところで停止
して乱数のサイコロ表示を実行する(ジヤツジ
J5)。 このようにして、乱数の最大数を適当に指定し
て、その数の範囲内の乱数を得て、サイコロ、コ
イン等のシンボル表示をすることが出来、又特に
数を指定しないとき等は自動的に予め定められた
数の範囲内で乱数を発生させることが出来る。 尚、ジヤツジJ5における終了の判定はコイン表
示の場合のように回転で判定しても、又、計算機
外部よりのキー操作に関連して行なうようにして
もよい。 以上、詳細に説明したように本発明の装置によ
れば、単なるキー操作だけで乱数の最大値を極め
て容易に変更することが出来、また乱数をシンボ
ルにて表示するので、ゲーム性を加味することが
でき、同時に表示が一層見易くなる。 更に、通常は自動的に予め設定した数の範囲内
で乱数発生が行なわれるようになつているので、
その設定数を使用頻度に応じて決定しておけば、
操作性を著しく向上させることが出来る等、従来
の乱数発生装置にない優れた効果を奏することが
できる。
Operate the keys as shown in [Formula]. In this case, the maximum possible random number is automatically set to "6", and random numbers from 1 to 6 are displayed on the dice. Note that even when the maximum possible random number is "0" or "1", the maximum number that can be taken as a random number is automatically set to "6" as described above. FIG. 6 shows a flowchart, and the operation will now be explained in more detail with reference to this diagram. First, in J1 , it is determined whether or not a numerical value has been input into the calculator immediately before random number generation is executed, and if it has been input, the process moves to J2 and checks whether the numerical value is "3" or more. Make a judgment.
If the result of the determination is negative, the process further advances to J3 to determine whether the input numerical value is equal to "2" or not. Here, if the input numerical value is equal to "2", the process enters the coin display flow surrounded by the dotted line A. That is, first, in step A1 , the trajectory of the coin is displayed (see FIG. 5, l to p). Then, when you confirm the completion of the track display using J4 , the step
Proceeding to step A2 , a random number is generated in the register X of the read/write memory RAM 3 to determine whether the coin is front or back, and the coin is displayed as shown in FIG. 4j or k in step A3 . On the other hand, if the result of the judgment in J1 is that the number has not been specified yet, or if the specified number is 0 or 1 as a result of the judgment in J2 and J3 , the step of the dice display flow is executed.
Proceed to A 4 and read/write memory RAM3.
The preset value 6 is stored in the register MAX, and from then on, random numbers from 1 to 6 are displayed. Furthermore, as a result of the judgment of J2 , the number is 3.
In the above case, the process moves to step A5 of the dice display flow similar to the above, and in this case, the set number is stored as it is in the register MAX of the RAM 3. In this way, when a value of "3" or more is stored in the register MAX, the first RND key operation advances to step A6 , and a random number is stored in the register X within the range of the value stored in the register MAX. to occur. Then, in step A7 , a random number is randomly displayed on the dice in relation to the random number generation in the register
By key operation, the display contents are stopped at an appropriate point and a random number dice is displayed.
J5 ). In this way, you can specify the maximum number of random numbers, obtain random numbers within the range, and display symbols such as dice or coins, or automatically when you do not specify a number. It is possible to generate random numbers within a predetermined number range. It should be noted that the determination of the end of the arrow J5 may be made by rotation as in the case of coin display, or may be made in conjunction with a key operation from outside the computer. As explained above in detail, according to the device of the present invention, the maximum value of the random number can be changed extremely easily with a simple key operation, and since the random number is displayed as a symbol, it is possible to add a game effect. At the same time, the display becomes easier to see. Furthermore, random number generation is usually performed automatically within a preset number range, so
If you decide the number of settings according to the frequency of use,
It is possible to achieve excellent effects not found in conventional random number generators, such as significantly improving operability.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明装置を電子式卓上計算機に搭載
したときのブロツク構成図、第2図は読み出し書
込みメモリーの構成図、第3図a〜i、第4図
j,k及び第5図l〜pは乱数の表示例を説明す
るための図、第6図はフローチヤート図である。 1は中央処理装置、2は読み出し専用メモリー
(ROM)、3は読み出し書込みメモリー
(RAM)、4はキーボード、5は表示バツフア、
6は表示体、ON/Cはオンクリアキー、RNDは
乱数発生キー。
Figure 1 is a block configuration diagram when the device of the present invention is installed in an electronic desk calculator, Figure 2 is a configuration diagram of a read/write memory, Figures 3 a to i, Figures 4 j and k, and Figure 5 l. ~p is a diagram for explaining an example of displaying random numbers, and FIG. 6 is a flowchart. 1 is a central processing unit, 2 is a read-only memory (ROM), 3 is a read-write memory (RAM), 4 is a keyboard, 5 is a display buffer,
6 is the display body, ON/C is the on clear key, and RND is the random number generation key.

Claims (1)

【特許請求の範囲】 1 キー手段により任意に指定した数を最大値と
して、その数の範囲内で適宜乱数を発生させる手
段と、 該手段で得られた乱数を、前記指定した最大値
に応じて異なるシンボルで表示する手段を備えた
ことを特徴とする乱数発生装置。
[Scope of Claims] 1. Means for appropriately generating random numbers within the range of a number arbitrarily specified by a key means, with the maximum value set as a maximum value; A random number generator comprising means for displaying different symbols in different symbols.
JP56134427A 1981-08-25 1981-08-25 Random number generating device Granted JPS5835641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56134427A JPS5835641A (en) 1981-08-25 1981-08-25 Random number generating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56134427A JPS5835641A (en) 1981-08-25 1981-08-25 Random number generating device

Publications (2)

Publication Number Publication Date
JPS5835641A JPS5835641A (en) 1983-03-02
JPS6224818B2 true JPS6224818B2 (en) 1987-05-30

Family

ID=15128121

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56134427A Granted JPS5835641A (en) 1981-08-25 1981-08-25 Random number generating device

Country Status (1)

Country Link
JP (1) JPS5835641A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5317044A (en) * 1976-07-30 1978-02-16 Sharp Corp Random number generating unit
JPS5370869A (en) * 1976-12-07 1978-06-23 Seiko Instr & Electronics Ltd Electronic watch

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5317044A (en) * 1976-07-30 1978-02-16 Sharp Corp Random number generating unit
JPS5370869A (en) * 1976-12-07 1978-06-23 Seiko Instr & Electronics Ltd Electronic watch

Also Published As

Publication number Publication date
JPS5835641A (en) 1983-03-02

Similar Documents

Publication Publication Date Title
US6292854B1 (en) Method and apparatus for providing high quality audio in a computer system
US4519044A (en) Small-sized electronic calculator capable of functioning as a musical instrument
JPS6224818B2 (en)
JPH0433670A (en) Display controller for game machine
JPS6235789B2 (en)
JPS58159778A (en) Electronic apparatus with game function
JP2670170B2 (en) Score input method
JPS63106781A (en) Musical score display for electronic musical apparatus
JPS5837560B2 (en) Electronic musical instrument preset device
JP2595045B2 (en) Touch panel input device
JP3684640B2 (en) Vending machine display device
JPS59140541A (en) Character processing device
JPS59127157A (en) Test data generator
JPS603649B2 (en) random number generator
JPH05297870A (en) Touch detecting device for key of electronic musical instrument
JPS59111682A (en) Pattern generator
JPS5910982A (en) Electronic learning apparatus
JPH028990A (en) Control circuit for vending machine
JPH01185727A (en) Information processor
JPS55108074A (en) Electronic type cash register
JPS6226496B2 (en)
JPH04213718A (en) Input device
JPH056365A (en) Document processor
JPS60254075A (en) Type practicing apparatus
JPS5663631A (en) Chinese character input device