JPH08305551A - Random number generator - Google Patents
Random number generatorInfo
- Publication number
- JPH08305551A JPH08305551A JP7128938A JP12893895A JPH08305551A JP H08305551 A JPH08305551 A JP H08305551A JP 7128938 A JP7128938 A JP 7128938A JP 12893895 A JP12893895 A JP 12893895A JP H08305551 A JPH08305551 A JP H08305551A
- Authority
- JP
- Japan
- Prior art keywords
- random number
- circuit
- output
- circuits
- probability
- 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.)
- Pending
Links
- 238000010586 diagram Methods 0.000 description 4
- 238000007796 conventional method Methods 0.000 description 1
Landscapes
- Tests Of Electronic Circuits (AREA)
- Test And Diagnosis Of Digital Computers (AREA)
- Pinball Game Machines (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、論理“1”の発生確率
を制御することができる乱数発生装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a random number generator capable of controlling the probability of occurrence of logic "1".
【0002】[0002]
【従来の技術】論理“1”の発生確率を制御することが
できる従来の乱数発生装置の一例として、実開昭62−
201858号に記載のものがある。図2はその先願に
記載されている乱数発生装置を示すブロック図である。2. Description of the Related Art As an example of a conventional random number generator capable of controlling the probability of occurrence of a logic "1", a real-life numbering machine 62-
There is one described in No. 2018858. FIG. 2 is a block diagram showing a random number generator described in that prior application.
【0003】図2において、基本乱数発生回路1a〜1
cはそれぞれ確率1/2で論理“1”を発生する。AN
D回路2aには基本乱数発生回路1a,1bの出力が入
力され、AND回路2bには基本乱数発生回路1a〜1
cの出力が入力される。確率設定回路3a〜3cはそれ
ぞれ“0”もしくは“1”に設定され、論理“0”もし
くは“1”を出力する。AND回路4aには基本乱数発
生回路1aの出力と確率設定回路3aの出力が入力さ
れ、AND回路4bにはAND回路2aの出力と確率設
定回路3bの出力が入力され、AND回路4cにはAN
D回路2bの出力と確率設定回路3cの出力が入力され
る。AND回路4a〜4cの出力はOR回路5に入力さ
れ、このOR回路5の出力が論理“1”の出現確率が制
御された出力Pとなる。In FIG. 2, basic random number generating circuits 1a to 1 are provided.
Each c produces a logic "1" with probability 1/2. AN
Outputs of the basic random number generating circuits 1a and 1b are input to the D circuit 2a, and basic random number generating circuits 1a to 1 are input to the AND circuit 2b.
The output of c is input. The probability setting circuits 3a to 3c are set to "0" or "1", respectively, and output logic "0" or "1". The AND circuit 4a receives the output of the basic random number generation circuit 1a and the output of the probability setting circuit 3a, the AND circuit 4b receives the output of the AND circuit 2a and the output of the probability setting circuit 3b, and the AND circuit 4c receives the AN signal.
The output of the D circuit 2b and the output of the probability setting circuit 3c are input. The outputs of the AND circuits 4a to 4c are input to the OR circuit 5, and the output of the OR circuit 5 becomes the output P in which the appearance probability of the logic "1" is controlled.
【0004】この従来の乱数発生装置において、確率設
定回路3aが“1”に設定されると、出力Pが論理
“1”となる確率は1/2となり、確率設定回路3bが
“1”に設定されると、出力Pが論理“1”となる確率
は1/4となり、確率設定回路3cが“1”に設定され
ると、出力Pが論理“1”となる確率は1/8となる。
即ち、図2に示す従来の乱数発生装置では、論理“1”
の発生確率を1/2,1/4,1/8から選択すること
ができる。なお、基本乱数発生回路1(1a〜1c),
AND回路2(2a,2b),確率設定回路3(3a〜
3c),AND回路4(4a〜4c)を増やせば、論理
“1”の発生確率を1/2n (nは正の整数)から選択
することが可能となる。In this conventional random number generator, when the probability setting circuit 3a is set to "1", the probability that the output P becomes the logic "1" becomes 1/2, and the probability setting circuit 3b becomes "1". When set, the probability that the output P will be a logical "1" is 1/4, and when the probability setting circuit 3c is set to "1", the probability that the output P will be a logical "1" is 1/8. Become.
That is, in the conventional random number generator shown in FIG.
The occurrence probability of can be selected from 1/2, 1/4, and 1/8. In addition, the basic random number generation circuit 1 (1a to 1c),
AND circuit 2 (2a, 2b), probability setting circuit 3 (3a-
3c) and the number of AND circuits 4 (4a to 4c) is increased, it becomes possible to select the probability of occurrence of logic "1" from 1/2 n (n is a positive integer).
【0005】[0005]
【発明が解決しようとする課題】しかしながら、上述し
た従来の乱数発生装置では、例えば確率設定回路3a〜
3cの全てを“1”に設定したとしても、出力Pが論理
“1”となる確率は1/2であり、6/8,7/8のよ
うにm/8(mは正の整数)という任意の確率を指定す
ることはできないという問題点がある。本発明はこのよ
うな問題点に鑑みなされたものであり、論理“1”をm
/2n(m,nは正の整数)の発生確率で発生すること
ができる乱数発生装置を提供することを目的とする。However, in the above-described conventional random number generator, for example, the probability setting circuits 3a ...
Even if all 3c are set to "1", the probability that the output P will be a logical "1" is 1/2, and m / 8 (m is a positive integer) like 6/8 and 7/8. There is a problem that it is not possible to specify an arbitrary probability. The present invention has been made in view of such problems, and the logic "1" is set to m.
It is an object of the present invention to provide a random number generator capable of generating with a probability of occurrence of / 2 n (m and n are positive integers).
【0006】[0006]
【課題を解決するための手段】本発明は、上述した従来
の技術の課題を解決するため、所定の確率で論理“1”
を発生する複数個の基本乱数発生回路(11a〜11
c)よりなる基本乱数発生部(11)と、前記基本乱数
発生部におけるそれぞれの基本乱数発生回路の出力が供
給される乱数決定回路(12a〜12c)を複数個縦方
向に接続した乱数決定部(12)と、前記乱数決定部に
おけるそれぞれの乱数決定回路の出力が供給される乱数
加算回路(13a〜13c)を複数個縦方向に接続した
乱数加算部(13)と、前記乱数加算部におけるそれぞ
れの乱数加算回路に論理“0”もしくは“1”を入力し
て論理“1”の最終的な発生確率を設定する確率設定部
(14)とを備え、前記乱数決定部は、それぞれの乱数
決定回路において前段の前記基本乱数発生回路より論理
“0”が供給されると論理“0”を前記乱数加算部に出
力する手段と、前段の前記基本乱数発生回路より論理
“1”が供給される縦方向最初の乱数決定回路のみが論
理“1”を前記乱数加算部に出力する共に、それより縦
方向後段の乱数決定回路の全てが前段の前記基本乱数発
生回路の出力にかかわらず論理“0”を前記乱数加算部
に出力する手段とを有し、前記乱数加算部は、それぞれ
の乱数加算回路において前記乱数決定回路の出力と前記
確率設定部の出力とのANDをとると共に、その全ての
ORをとることにより前記最終的な発生確率にて論理
“1”を発生する手段を有することを特徴とする乱数発
生装置を提供するものである。In order to solve the above-mentioned problems of the conventional technique, the present invention has a predetermined probability of logical "1".
A plurality of basic random number generation circuits (11a-11
and a plurality of random number determining circuits (12a to 12c) to which outputs of the respective basic random number generating circuits in the basic random number generating unit are connected in the vertical direction. (12), a random number addition unit (13) in which a plurality of random number addition circuits (13a to 13c) to which outputs of the respective random number determination circuits in the random number determination unit are connected in the vertical direction, and the random number addition unit And a probability setting unit (14) for inputting a logical "0" or "1" to each random number addition circuit and setting a final occurrence probability of the logical "1". In the deciding circuit, a means for outputting a logical "0" to the random number adder when the logic "0" is supplied from the preceding basic random number generating circuit, and a logic "1" is supplied from the preceding basic random number generating circuit. Ru Only the first random number determining circuit in the direction outputs a logical "1" to the random number adding unit, and all the random number determining circuits in the subsequent vertical direction are logical "0" regardless of the output of the basic random number generating circuit in the previous stage. Is output to the random number addition unit, and the random number addition unit performs AND of the output of the random number determination circuit and the output of the probability setting unit in each random number addition circuit, and all ORs thereof. By providing the above, there is provided a random number generator characterized in that it has means for generating a logical "1" at the final occurrence probability.
【0007】[0007]
【実施例】以下、本発明の乱数発生装置について、添付
図面を参照して説明する。図1は本発明の乱数発生装置
の一実施例を示すブロック図である。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A random number generator of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing an embodiment of a random number generator of the present invention.
【0008】本発明の乱数発生装置は、図1に示すよう
に、基本乱数発生部11,乱数決定部12,乱数加算部
13,確率設定部14より構成される。本実施例では、
基本乱数発生部11は3つの基本乱数発生回路11a〜
11cを備え、乱数決定部12は3つの乱数決定回路1
2a〜12cを備える。乱数加算部13は3つの乱数加
算回路13a〜13cを備え、確率設定部14は3つの
確率設定回路14a〜14cを備える。乱数決定回路1
2a〜12c,乱数加算回路13a〜13cは後述する
ように縦方向にも接続されている。As shown in FIG. 1, the random number generating device of the present invention comprises a basic random number generating section 11, a random number determining section 12, a random number adding section 13, and a probability setting section 14. In this embodiment,
The basic random number generator 11 includes three basic random number generating circuits 11a to 11a.
11c, the random number determination unit 12 includes three random number determination circuits 1
2a to 12c. The random number addition unit 13 includes three random number addition circuits 13a to 13c, and the probability setting unit 14 includes three probability setting circuits 14a to 14c. Random number determination circuit 1
2a to 12c and random number adding circuits 13a to 13c are also connected in the vertical direction as described later.
【0009】図1において、基本乱数発生回路11a〜
11cはそれぞれ例えば確率1/2で論理“1”を発生
する。基本乱数発生回路11a〜11cの出力は乱数決
定回路12a〜12cに入力される。乱数決定回路12
a〜12cはそれぞれAND回路121と一方が反転入
力されるAND回路122とを備えて構成される。乱数
決定回路12aにおけるAND回路121の一方の入力
には端子S12より常時“1”が入力され、もう一方の
入力には基本乱数発生回路11aの出力が入力される。
乱数決定回路12aにおけるAND回路122の一方の
入力には端子S12より常時“1”が入力され、もう一
方の入力には基本乱数発生回路11aの出力が反転され
て入力される。In FIG. 1, basic random number generating circuits 11a-
11c each generate a logic "1" with a probability of 1/2, for example. The outputs of the basic random number generation circuits 11a to 11c are input to the random number determination circuits 12a to 12c. Random number determination circuit 12
Each of a to 12c includes an AND circuit 121 and an AND circuit 122, one of which is inverted. In the random number determining circuit 12a, one input of the AND circuit 121 is constantly input with "1" from the terminal S12, and the other input is input with the output of the basic random number generating circuit 11a.
In the random number determination circuit 12a, one input of the AND circuit 122 is constantly input with "1" from the terminal S12, and the other input is inverted and input with the output of the basic random number generation circuit 11a.
【0010】また、乱数決定回路12bにおけるAND
回路121の一方の入力には乱数決定回路12a中のA
ND回路122の出力が入力され、もう一方の入力には
基本乱数発生回路11bの出力が入力される。乱数決定
回路12bにおけるAND回路122の一方の入力には
乱数決定回路12a中のAND回路122の出力が入力
され、もう一方の入力には基本乱数発生回路11bの出
力が反転されて入力される。同様に、乱数決定回路12
cにおけるAND回路121の一方の入力には乱数決定
回路12b中のAND回路122の出力が入力され、も
う一方の入力には基本乱数発生回路11cの出力が入力
される。乱数決定回路12cにおけるAND回路122
の一方の入力には乱数決定回路12b中のAND回路1
22の出力が入力され、もう一方の入力には基本乱数発
生回路11cの出力が反転されて入力される。Further, AND in the random number determination circuit 12b
One of the inputs of the circuit 121 is A in the random number determination circuit 12a.
The output of the ND circuit 122 is input, and the output of the basic random number generation circuit 11b is input to the other input. The output of the AND circuit 122 in the random number determination circuit 12a is input to one input of the AND circuit 122 in the random number determination circuit 12b, and the output of the basic random number generation circuit 11b is inverted and input to the other input. Similarly, the random number determination circuit 12
The output of the AND circuit 122 in the random number determination circuit 12b is input to one input of the AND circuit 121 in c, and the output of the basic random number generation circuit 11c is input to the other input. AND circuit 122 in random number determination circuit 12c
AND circuit 1 in the random number determination circuit 12b has one input
The output of the basic random number generation circuit 11c is inverted and input to the other input.
【0011】乱数決定回路12a〜12cの出力は乱数
加算回路13a〜13cに入力される。乱数加算回路1
3a〜13cはそれぞれAND回路131とOR回路1
32とを備えて構成される。乱数加算回路13aにおけ
るAND回路131の一方の入力には確率設定回路14
aの出力が入力され、もう一方の入力には乱数決定回路
12a中のAND回路121の出力が入力される。乱数
加算回路13aにおけるOR回路132の一方の入力に
はAND回路131の出力が入力され、もう一方の入力
には端子S13より“0”(もしくは“1”)が入力さ
れる。The outputs of the random number determining circuits 12a-12c are input to the random number adding circuits 13a-13c. Random number addition circuit 1
3a to 13c are an AND circuit 131 and an OR circuit 1 respectively.
And 32. The probability setting circuit 14 is connected to one input of the AND circuit 131 in the random number addition circuit 13a.
The output of a is input, and the output of the AND circuit 121 in the random number determination circuit 12a is input to the other input. The output of the AND circuit 131 is input to one input of the OR circuit 132 in the random number addition circuit 13a, and "0" (or "1") is input to the other input from the terminal S13.
【0012】また、乱数加算回路13bにおけるAND
回路131の一方の入力には確率設定回路14bの出力
が入力され、もう一方の入力には乱数決定回路12b中
のAND回路121の出力が入力される。乱数加算回路
13bにおけるOR回路132の一方の入力にはAND
回路131の出力が入力され、もう一方の入力には乱数
加算回路13a中のOR回路132の出力が入力され
る。同様に、乱数加算回路13cにおけるAND回路1
31の一方の入力には確率設定回路14cの出力が入力
され、もう一方の入力には乱数決定回路12c中のAN
D回路121の出力が入力される。乱数加算回路13c
におけるOR回路132の一方の入力にはAND回路1
31の出力が入力され、もう一方の入力には乱数加算回
路13b中のOR回路132の出力が入力される。そし
て、このOR回路132の出力が論理“1”の発生確率
が制御された出力Pとなる。Further, AND in the random number addition circuit 13b
The output of the probability setting circuit 14b is input to one input of the circuit 131, and the output of the AND circuit 121 in the random number determination circuit 12b is input to the other input. AND is applied to one input of the OR circuit 132 in the random number addition circuit 13b.
The output of the circuit 131 is input, and the output of the OR circuit 132 in the random number addition circuit 13a is input to the other input. Similarly, the AND circuit 1 in the random number addition circuit 13c
The output of the probability setting circuit 14c is input to one input of 31 and the AN in the random number determining circuit 12c is input to the other input.
The output of the D circuit 121 is input. Random number addition circuit 13c
AND circuit 1 is connected to one input of the OR circuit 132 in
The output of 31 is input, and the output of the OR circuit 132 in the random number addition circuit 13b is input to the other input. Then, the output of the OR circuit 132 becomes the output P in which the occurrence probability of the logic "1" is controlled.
【0013】確率設定回路14a〜14cはそれぞれ
“0”もしくは“1”に設定され、論理“0”もしくは
“1”を出力する。The probability setting circuits 14a to 14c are set to "0" or "1", respectively, and output logic "0" or "1".
【0014】以上のように構成される本発明の乱数発生
装置において、基本乱数発生回路11aの出力が“1”
の時、乱数決定回路12a中のAND回路121の出力
は“1”、AND回路122の出力は“0”となるの
で、基本乱数発生回路11b,11cの出力が“0”で
あろうとも“1”であろうとも、乱数決定回路12a〜
12cにおけるAND回路121の出力はそれぞれ
“1”,“0”,“0”となる。In the random number generator of the present invention configured as described above, the output of the basic random number generation circuit 11a is "1".
At this time, the output of the AND circuit 121 in the random number determination circuit 12a is "1", and the output of the AND circuit 122 is "0". Therefore, even if the outputs of the basic random number generation circuits 11b and 11c are "0", Even if it is 1 ", the random number determination circuit 12a-
The outputs of the AND circuit 121 in 12c are "1", "0", and "0", respectively.
【0015】同様にして、基本乱数発生回路11aの出
力が“0”で、基本乱数発生回路11bの出力が“1”
の時は、基本乱数発生回路11cの出力が“0”であろ
うとも“1”であろうとも、乱数決定回路12a〜12
cにおけるAND回路121の出力はそれぞれ“0”,
“1”,“0”となる。基本乱数発生回路11a,11
bの出力が“0”で、基本乱数発生回路11cの出力が
“1”の時は、乱数決定回路12a〜12cにおけるA
ND回路121の出力はそれぞれ“0”,“0”,
“1”となる。即ち、この構成においては、基本乱数発
生部1における1つの基本乱数発生回路(11a〜11
c)のいずれかに“1”が発生すると、その“1”が発
生した基本乱数発生回路に接続された乱数決定回路(1
2a〜12c)より縦方向後段の乱数決定回路における
AND回路121の出力は全て“0”となることが分か
る。Similarly, the output of the basic random number generating circuit 11a is "0" and the output of the basic random number generating circuit 11b is "1".
At this time, whether the output of the basic random number generation circuit 11c is "0" or "1", the random number determination circuits 12a to 12
The output of the AND circuit 121 in c is "0",
It becomes "1" and "0". Basic random number generation circuits 11a, 11
When the output of b is "0" and the output of the basic random number generation circuit 11c is "1", A in the random number determination circuits 12a to 12c.
The outputs of the ND circuit 121 are "0", "0",
It becomes “1”. That is, in this configuration, one basic random number generation circuit (11a to 11) in the basic random number generation unit 1 is used.
When "1" occurs in any of c), the random number determination circuit (1
2a to 12c), it can be seen that the outputs of the AND circuit 121 in the random number determination circuit in the subsequent stage in the vertical direction are all "0".
【0016】以上をまとめると、基本乱数発生回路11
a〜11cの出力が(1,?,?)となる確率は1/2
で、この時、乱数決定回路12a〜12cにおけるAN
D回路121の出力は(1,0,0)となる。なお、
“?”は“0”でも“1”でもよいことを示している。
基本乱数発生回路11a〜11cの出力が(0,1,
?)となる確率は1/4で、この時、乱数決定回路12
a〜12cにおけるAND回路121の出力は(0,
1,0)となる。基本乱数発生回路11a〜11cの出
力が(0,0,1)となる確率は1/8で、この時、乱
数決定回路12a〜12cにおけるAND回路121の
出力は(0,0,1)となる。To summarize the above, the basic random number generation circuit 11
The probability that the output of a to 11c becomes (1,?,?) is 1/2
Then, at this time, the AN in the random number determination circuits 12a to 12c
The output of the D circuit 121 is (1, 0, 0). In addition,
"?" Indicates that "0" or "1" may be used.
The outputs of the basic random number generation circuits 11a to 11c are (0, 1,
? ) Is 1/4, and at this time, the random number determination circuit 12
The output of the AND circuit 121 in a to 12c is (0,
1,0). The probability that the outputs of the basic random number generation circuits 11a to 11c are (0, 0, 1) is 1/8, and at this time, the output of the AND circuit 121 in the random number determination circuits 12a to 12c is (0, 0, 1). Become.
【0017】乱数加算回路13a〜13cは確率設定回
路14a〜14cの出力と乱数決定回路12a〜12c
中のAND回路121の出力とのANDをとり、その全
てのORをとる構成である。従って、乱数加算回路13
a中のOR回路132に端子S13より“0”が入力さ
れている時、乱数加算回路13c中のOR回路132か
らの出力Pが論理“1”となる確率は、確率設定回路1
4a〜14cの設定によって表1のようになる。なお、
表1において、設定値は確率設定回路14a〜14cの
出力値を表している。この表1より分かるように、本発
明の乱数発生装置では、m/8の確率で論理“1”を発
生することができる。The random number adding circuits 13a to 13c output the probability setting circuits 14a to 14c and the random number determining circuits 12a to 12c.
The configuration is such that AND with the output of the AND circuit 121 in the inside is taken and all the ORs thereof are taken. Therefore, the random number addition circuit 13
When "0" is input from the terminal S13 to the OR circuit 132 in a, the probability that the output P from the OR circuit 132 in the random number addition circuit 13c becomes the logic "1" is determined by the probability setting circuit 1
Table 1 is obtained according to the settings of 4a to 14c. In addition,
In Table 1, the set value represents the output value of the probability setting circuits 14a to 14c. As can be seen from Table 1, the random number generator of the present invention can generate a logic "1" with a probability of m / 8.
【0018】[0018]
【表1】 [Table 1]
【0019】なお、端子S13より“1”を入力する
と、乱数加算回路13a中のOR回路132の出力が
“1”となり、縦方向後段の乱数加算回路13b,13
c中のOR回路132の出力も“1”となるので、出力
Pは確率設定回路14a〜14cの設定にかかわらず常
に“1”となる。なお、本実施例では端子S13より信
号を入力するように構成しているが、確率設定部14に
おける確率設定回路をもう1つ増やし、その1つを乱数
加算回路13a中のOR回路132に入力する確率設定
信号としてもよい。When "1" is input from the terminal S13, the output of the OR circuit 132 in the random number addition circuit 13a becomes "1", and the random number addition circuits 13b and 13 in the subsequent stage in the vertical direction.
Since the output of the OR circuit 132 in c is also "1", the output P is always "1" regardless of the settings of the probability setting circuits 14a to 14c. Although the signal is input from the terminal S13 in this embodiment, the number of probability setting circuits in the probability setting unit 14 is increased by one and the one is input to the OR circuit 132 in the random number addition circuit 13a. It may be a probability setting signal.
【0020】以上説明した本実施例では、基本乱数発生
部11,乱数決定部12,乱数加算部13におけるそれ
ぞれの回路を縦方向に3つ並べた構成であるので、論理
“1”を発生する確率はm/8となるが、縦方向にそれ
ぞれの回路を4つ並べればm/16、縦方向に5つ並べ
ればm/32のように、論理“1”の発生確率をm/2
n (m,nは正の整数)で発生することができる。勿
論、この時、確率設定部14における確率設定回路は縦
方向に並べた回路の数に応じて増やすことは当然であ
る。なお、図1において、確率設定部14は便宜上3つ
の確率設定回路14a〜14cを並べて構成している
が、実際には3ビットの2進数を発生させ、その最上位
ビットを確率設定回路14aの出力、中央のビットを確
率設定回路14bの出力、最下位ビットを確率設定回路
14cの出力とすればよい。In the present embodiment described above, since the respective circuits of the basic random number generator 11, the random number determiner 12, and the random number adder 13 are arranged in the vertical direction, a logic "1" is generated. The probability is m / 8, but if four circuits are arranged in the vertical direction, then m / 16, and if five circuits are arranged in the vertical direction, m / 32, the probability of occurrence of logic “1” is m / 2.
n (m and n are positive integers). Of course, at this time, the number of probability setting circuits in the probability setting unit 14 is naturally increased according to the number of circuits arranged in the vertical direction. Note that, in FIG. 1, the probability setting unit 14 is configured by arranging three probability setting circuits 14a to 14c for convenience, but in reality, a 3-bit binary number is generated, and the most significant bit thereof is stored in the probability setting circuit 14a. The output, the central bit may be the output of the probability setting circuit 14b, and the least significant bit may be the output of the probability setting circuit 14c.
【0021】本発明の乱数発生装置は、m/2n の発生
確率で論理“1”を発生することができる特長を有する
他に、m/16,m/32のように発生確率を異ならせ
る際には、基本乱数発生回路11,乱数決定回路12,
乱数加算回路13を縦方向に増やしていくだけでよいと
いう特長も有している。また、回路構成もAND回路や
OR回路等を用いた簡単な構成であるので、安価に実現
できる。The random number generator of the present invention has the feature that it can generate a logical "1" with a probability of occurrence of m / 2 n , and has different occurrence probabilities such as m / 16 and m / 32. At that time, the basic random number generation circuit 11, the random number determination circuit 12,
It also has the feature that it is sufficient to increase the random number addition circuit 13 in the vertical direction. Further, the circuit configuration is a simple configuration using an AND circuit, an OR circuit, etc., so that it can be realized at low cost.
【0022】[0022]
【発明の効果】以上詳細に説明したように、本発明の乱
数発生装置は、所定の確率で論理“1”を発生する複数
個の基本乱数発生回路よりなる基本乱数発生部と、前記
基本乱数発生部におけるそれぞれの基本乱数発生回路の
出力が供給される乱数決定回路を複数個縦方向に接続し
た乱数決定部と、前記乱数決定部におけるそれぞれの乱
数決定回路の出力が供給される乱数加算回路を複数個縦
方向に接続した乱数加算部と、前記乱数加算部における
それぞれの乱数加算回路に論理“0”もしくは“1”を
入力して論理“1”の最終的な発生確率を設定する確率
設定部とを備え、前記乱数決定部は、それぞれの乱数決
定回路において前段の前記基本乱数発生回路より論理
“0”が供給されると論理“0”を前記乱数加算部に出
力する手段と、前段の前記基本乱数発生回路より論理
“1”が供給される縦方向最初の乱数決定回路のみが論
理“1”を前記乱数加算部に出力する共に、それより縦
方向後段の乱数決定回路の全てが前段の前記基本乱数発
生回路の出力にかかわらず論理“0”を前記乱数加算部
に出力する手段とを有し、前記乱数加算部は、それぞれ
の乱数加算回路において前記乱数決定回路の出力と前記
確率設定部の出力とのANDをとると共に、その全ての
ORをとることにより前記最終的な発生確率にて論理
“1”を発生する手段を有するので、論理“1”をm/
2n (m,nは正の整数)の発生確率で発生することが
できるという特長を有する。As described above in detail, the random number generating device of the present invention includes a basic random number generating section including a plurality of basic random number generating circuits that generate a logic "1" with a predetermined probability, and the basic random number. A random number determining section in which a plurality of random number determining circuits to which the outputs of the respective basic random number generating circuits in the generating section are connected are vertically connected, and a random number adding circuit to which outputs of the respective random number determining circuits in the random number determining section are supplied. Probability of setting a final occurrence probability of a logical "1" by inputting a logical "0" or "1" into a random number adding section in which a plurality of vertical lines are connected and each random number adding circuit in the random number adding section. A setting unit, wherein the random number determination unit outputs a logical "0" to the random number addition unit when a logical "0" is supplied from the basic random number generation circuit in the preceding stage in each random number determination circuit; Front stage Only the first random number determination circuit in the vertical direction supplied with the logic "1" from the basic random number generation circuit outputs the logic "1" to the random number addition unit, and all the random number determination circuits in the subsequent stages in the vertical direction from the previous stage. Means for outputting a logical "0" to the random number addition unit regardless of the output of the basic random number generation circuit, and the random number addition unit outputs the output of the random number determination circuit and the probability in each random number addition circuit. Since there is a means for generating a logical "1" at the final occurrence probability by taking the AND with the output of the setting unit and taking the OR of all of them, the logical "1" is m / m.
It has a feature that it can be generated with an occurrence probability of 2 n (m and n are positive integers).
【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing one embodiment of the present invention.
【図2】従来例を示すブロック図である。FIG. 2 is a block diagram showing a conventional example.
11 基本乱数発生部 11a〜11c 基本乱数発生回路 12 乱数決定部 12a〜12c 乱数決定回路 13 乱数加算部 13a〜13c 乱数加算回路 14 確率設定部 14a〜14c 確率設定回路 11 Basic Random Number Generation Units 11a to 11c Basic Random Number Generation Circuits 12 Random Number Determination Units 12a to 12c Random Number Determination Circuits 13 Random Number Addition Units 13a to 13c Random Number Addition Circuits 14 Probability Setting Units 14a to 14c Probability Setting Circuits
Claims (1)
の基本乱数発生回路よりなる基本乱数発生部と、 前記基本乱数発生部におけるそれぞれの基本乱数発生回
路の出力が供給される乱数決定回路を複数個縦方向に接
続した乱数決定部と、 前記乱数決定部におけるそれぞれの乱数決定回路の出力
が供給される乱数加算回路を複数個縦方向に接続した乱
数加算部と、 前記乱数加算部におけるそれぞれの乱数加算回路に論理
“0”もしくは“1”を入力して論理“1”の最終的な
発生確率を設定する確率設定部とを備え、 前記乱数決定部は、それぞれの乱数決定回路において前
段の前記基本乱数発生回路より論理“0”が供給される
と論理“0”を前記乱数加算部に出力する手段と、前段
の前記基本乱数発生回路より論理“1”が供給される縦
方向最初の乱数決定回路のみが論理“1”を前記乱数加
算部に出力する共に、それより縦方向後段の乱数決定回
路の全てが前段の前記基本乱数発生回路の出力にかかわ
らず論理“0”を前記乱数加算部に出力する手段とを有
し、 前記乱数加算部は、それぞれの乱数加算回路において前
記乱数決定回路の出力と前記確率設定部の出力とのAN
Dをとると共に、その全てのORをとることにより前記
最終的な発生確率にて論理“1”を発生する手段を有す
ることを特徴とする乱数発生装置。1. A basic random number generator comprising a plurality of basic random number generators that generate a logic "1" with a predetermined probability, and a random number to which the output of each basic random number generator in the basic random number generator is supplied. A random number determining unit in which a plurality of determining circuits are connected in the vertical direction; a random number adding unit in which a plurality of random number adding circuits to which the outputs of the random number determining circuits in the random number determining unit are connected in the vertical direction; And a probability setting unit that inputs a logical “0” or “1” to each random number addition circuit in the unit to set the final occurrence probability of the logical “1”, and the random number determination unit determines each random number. In the circuit, when the logic "0" is supplied from the preceding basic random number generating circuit, a means for outputting the logic "0" to the random number adding unit and the logic "1" are supplied from the preceding basic random number generating circuit. Vertical Only the first random number determining circuit in the direction outputs a logical "1" to the random number adding unit, and all the random number determining circuits in the subsequent vertical direction are logical "0" regardless of the output of the basic random number generating circuit in the previous stage. For outputting to the random number addition section, the random number addition section outputs the AN of the output of the random number determination circuit and the output of the probability setting section in each random number addition circuit.
A random number generator having means for generating a logical "1" at the final occurrence probability by taking D and taking all ORs thereof.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7128938A JPH08305551A (en) | 1995-04-27 | 1995-04-27 | Random number generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7128938A JPH08305551A (en) | 1995-04-27 | 1995-04-27 | Random number generator |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH08305551A true JPH08305551A (en) | 1996-11-22 |
Family
ID=14997125
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7128938A Pending JPH08305551A (en) | 1995-04-27 | 1995-04-27 | Random number generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH08305551A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002037260A1 (en) * | 2000-10-24 | 2002-05-10 | Hmi Co., Ltd. | Random number generator |
| JP2005086670A (en) * | 2003-09-10 | 2005-03-31 | Toshiba Corp | Encryption / decryption module |
| JP2016071862A (en) * | 2014-09-22 | 2016-05-09 | 株式会社東芝 | String processor |
-
1995
- 1995-04-27 JP JP7128938A patent/JPH08305551A/en active Pending
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002037260A1 (en) * | 2000-10-24 | 2002-05-10 | Hmi Co., Ltd. | Random number generator |
| US7124157B2 (en) | 2000-10-24 | 2006-10-17 | Hmi Co., Ltd. | Random number generator |
| KR100845928B1 (en) * | 2000-10-24 | 2008-07-11 | 가부시키가이샤 에이치.에무.아이 | Random number generator |
| JP2005086670A (en) * | 2003-09-10 | 2005-03-31 | Toshiba Corp | Encryption / decryption module |
| JP2016071862A (en) * | 2014-09-22 | 2016-05-09 | 株式会社東芝 | String processor |
| US10095661B2 (en) | 2014-09-22 | 2018-10-09 | Kabushiki Kaisha Toshiba | String processor |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH0682528A (en) | Circuit for generating binary sequence having controllable weight | |
| JP2842389B2 (en) | Random number generator | |
| JPH08305551A (en) | Random number generator | |
| JPH10117291A5 (en) | ||
| JPH05135130A (en) | Logic simulation method and logic simulation apparatus | |
| JP2803601B2 (en) | Inversion circuit of finite field element | |
| JPH0795096A (en) | Programmable parallel CRC generator | |
| JPH06297775A (en) | Method and apparatus for converting gradation of image data | |
| JPS62114358A (en) | System for synthesizing automatically protocol | |
| EP0328899A2 (en) | Parity generator circuit and method | |
| JPH0580987A (en) | Pseudo random number generating system | |
| JP3485222B2 (en) | Ordered multiple electronic signature method and ordering multiple electronic signature system using the same | |
| JP3275957B2 (en) | Automatic IP address generation method | |
| JP4139878B2 (en) | Music data generation system, music data generation device, and music data generation method | |
| JPH05110450A (en) | Code generator | |
| JPH06324845A (en) | Computer-aided designing method of carry look-ahead adder | |
| JP3702475B2 (en) | Automatic circuit generator | |
| JP3204441B2 (en) | Code error inserter | |
| JP3164445B2 (en) | Decimal operation instruction processor | |
| JP2001014143A (en) | Decibel level adjustment device | |
| JPH09319457A (en) | Timing signal generation circuit | |
| JPH11150459A (en) | Pulse output circuit | |
| JPH05191222A (en) | Phase variable pulse generator | |
| JPH11212765A (en) | Addition circuit and addition device | |
| JPH05241795A (en) | M-series random number generation system |