JPS6025612Y2 - random number generator - Google Patents

random number generator

Info

Publication number
JPS6025612Y2
JPS6025612Y2 JP7660680U JP7660680U JPS6025612Y2 JP S6025612 Y2 JPS6025612 Y2 JP S6025612Y2 JP 7660680 U JP7660680 U JP 7660680U JP 7660680 U JP7660680 U JP 7660680U JP S6025612 Y2 JPS6025612 Y2 JP S6025612Y2
Authority
JP
Japan
Prior art keywords
key
circuit
signal
counter
auto power
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
JP7660680U
Other languages
Japanese (ja)
Other versions
JPS575748U (en
Inventor
久志 伊藤
Original Assignee
カシオ計算機株式会社
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 カシオ計算機株式会社 filed Critical カシオ計算機株式会社
Priority to JP7660680U priority Critical patent/JPS6025612Y2/en
Publication of JPS575748U publication Critical patent/JPS575748U/ja
Application granted granted Critical
Publication of JPS6025612Y2 publication Critical patent/JPS6025612Y2/en
Expired legal-status Critical Current

Links

Landscapes

  • Calculators And Similar Devices (AREA)

Description

【考案の詳細な説明】 この考案はオートパワーオフ機能を備えた小型電子式計
算機に於て、効果的に乱数を発生するようにした乱数発
生装置に関する。
[Detailed Description of the Invention] This invention relates to a random number generation device that effectively generates random numbers in a small electronic calculator equipped with an auto power-off function.

一般に等確率性と無規則性を有する数列を乱数と称して
いるが、この様な乱数を発生させる方法として、演算に
よるものと、カウンタを用いるものとがある。
Generally, a sequence of numbers having equal probability and irregularity is called a random number, and methods for generating such random numbers include those using calculations and those using counters.

前者では、所定の初期値を例えば平方様中法、乗算合同
法、及び混合型合同法等の方法により、順次演算して乱
数を得る様にし、また後者では、例えばカウンタを比較
的速いクロックにより常時計数駆動させ、必要に応じて
上記カウンタの内容を取り出し、これを乱数としている
In the former, random numbers are obtained by sequentially calculating predetermined initial values using methods such as square-like middle method, multiplicative congruence method, and mixed congruence method, and in the latter method, for example, the counter is operated by a relatively fast clock. The counter is constantly driven and the contents of the counter are taken out as needed and used as random numbers.

しかしながら、前者の方法では、初期値が同じであれば
同じ乱数が発生するため初期値の設定に困難があり、ま
た複雑な計算のため制御命令等が複雑となる欠点があっ
た。
However, the former method has the disadvantage that it is difficult to set the initial value because the same random number will be generated if the initial value is the same, and that the control commands etc. are complicated due to complicated calculations.

更に、後者の方法では、カウンタの駆動のためのクロッ
クを比較的速くすれは容易に精度の高い乱数が得られる
が、反面乱数発生のための専用のカウンタが必要となり
、回路構成が複雑となるといった欠点があった。
Furthermore, in the latter method, highly accurate random numbers can be easily obtained by making the clock for driving the counter relatively fast, but on the other hand, a dedicated counter for random number generation is required, making the circuit configuration complicated. There were some drawbacks.

一方、最近、消費電力の節減にため、計算機がオン状態
に一定時間キー操作が威されないと自動的に計算機をオ
フにするようなオートパワーオフ機能を備えた計算機が
実用化されている。
On the other hand, recently, in order to save power consumption, computers have been put into practical use that have an auto power-off function that automatically turns off the computer if no key operations are performed for a certain period of time while the computer is on.

このような計算機は、キー操作が一定時間操作されなか
ったことを判断するためにキー操作の時間間隔を計時す
る専用のカウンタが設けられている。
Such a calculator is provided with a dedicated counter that measures the time interval between key operations in order to determine whether a key operation has been performed for a certain period of time.

この考案は上記の点に鑑みてなされたものでオートパワ
ーオフ機能を備えた小型電子式計算機いおいて、オート
パワーオフ用カウンタを用いて効果的に乱数を発生する
ようにした乱数発生装置を提供することにある。
This idea was made in view of the above points, and it is a small electronic calculator equipped with an auto power off function, and a random number generator that effectively generates random numbers using an auto power off counter. It is about providing.

以下、図面を参照しながらこの考案の一実施例を説明す
る。
An embodiment of this invention will be described below with reference to the drawings.

第1図はオートパワーオフ機能を備えた小型電子式計算
機の全体構成を示すものである。
FIG. 1 shows the overall configuration of a small electronic calculator equipped with an auto power-off function.

同図において、11は電源スィッチで、この電源スィッ
チ11をオンすることにより、通常時はオン状態にある
オートパワーオフ用スイッチ12を介して供給電圧VD
DがCPU (中央処理装置)13及び表示部14に供
給される。
In the figure, 11 is a power switch, and by turning on this power switch 11, the supply voltage VD
D is supplied to a CPU (central processing unit) 13 and a display section 14.

上記オートパワーオフ用スイッチ12は例えばp形MO
sトランジスタをスイッチ素子として用いたもので、ゲ
ート電極゛0”信号が入力するとオンし、ゲート電極に
°“1“′信号が入力するとオフする。
The auto power off switch 12 is, for example, a p-type MO
It uses an s transistor as a switching element, which is turned on when a ``0'' signal is input to the gate electrode, and turned off when a ``1'' signal is input to the gate electrode.

また、前記電源スィッチ11の操作出力はワンショット
回路15及びインバータ16を介してワンショット回路
17に入力される。
Further, the operation output of the power switch 11 is inputted to a one-shot circuit 17 via a one-shot circuit 15 and an inverter 16.

上記ワンショット回路15の出力信号はオア回路18を
介してR−5型フリツプフロツプ19のセット端子Sに
入力される。
The output signal of the one-shot circuit 15 is inputted to a set terminal S of an R-5 flip-flop 19 via an OR circuit 18.

また、上記ワンショット回路17の出力信号はオア回路
20を介して上記フリップフロップ19のリセット端子
Rに入力される。
Further, the output signal of the one-shot circuit 17 is inputted to the reset terminal R of the flip-flop 19 via the OR circuit 20.

このフリップフロップ19の出力端子Qの出力信号は前
記スイッチ12のゲート電極、アンド回路21の一方の
入力端及びオア回路22に入力される。
The output signal from the output terminal Q of the flip-flop 19 is input to the gate electrode of the switch 12, one input terminal of the AND circuit 21, and the OR circuit 22.

また、23はキーマトリクス回路で、例えば5本の入力
ラインと4本の出力ラインを有し、各入出カラインの交
差点にテンキー、ファンクションキー等が接続されると
共に乱数を発生させる。
A key matrix circuit 23 has, for example, five input lines and four output lines, and a numeric keypad, function keys, etc. are connected to the intersections of each input/output line, and generates random numbers.

’RAN、キー231、クリア及びオートパワーオフを
解除するrACJキー232が接続される。
'RAN, key 231, and rACJ key 232 for canceling clear and auto power off are connected.

上記キーマトリックス回路23にはデコーダ24から入
力ラインを介してタイミング信号が与えられる。
A timing signal is applied to the key matrix circuit 23 from a decoder 24 via an input line.

この場合、キーマトリックス回路23の最下位の入力ラ
インとデコーダ24の間には前記オア回路22が介され
ている。
In this case, the OR circuit 22 is interposed between the lowest input line of the key matrix circuit 23 and the decoder 24.

そして、キー操作時キーマトリクス回路23から出力さ
れるキー操作信号はアンド回路25へ入力される。
A key operation signal output from the key matrix circuit 23 at the time of key operation is input to an AND circuit 25.

さらに、上記キー操作信号はオア回路26を介してオー
トパワーオフ用カウンタ27のリセット端子R及び前記
アンド回路21の他方の入力端に入力される。
Further, the key operation signal is inputted to the reset terminal R of the auto power-off counter 27 and the other input terminal of the AND circuit 21 via the OR circuit 26.

また、28は基準周波数信号を出力する発振回路で、こ
の発振回路28から出力される基準周波数信号、例えは
32.768K H2の信号は前記オートパワーオフ用
カウンタ27及びタイミング信号作成部29に入力され
る。
Further, 28 is an oscillation circuit that outputs a reference frequency signal, and the reference frequency signal output from this oscillation circuit 28, for example, a 32.768K H2 signal, is input to the auto power-off counter 27 and the timing signal generator 29. be done.

そして、このタイミング信号作成部29は入力される基
準周波数信号を分周して制御部30等にタイミング信号
を送出する。
The timing signal generation section 29 divides the frequency of the input reference frequency signal and sends the timing signal to the control section 30 and the like.

上記オートパワーオフ用カウンタ27に最上位桁から出
力されるキャリー信号は前記オア回路20を介して前記
フリップフロップ19のリセツ端子Rに入力される。
The carry signal output from the most significant digit to the auto power-off counter 27 is input to the reset terminal R of the flip-flop 19 via the OR circuit 20.

さらに、上記オートパワーオフ用カウンタ27から出力
される桁データはアンド回路31の一方の入力端に入力
される。
Furthermore, the digit data output from the auto power-off counter 27 is input to one input terminal of the AND circuit 31.

このアンド回路31から出力される上記オートパワーオ
フ用カウンタ27の桁データ及びアンド回路25から出
力されるキー操作信号はキー人力バッファ32に入力さ
れる。
The digit data of the automatic power-off counter 27 outputted from the AND circuit 31 and the key operation signal outputted from the AND circuit 25 are inputted to a key manual buffer 32.

このキー人力バッファ32に読み込まれたキー操作信号
は演算記憶部33に出力され前記制御部30から出力さ
れる制御信号に基づき各種演算が行なわれ、その演算結
果は表示部14において表示される。
The key operation signals read into the key manual buffer 32 are output to a calculation storage section 33, where various calculations are performed based on the control signals output from the control section 30, and the results of the calculations are displayed on the display section 14.

また、上記演算記憶部33は前記デコーダ24に演算記
憶部33内に備えられたカウンタの計数値例えば10ヨ
〜r4.を出力する。
Further, the calculation storage section 33 stores a count value of a counter provided in the calculation storage section 33 in the decoder 24, for example, 10 yo to r4. Output.

そして、上記デコーダ24は入力されるカウンタの計数
値をデコードし、前記キーマトリクス回路23の5本の
入力ラインに順次“1゛信号を送出する。
The decoder 24 decodes the input count value of the counter and sequentially sends "1" signals to the five input lines of the key matrix circuit 23.

なむ、前記制御部30は信号ラインaより読み込みタイ
ミング信号をオア回路34を介して前記キー人力バッフ
ァに出力する。
The control section 30 outputs a read timing signal from the signal line a to the key manual buffer via the OR circuit 34.

さらに、前記制御部30は’RANヨキー231操作時
信号ラインbより読み込みタイミング信号を上記オア回
路34を介して上記キー人力バッファ32に出力すると
共に、前記アンド回路31の一方の入力端、あるいはイ
ンバータ35を介してアンI・回路25の一方の入力端
にデーl−制御信号送出する。
Further, the control unit 30 reads a timing signal from the signal line b when operating the 'RAN key 231 and outputs it to the key manual buffer 32 via the OR circuit 34, and also outputs the timing signal to the key manual buffer 32 through the OR circuit 34, and outputs the timing signal to one input terminal of the AND circuit 31 or the inverter. A data l-control signal is sent to one input terminal of the an l-circuit 25 via the ann l-control signal 35.

次に第2図はオートパワーオフ用カウンタ27の詳細な
構成を示すもので、例えばクロック信号として32.7
68K Hzを用いると、最上位桁からキャリー信号さ
れるまでの時間は約8.5分である。
Next, FIG. 2 shows a detailed configuration of the auto power-off counter 27. For example, the clock signal is 32.7
When 68 KHz is used, the time from the most significant digit to the carry signal is approximately 8.5 minutes.

またさらに、上記オートパワーオフ用カウンタ27の第
2桁目、第3桁目からキャリー信号が出力される時間は
l/128秒、178秒であり、通常のキー操作間隔が
l/2秒であることを考慮すると、オートパワーオフカ
ウンタ27の第2,3桁目の内容を乱数として用いるこ
とができる。
Furthermore, the times at which the carry signal is output from the second and third digits of the auto power-off counter 27 are 1/128 seconds and 178 seconds, and the normal key operation interval is 1/2 seconds. Taking this into consideration, the contents of the second and third digits of the auto power-off counter 27 can be used as random numbers.

次に、以上のように構成されたこの考案の動作を説明す
る。
Next, the operation of this invention configured as above will be explained.

ます、電源スィッチ11をオンするとワンショット回路
15からワンショットパルスがオア回路18を介してフ
リップフロップ19のセット端子Sに入力される。
First, when the power switch 11 is turned on, a one-shot pulse is inputted from the one-shot circuit 15 to the set terminal S of the flip-flop 19 via the OR circuit 18.

このため、このフリップフロップ19はセットされ、出
力端子Qから出力される“0”信号がオートパワーオフ
用スイッチ12のゲート電極及びアンド回路21の一方
の入力端に入力される。
Therefore, the flip-flop 19 is set, and the "0" signal output from the output terminal Q is input to the gate electrode of the auto power-off switch 12 and one input terminal of the AND circuit 21.

これによりオートパワーオフ用スイッチ12はオンし、
供給電圧VDDがcpu13及び表示部14に供給され
る。
This turns on the auto power off switch 12,
A supply voltage VDD is supplied to the CPU 13 and the display section 14 .

また、アンド回路21のゲートは閉じる。Further, the gate of the AND circuit 21 is closed.

次に、キーマトリクス回路23上のキーを操作するとキ
ーマトリクス回路23の出力ラインのいずれか1つのラ
インから“°1゛信号が出力される。
Next, when a key on the key matrix circuit 23 is operated, a "°1" signal is output from any one of the output lines of the key matrix circuit 23.

このため、オア回路26を介してオートパワーオフ用カ
ウンタ27のリセット端子Rにリセット信号が出力され
、オートパワーオフ用カウンタ27がリセットされる。
Therefore, a reset signal is outputted to the reset terminal R of the auto power-off counter 27 via the OR circuit 26, and the auto power-off counter 27 is reset.

そして、このオートパワーオフ用カウンタ27のリセッ
トはキー操作毎に行なわれる。
The automatic power-off counter 27 is reset every time a key is operated.

さらに、制御部30から出力う、インaを介して送出さ
れる読み込みタイミング信号によりキー操作信号がキー
人力バッファ32に読み込まれる。
Furthermore, the key operation signal is read into the key manual buffer 32 by a read timing signal sent from the control unit 30 via the input a.

そして、このキー人力バッファ32に読み込まれたキー
操作信号は演算記憶部に送出され、制御部30からの制
御信号により、どのキーが操作されたか判定される。
The key operation signal read into the key manual buffer 32 is sent to the calculation storage section, and it is determined which key has been operated based on the control signal from the control section 30.

この判定の結果”RAN、キー231か操作されていな
い場合は、キーボード23から出力されるキー操作信号
に対応する制御信号に基づき所定演算が実行され、その
演算結果は表示部14に表示される。
As a result of this determination, if the RAN key 231 is not operated, a predetermined calculation is executed based on the control signal corresponding to the key operation signal output from the keyboard 23, and the calculation result is displayed on the display unit 14. .

次に、’RANヨキー231を操作すると、前述した如
くキー人力バッファ32を介して演算記憶部33にキー
操作信号が送出され、’RANヨキーであることが判別
される。
Next, when the 'RAN key 231 is operated, a key operation signal is sent to the calculation storage section 33 via the key manual buffer 32 as described above, and it is determined that the 'RAN key is pressed.

次に、制御部30は出力ラインbより゛1″信号を出力
し、アント回路31が開かれ、アンド回路25か閉じる
Next, the control section 30 outputs the "1" signal from the output line b, the AND circuit 31 is opened, and the AND circuit 25 is closed.

そして、オートパワーオフ用カウンタ27に計数されて
いる例えは第2桁目のデータがアンド回路31を介して
キー人力バッファ32に読み込まれる。
Then, for example, the second digit data counted by the auto power-off counter 27 is read into the key manual buffer 32 via the AND circuit 31.

そして、このキー人力バッファ32に読み込まれた乱数
用データは演算記憶部33に送出される。
Then, the random number data read into the key manual buffer 32 is sent to the calculation storage section 33.

次に同様に1.て例えは第3桁目のデータが演算記憶部
33に送出され、上記オートパワーオフ用カウンタ27
の第2,3桁目のデータが表示部14に乱数として表示
される。
Next, 1. For example, the third digit data is sent to the arithmetic storage section 33 and the auto power off counter 27
The second and third digit data are displayed on the display unit 14 as random numbers.

しかして、オペレータがキー操作後一定時間(例えば8
、粉)キー操作を行なわないとAPO用カウンタ27か
らキャリー信号がオア回路20を介してフリップフロッ
プ19のリセット端子Rに入力される。
However, after the operator presses a key, the
If no key is operated, a carry signal from the APO counter 27 is input to the reset terminal R of the flip-flop 19 via the OR circuit 20.

そして、このフリップフロップ19の出力端子Qから“
1゛信号がオートパワーオフ用スイッチ12のゲート電
極及びアンド回路21及びオア回路22に出力される。
From the output terminal Q of this flip-flop 19, “
A 1'' signal is output to the gate electrode of the auto power-off switch 12, the AND circuit 21, and the OR circuit 22.

このため、オートパワーオフ用スイッチ12はオフし、
供給電圧Vp□の制御部30及び表示部14への供給は
遮断される。
Therefore, the auto power off switch 12 is turned off,
The supply of the supply voltage Vp□ to the control section 30 and the display section 14 is cut off.

次に、このオートパワーオフ状態を解除する場合には、
’ACヨキー232を操作する。
Next, if you want to cancel this auto power off state,
'Operate the AC key 232.

この操作信号はオア回路26を介してオートパワーオフ
用カウンタ27のリセット端子Rに入力され、これをリ
セットする。
This operation signal is input to the reset terminal R of the auto power-off counter 27 via the OR circuit 26, and resets it.

さらにアンド回路21及びオア回路18を介してフリッ
プフロップ19のセット端子Sに“l゛信号入力され、
これがセットされる。
Furthermore, a "l" signal is input to the set terminal S of the flip-flop 19 via the AND circuit 21 and the OR circuit 18,
This is set.

そして、上記フリップフロップ19の出力端子Qから“
°0”信号がオートパワーオフ用スイッチ12のゲート
電極に送出され、これがオンされる。
From the output terminal Q of the flip-flop 19, "
A °0'' signal is sent to the gate electrode of the auto power-off switch 12, turning it on.

そして、再び供給電圧V DOがCPU13及び表示部
14に供給される。
Then, the supply voltage VDO is supplied to the CPU 13 and the display unit 14 again.

なお、上記実施例においてはオートパワーオフ用カウン
タ27をcpu13の外部に設けたが、CPU 13
内gのRAN (ランダム・アクセス・メモリ)等を用
いてカウンタ動作を行なわせても良いことは勿論である
In the above embodiment, the auto power-off counter 27 is provided outside the CPU 13;
Of course, the counter operation may be performed using the internal RAN (Random Access Memory) or the like.

以上詳述したようにこの考案によれば、オートパワーオ
フ機能を備えた小型電子式計算機において、所定キー操
作時にオートパワーオフ用カウンタに計数されるデータ
に基づいて乱数を得るようにしたので、特別に乱数発生
用のカウンタを設ける必要もなく、回路構成を簡略化す
ることができる乱数発生装置を提供することができる。
As detailed above, according to this invention, in a small electronic calculator equipped with an auto power off function, a random number is obtained based on the data counted by the auto power off counter when a predetermined key is pressed. It is possible to provide a random number generation device whose circuit configuration can be simplified without the need to provide a special counter for random number generation.

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

図面はこの考案の一実施例を示すもので、第1図はオー
トパワーオフ機能を備えた小型電子式計算機の全体構成
を示す図、第2図はオートパワーオフ用カウンタの構成
を示す図である。 12・・・・・・オートパワーオフスイッチ、23・・
・・・・キーマトリクス回路、231・・・・・・RA
Nキー 27・・・・・・オートパワーオフ用カウンタ
、31・・・・・・アンド回路、32・・・・・・キー
人力バッファ、33・・・・・・演算記憶部。
The drawings show one embodiment of this invention; Figure 1 shows the overall configuration of a small electronic calculator equipped with an auto power-off function, and Figure 2 shows the configuration of an auto power-off counter. be. 12... Auto power off switch, 23...
...Key matrix circuit, 231...RA
N key 27...Auto power off counter, 31...AND circuit, 32...Key manual buffer, 33...Calculation storage section.

Claims (1)

【実用新案登録請求の範囲】[Scope of utility model registration request] オートパワーオフ機能を備えた小型電子式計算機におい
て、キー人力部における各キーの操作時間間隔の計時を
行なうカウント手段と、特定キーの操作により上記カウ
ント手段の計数値を乱数として演算記憶手段へ出力され
る制御手段とを具備してなる乱数発生装置。
A small electronic calculator equipped with an auto power-off function includes a counting means for measuring the time interval between each key operation in the key manual section, and outputting the counted value of the counting means as a random number to the calculation storage means when a specific key is operated. A random number generator comprising: a control means for controlling
JP7660680U 1980-06-04 1980-06-04 random number generator Expired JPS6025612Y2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7660680U JPS6025612Y2 (en) 1980-06-04 1980-06-04 random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7660680U JPS6025612Y2 (en) 1980-06-04 1980-06-04 random number generator

Publications (2)

Publication Number Publication Date
JPS575748U JPS575748U (en) 1982-01-12
JPS6025612Y2 true JPS6025612Y2 (en) 1985-08-01

Family

ID=29439225

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7660680U Expired JPS6025612Y2 (en) 1980-06-04 1980-06-04 random number generator

Country Status (1)

Country Link
JP (1) JPS6025612Y2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63113957A (en) * 1986-10-31 1988-05-18 Sony Magnescale Inc Endless tape containing device
JPH0778947B2 (en) * 1988-05-10 1995-08-23 ソニーマグネスケール株式会社 Endless tape storage device

Also Published As

Publication number Publication date
JPS575748U (en) 1982-01-12

Similar Documents

Publication Publication Date Title
CA1036728A (en) Electronic calculator watch structures
JPS6025612Y2 (en) random number generator
US4157588A (en) Miniature type electronic device
JP2984770B2 (en) Electronic clock
JPS6038237Y2 (en) Electronic clock with alarm
JPS5922590Y2 (en) portable calculator
JPS6022367Y2 (en) electronic calculation practice machine
JPS6349949Y2 (en)
JPS6017000Y2 (en) Electronic device with pronunciation function
JPS6239453B2 (en)
JPH057631Y2 (en)
JPS6310553Y2 (en)
JPS6331140Y2 (en)
JPS5922591Y2 (en) Arithmetic unit
JPS599323Y2 (en) Electronic desk calculator display device
JPS5918515Y2 (en) Electronics
JPS5922587Y2 (en) random number generator
JPS647357U (en)
JPS63163617A (en) Key operation reproducing device
JPH0289549U (en)
JPS5952835B2 (en) electronic learning machine
JPS5952836B2 (en) electronic learning machine
JPS6361058U (en)
JPH02150597U (en)
JPS63183650U (en)