在Multisim 10軟件環(huán)境下,設(shè)計(jì)一種由運(yùn)算放大器構(gòu)成的精確可控矩形波信號發(fā)生器,結(jié)合系統(tǒng)電路原理圖重點(diǎn)闡述了各參數(shù)指標(biāo)的實(shí)現(xiàn)與測試方法。通過改變RC電路的電容充、放電路徑和時(shí)間常數(shù)實(shí)現(xiàn)了占空比和頻率的調(diào)節(jié),通過多路開關(guān)投入不同數(shù)值的電容實(shí)現(xiàn)了頻段的調(diào)節(jié),通過電壓取樣和同相放大電路實(shí)現(xiàn)了輸出電壓幅值的調(diào)節(jié)并提高了電路的帶負(fù)載能力,可作為頻率和幅值可調(diào)的方波信號發(fā)生器。Multisim 10仿真分析及應(yīng)用電路測試結(jié)果表明,電路性能指標(biāo)達(dá)到了設(shè)計(jì)要求。
Abstract:
Based on Multisim 10, this paper designed a kind of rectangular-wave signal generator which could be controlled exactly composed of operational amplifier, the key point was how to implement and test the parameter indicators based on the circuit diagram. The duty and the frequency were adjusted by changing the time constant and the way of charging and discharging of the capacitor, the width of frequency was adjusted by using different capacitors provided with multiple switch, the amplitude of output voltage was adjusted by sampling voltage and using in-phase amplifier circuit,the ability of driving loads was raised, the circuit can be used as squarewave signal generator whose frequency and amplitude can be adjusted. The final simulation results of Multisim 10 and the tests of applicable circuit show that the performance indicators of the circuit meets the design requirements.
RSA算法 :首先, 找出三個(gè)數(shù), p, q, r, 其中 p, q 是兩個(gè)相異的質(zhì)數(shù), r 是與 (p-1)(q-1) 互質(zhì)的數(shù)...... p, q, r 這三個(gè)數(shù)便是 person_key,接著, 找出 m, 使得 r^m == 1 mod (p-1)(q-1)..... 這個(gè) m 一定存在, 因?yàn)?r 與 (p-1)(q-1) 互質(zhì), 用輾轉(zhuǎn)相除法就可以得到了..... 再來, 計(jì)算 n = pq....... m, n 這兩個(gè)數(shù)便是 public_key ,編碼過程是, 若資料為 a, 將其看成是一個(gè)大整數(shù), 假設(shè) a < n.... 如果 a >= n 的話, 就將 a 表成 s 進(jìn)位 (s
數(shù)字運(yùn)算,判斷一個(gè)數(shù)是否接近素?cái)?shù)
A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value.
Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not.
Input
Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone.
Output
For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise.
Sample Input
10 111
2 110
10 123
6 1000
8 2314
0
Sample Output
yes
yes
no
yes
no
The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d .
Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet.
Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1.
Definition