CN1776605A - Bias Q carrying system, carrying line digital engineering method computer technical scheme - Google Patents

Bias Q carrying system, carrying line digital engineering method computer technical scheme Download PDF

Info

Publication number
CN1776605A
CN1776605A CN 200510119815 CN200510119815A CN1776605A CN 1776605 A CN1776605 A CN 1776605A CN 200510119815 CN200510119815 CN 200510119815 CN 200510119815 A CN200510119815 A CN 200510119815A CN 1776605 A CN1776605 A CN 1776605A
Authority
CN
China
Prior art keywords
computing
carry
logic
register
common
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.)
Granted
Application number
CN 200510119815
Other languages
Chinese (zh)
Other versions
CN1776605B (en
Inventor
李志中
徐菊园
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.)
Individual
Original Assignee
Individual
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
Priority claimed from CN 200410094538 external-priority patent/CN1619486A/en
Application filed by Individual filed Critical Individual
Priority to CN200510119815.2A priority Critical patent/CN1776605B/en
Publication of CN1776605A publication Critical patent/CN1776605A/en
Application granted granted Critical
Publication of CN1776605B publication Critical patent/CN1776605B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to a digital engineering method and a computer filed, providing a novel digital engineering method, thereby obviously increasing the computing speed and greatly decreasing the error rate of manual computation. The invention adopts a method of by Q-ary base, carry set: K normal Q-ary numbers are converted into K or K or 2K by Q-ary numbers; and then the K or K or 2K by Q-ary numbers are summated. Each number is accomplished bit by bit from the least significant bit or each bit, and then the summation is counted into a next computing layer, besides, the obtained by Q-ary numbers is stored into the next computing layer or into the vacancy or 0 position of any datarow neighboring high significant bit not yet computed of the right computing layer. The computations are accomplished iteratively till only one number of the computing layer is obtained after being computed. The last number is the summation of the by Q-ary base method. The invention also provides a technical proposal of by Q-ary and carry set computer.

Description

The computer technical scheme of inclined to one side Q system, carry line number digit engineering method
Technical field
The present invention relates to the arithmetical unit of digital engineering method and computer realm, particularly computing machine
Background technology
Digital engineering comprises numerically-controlled machine, big-and-middle-sized digitizer and digital display circuit engineering or the like." digital engineering " is special finger " digital computing system engineering " among the present invention.It is not to solve concrete one by one arithmetic problem or theorem proving or geometrical issues or certain mathematical thought, but solves the digital engineering realization technical scheme of computing systems such as arithmetic rule itself.It and concrete computational tool are closely related.As everyone knows, " calculating " has multiple, except that " approximate treatment ", " analog computation " reach outside " no instrument calculates " (mental arithmetic, finger counting, mental arithmetic are calculated, and comprise corresponding pithy formula, calculate quickly, estimate), then is " digital computation that adopts instrument "." adopt the digital computation of instrument " and comprise that in history written calculation, rechoning by the abacus, machinery are calculated, zooming, and calculate etc.Only remaining three kinds of modern times, Here it is digital zooming, rechoning by the abacus, written calculation.Corresponding digital computing system engineering also just only has three kinds therewith: digital machine; Abacus; The digital computing system engineering that adopts pen and paper to carry out written calculation abbreviates " written calculation engineering " as.
Arithmetic is the fundamental operation of number.Said as Engels: " four fundamental rules (key elements of all mathematics).". addition is again the most basic computing of arithmetic.Therefore, we naturally should especially give special concern to additive operation to arithmetic.Arithmetic in the current number digit engineering method at first is an addition, and many parts not fully up to expectations are arranged.It is slow mainly to show as arithmetic speed; In subtraction, fail to make full use of the effect of negative, and, can not " connect and subtract ".Especially in the plus-minus join operation, can not settle at one go; In multiplication, the shortcoming of addition enlarges seriously more; In division, above-mentioned shortcoming still.In a word, at several bodies of minimum---in the rational number body, the arithmetic situation is dissatisfied.
The formula same form two
In the written calculation digital engineering,, show to have some implicit running programs, so that produce " hidden danger " to the dissection of computing.With " two number additions " is example, and formula is suc as formula one.[Wen Zhongfan does not indicate the number of numeral system, all refers to common decimal number.Down together.] wherein, on ten with several 3, dissect.Its microprogram operation is:
Figure A20051011981500082
The carry of coming up in individual position (seeing sign) Ten last 5,7 two numerals and the addition of low level carry, i.e. (5+7+1).Get itself and the position. Above-listed (5+7+1) and carry deliver to a high position (seeing sign).All the other every situations are similar.And for example example two, establish three number summations, and formula is suc as formula two 78+297+259=634.As can be seen, above-mentioned situation more increases the weight of.Obviously, there is following shortcoming:
A. carry indicates difficulty.If word table is bright decimally, then easily obscure and literal limited.Particularly just more annoying during table 456789; If write between numeral with ". " symbol, then easy and radix point is obscured and is represented that 456789 is also inconvenient; If with finger number number, then speed is slow and inconvenient; If mental arithmetic then takes mentality and fallibility.In a word, more disagreeable, easily make mistakes.
B. general two numbers will have three number additions to sue for peace during additions each on.So, need triple computings.When three and three above number additions are sued for peace, then more inconvenient.
C. checking computations are difficult.The general employing reformed one time, wastes time and energy.
Subtraction bothers than addition.And can not same vertical in " connect subtract ", must disconnect.When the plus-minus join operation, can not settle at one go especially.In the multiplication and division, this class situation is even more serious.And addition subtraction multiplication and division computing form disunity is made a fresh start during division.
On the other hand, in the robot calculator digital engineering, a large amount of numerical operations is arranged equally.These numbers generally all adopt the ordinary binary number to represent.Its negative is often represented with true form, radix-minus-one complement, complement code, frameshit and so on.Computing is all with two number computings in active computer, and can't realize " multiple arithmetic ".So-called " multiple arithmetic " is meant more than two numbers and adds and subtracts simultaneously.
In the robot calculator of common numeral systems such as other common Q systems of employing, there are corresponding many complicacy.[Q is a natural number.]
In addition, in the abacus digital engineering, a large amount of numerical operations is arranged equally.General ordinary binary and common quinary " the associating Q system " number of adopting of these numbers.Therefore, the computing pithy formula is numerous and diverse, and has more corresponding complicacy.
Summary of the invention
The present invention proposes a kind of new digital engineering method, significantly improves arithmetic speed; Strengthen the guarantee of computing correctness simultaneously, in " written calculation engineering ", reduce the error rate of written calculation greatly.
The present invention has proposed simultaneously, adopts the computer technical scheme of above-mentioned " mixing number system, carry row method ".On the basis of existing development technology, under the close situation of equipment amount, significantly improve computing machine, particularly the arithmetic speed of digital computer.
According to an aspect of the present invention, provide a kind of inclined to one side Q system, carry line number digit engineering method, adopt " Q system partially " number, with " mixing number system, carry row method " computing.Mix the computing of number system and can be one of following scheme; Scheme one: (being suitable in computing machine, the written calculation engineering) be common Q system number encoder or be converted to separately and mix number system numbers 1.; 2. mix number system computing (" liquidating ", " drawing Q ", " adding up "); 3. mix the number decoding of number system or be converted to common Q system number separately; Scheme two: (be suitable in computing machine, the abacus; Also can be used for written calculation engineering, also can; ) 1. common Q system number encoder or be converted to separately and mix number system numbers; Mixing number system number encoder is " the full system number of encoding "; 2. " the full system of encoding " computing (" liquidating ", " drawing Q ", " adding up "); 3. " the full system number of encoding " is decoded as and mixes number system number; Mix the number decoding of number system or be converted to common Q system number separately; Scheme three: (being suitable in the computing machine) be common Q system number encoder or be converted to separately and mix number system numbers 1.; Mix number system number encoders or be converted to separately 0, ± 1} scale-of-two (its special condition is an ordinary binary) number; 2. 0, ± 1} binary arithmetic (" liquidating ", " drawing Q ", " adding up "); 3. { 0, ± 1} binary number is deciphered or is converted to separately to mix and counts the system number; Mix the number decoding of number system or be converted to common Q system number separately; Scheme four: (being suitable in the computing machine) be common Q system number encoder or be converted to separately and mix number system numbers 1.; Mix number system number encoders or be converted to " coding { 0, ± 1} binary number " separately; 2. " coding 0, ± 1} scale-of-two " computing (" liquidating ", " drawing Q ", " adding up "); 3. " coding 0, ± 1} binary number " decipher or be converted to separately to mix and count the system number; Mix the number decoding of number system or be converted to common Q system number separately; Among the present invention, employing scheme one, scheme two are showed.Comprise following first kind of step:
The 1st step, establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show);
In the 2nd step,, carry out the summation operation of inclined to one side Q system to two numbers in K or the 2K number; Begin or every addition of step-by-step simultaneously from lowest order, promptly on a certain position, get this two numbers step-by-step addition; Adopt " liquidating ", " drawing Q ", add up, obtain this this position of two numbers " addition without carry " and number; This and number scale are gone into next operation layer, as " partly and " number; Gained " Q carry partially " simultaneously then is stored in the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
In the 3rd step, on an adjacent high position of above-mentioned certain, repeat the computing in the 2nd step; So repeatedly, until two number most significant digits also till the computing; When adopting concurrent operation, everybody carries out the 2nd step and the 3rd step computing simultaneously two numbers, and then this step can jump over over; When adopting serial-parallel operation, then similar processing;
The 4th step, get two numbers in addition in K or the 2K number, carry out the 2nd step and the 3rd step computing; So repeatedly, till all number average has been got in K or 2K number exclusive disjunction layer; When a remaining number only, then directly move to next operation layer as " partly and " number;
In the 5th step, in next operation layer, above-mentioned " step-by-step and " number and " carry " number are carried out aforementioned the 2nd step, the 3rd step, the 4th step summation operation; So repeatedly, in operation layer, only obtain till the number after the computing; Then last gained inclined to one side Q system additive operation and number are the K that asks common Q system and count the plus and minus calculation result;
Perhaps, adopt following second kind of step:
The 1st step, establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show);
In the 2nd step,, promptly on a certain position, get two numbers, K or the addition simultaneously of 2K number from lowest order; Adopt " liquidating ", " drawing Q ", add up; Promptly when two numbers, obtain this position of two numbers " addition without carry " and number; This and number scale are gone into next operation layer, as " partly and " number; Gained " Q carry partially " simultaneously then is stored in the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
The 3rd step, on above-mentioned certain position, get two numbers in addition in K or the 2K number, repeat the computing in the 2nd step; So repeatedly, till all number average has been got in K or 2K number exclusive disjunction layer; When a remaining number only, then directly move to next operation layer as " partly and " number;
When adopting same position to go up each number computing simultaneously, carry out the 2nd step and the 3rd step computing simultaneously, then this step can jump over over; At this moment on same position, to n be that 0 number carries out " liquidating " earlier; Then, carry out " stroke Q " to n with for the number of mQ; N is 〉=2 integer, and m is an integer; Gained " partially Q carry " then is stored in the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; On the same position, remaining each number carries out " adding up ", perhaps directly moves to next operation layer; Add up " majority adds up " of employing 〉=2; When adopting common two to count " adding up ", then the order serial adds up;
In the 4th step, on an adjacent high position of above-mentioned certain, repeat the computing in the 2nd step and the 3rd step; So repeatedly, until K or 2K number most significant digit also till the computing;
In the 5th step, in next operation layer, above-mentioned " step-by-step and " number and " carry " number are carried out aforementioned the 2nd step, the 3rd step, the 4th step summation operation; So repeatedly, in operation layer, only obtain till the number after the computing: then last gained inclined to one side Q system additive operation and number are the K that asks common Q system and count the plus and minus calculation result;
Perhaps, adopt following the third step:
The 1st step, establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show);
In the 2nd step, adopt so-called " two-dimentional computing "; That is, on everybody of K or 2K number, carry out computing simultaneously; And simultaneously on each, n and be that 0 number carries out " liquidating "; N is 〉=2 integer;
In the 3rd step, adopt so-called " two-dimentional computing "; That is, on everybody of K or 2K number, carry out computing simultaneously; And simultaneously on each, n and carry out " stroke Q " for the number of mQ; N is 〉=2 integer, and m is an integer; Gained " partially Q carry " then is stored in next operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
In the 4th step, adopt so-called " two-dimentional computing "; That is, on everybody of K or 2K number, carry out computing simultaneously; And simultaneously on each, remaining each number carries out " adding up ", perhaps directly moves to next operation layer; Add up " majority adds up " of employing 〉=2; When adopting common two to count " adding up ", then the order serial adds up;
In the 5th step, in next operation layer, above-mentioned " step-by-step and " number and " carry " number are carried out aforementioned the 2nd step, the 3rd step, the 4th step summation operation; So repeatedly, in operation layer, only obtain till the number after the computing; Then last gained inclined to one side Q system additive operation and number are the K that asks common Q system and count the plus and minus calculation result.
Inclined to one side Q system, carry line number digit engineering method, its computing are " Q system partially " computing; Wherein, 0, ± 1 ..., ± (Q/2-1), the Q/2}Q system, Q is a positive even numbers, is called " containing 0 symmetrical partially Q system partially "; ± 1 ..., ± (Q 1)/2, (Q+1)/the 2}Q system, Q is a positive odd number, is called " not containing 0 symmetrical partially Q system partially "; When unlikely misunderstanding, " Q system partially " promptly refers to " containing 0 symmetrical partially Q system partially ".
Inclined to one side Q system, carry line number digit engineering method, " carry row method " adopted in its computing; Promptly in calculating process, the carry that produces is left in the adjacent high position " carry row ", carry out computing with " step-by-step and " then.
Partially Q system, carry line number digit engineering method, when the n number in the 2K number was carried out summation operation, if on a certain position, wherein " step-by-step and " of n operand was zero, but generation carry m (with the n number consistent with numerical symbol); N is 〉=2 integer, and m is an integer; Carry is put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; Then, with certain all reset logically of position of n operand, no longer participate in later computing; This is called " drawing Q "; During m=0, be called " liquidating " in " draw Q "; Perhaps, do not adopt " liquidating " to reach " drawing Q ".
Inclined to one side Q system, carry line number digit engineering method, described operand is inclined to one side Q system number, Q is a natural number.Can not encode; Can mix several system number encoders; Also can complete one yard encode, be about to each figure place S of each inclined to one side Q system number, all arrange come corresponding from the lowest order order to high-order with | S| 1, all the other high positions are 0, and total bit then is Q/2 or (Q+1)/2; Simultaneously, with the number symbol of S, the number of promptly representing this is a plus or minus, as the number symbol on each in corresponding complete a yard; (increasing Q system and complete one yard referring to third part) when adopting complete one yard inclined to one side Q system of encoding to count, n number addition only is 1 or 1 a not repeated arrangement in the n number; Its complete one yard compiling can be decided code length or become code length.
According to another aspect of the present invention, provide a kind of inclined to one side Q system, carry row computing machine.Comprise input logic, the heavy arithmetical unit of 2K, output conversion logic and controller are formed; Among the present invention, all adopt 2K inclined to one side Q system number to show.Wherein, heavy arithmetical unit of 2K and controller are formed inclined to one side Q s operation control logic; Partially Q system number through the shift register input logic to the heavy arithmetical unit of 2K; In the heavy arithmetical unit of 2K, partially Q system number through 2K heavily computing obtain the result of inclined to one side Q system number, export by output logic with inclined to one side Q system number or common Q system number or common decimal number via scrambler output conversion logic, controller coordinate is controlled the logic of whole s operation control; Mix the computing of number system and can be one of aforementioned schemes; In the computing machine of the present invention, employing scheme two is showed; " the heavy arithmetical unit of 2K " is made up of totalizer ∑ i and register net, the net that liquidates, a stroke Q net; I is an ordinal number; When being used for computing machine, in the time of particularly in the robot calculator arithmetical unit, digital engineering method can adopt aforementioned first kind or second kind or the third step.Here, adopt the third step to show.
In the heavy arithmetical unit of 2K, be sign bit of each distribution of each register and corresponding totalizer ∑ i thereof, this sign bit is common two condition trigger; 2K register deposited 2K inclined to one side Q number of input.Adopt so-called " two-dimentional computing " in the heavy arithmetical unit of 2K.That is, the number everybody on carry out computing simultaneously; And each is several on each, also carries out elder generation simultaneously and " liquidates ", afterwards " draws Q ", " adds up ".When the instruction of next operation layer arrives, carry digit and " step-by-step and " number are carried out addition again; So repeat, in operation layer, only obtain till the number after the computing.At last, again through the totalizer ∑ i output number of suing for peace.Above-mentioned " the heavy arithmetical unit of 2K " when the 2K value is big, can carry out classification, grouping is amplified.
When the n number in the 2K number was carried out summation operation, if on a certain position, wherein " step-by-step and " of n operand was zero, but generation carry m (with the n number consistent with numerical symbol); N is 〉=2 integer, and m is an integer; Carry is put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; Then, with certain all reset logically of position of n operand, no longer participate in later computing; This is called " drawing Q "; During m=0, be called " liquidating " in " draw Q "; Perhaps, do not adopt " liquidating " to reach " drawing Q ".
Operand described in the computing machine is inclined to one side Q system number, and Q is a natural number.Available complete one yard coding; Or to mix number system number encoder; Or do not encode.When encoding with complete one yard, be about to each figure place S of each inclined to one side Q system number, all arrange come corresponding from the lowest order order to high-order with | S| 1, all the other high positions are 0, and total bit then is Q/2 or (Q+1)/2; Simultaneously, with the number symbol of S, the number of promptly representing this is a plus or minus, as the number symbol on each in corresponding complete a yard; When adopting complete one yard inclined to one side Q system of encoding to count, n number addition only is 1 or 1 a not repeated arrangement in the n number; Its complete one yard compiling can be decided code length or become code length; In the computing machine of the present invention, employing is decided code length and is showed.When adopting complete one yard coding, the totalizer in the heavy arithmetical unit of 2K can be economized slightly complete one yard shift register.This register is deposited result and number specially, is called " sum register " again.At this moment, as adopt above-mentioned " two-dimentional computing ", then be called " three-dimensional computing ".Corresponding arithmetical unit then is called " three-dimensional arithmetical unit ".
The components and parts that adopted in the computing machine are P value components and parts, and P is the radix of several units collection, and P is>1 integer; Perhaps often get the two-value components and parts; Perhaps get three value components and parts.
Description of drawings
Fig. 1 is the total logic diagram of inclined to one side Q system computing machine.
Fig. 2 is inclined to one side Q system, carry row computing machine (s operation control) logic diagram;
Fig. 3 is the logic diagram of the heavy arithmetical unit of 2K I position;
Fig. 4 is the logic diagram of logic (device liquidates) of liquidating;
Fig. 5 is a logic diagram of drawing Q logic (drawing the Q device);
Embodiment
The inclined to one side Q system of first, carry line number digit engineering method
1. " carry row method "
1.1 carry and " carry row method "
In numerical operations such as robot calculator, one of key that arithmetic speed improves just is " carry ".The acquisition of carry, the computing of participating in of the storage of carry and carry all is vital." carry " is exactly to strive " speed ".In written calculation engineering, also directly have influence on " error rate ".This part is example with the written calculation engineering.
So-called " carry row method " be exactly, in calculating process, the carry that produces left in participate on the equal position of computing and " step-by-step and " number, carries out computing with " step-by-step with " then.Usually the carry on everybody is arranged in delegation with two numbers in the operation layer during additions, is called " carry row ".(notion of operation layer sees next section.) be exemplified below, establish two common decimal number summations, formula is with vertical summation.Suc as formula three.
Figure A20051011981500141
Formula three formula five bit arithmetics of four formulas (6+8)=14, its carry 1 is written on the Gao Yiwei of next line.The rest may be inferred.Two numbers are disregarded the summation of carry during additions in the formula on everybody, are called " addition without carry ".Itself and be called " step-by-step and ".Step-by-step and data line, be called " is capable ". is capable to form " operation layer " with the carry row.Some "+" number save in the formula.Can know that later in mixing number system, carry line number digit engineering method " infiltrating method HJF ", except that the 0th operation layer, only there is a kind of computing in each " operation layer ", Here it is "+".So can in these operation layer, write out "+" number.
1.2 " carry row method " analyzed
1.2.1 the analysis of two number summations
The additive operation of adopting " carry row method " is by last joint as can be known:
1. two numbers have only two number additions during additions on each; In the carry row, directly indicate carry, do not have hell and high water;
2. check very convenient.
During [lemma one] two number additions, the position is gone up or is had carry to be designated as 1 arbitrarily, or no-carry is designated as 0;
During the additions of [lemma two] two number, the on the position and can be one of 0~9 arbitrarily.But, when oriented high-order carry is gone up in this position, the on this and can only be one of 0~8, and can not be 9.
Can get by [lemma one] and [lemma two]:
During the additions of [theorem one] two number, and if only if, and go up not when high-order carry certain position, the on this and just may occur 9.
1.2.2 level notion and operation layer
If two number summations.Formula is formula four, formula five.By formula four as seen, computing is carried out by different level.Operation layer is dissected into sub-computing with a computing.In each operation layer, again little computing is dissected in sub-computing.A simple operation is only finished in little computing." level " notion of computing that Here it is." level " notion is the key concept in the mathematics, and " carry row method " set up on this basis just.Additive operation method in the past, also implicit in essence " level " notion.Therefore, " level " in " carry row method " do not increase the complicacy of computing in general.Otherwise method has in the past further increased the complicacy of computing on the contrary owing to implied " level ".This point also further causes arithmetic speed to be lowered.The two contrast will be perfectly clear.
In " carry row method ", each operation layer of two number additions except that the 0th operation layer, can be merged into an operation layer.Suc as formula five.Further be analyzed as follows.
1.2.3 unique operation layer
During two number additions, under the particular case repeatedly operation layer can appear.Each layer is tied to form upright just like ShiShimonoseki.
During [lemma three] two number additions, when on certain the last operation layer carry being arranged, all carry can not appear on each operation layer thereafter.(getting) by lemma one, two
During [lemma four] two number additions, when on the operation layer after certain carry being arranged, must no-carry on each operation layer before it.(getting) by lemma one, two
During the additions of [theorem two] two number, on each operation layer of same position, or no-carrys all, or a carry can only be arranged.(getting) by lemma three, four
During [inference] two number additions, whole each layer carry row can be merged into a carry row; Except that the 0th operation layer, each operation layer can be merged into an operation layer.
1.2.4 three numbers and the above summation of three numbers are analyzed
If three number summations, formula is 231+786+989=2006 (seeing formula six).Establish six number summations again.Formula is 786+666+575+321+699+999=4046 (seeing formula seven).Key points for operation:
1. the utilization of " drawing Q "; So-called " drawing Q ", promptly the n number of Q system on certain position during addition, its addition without carry and be zero, but the last generation carry m (with the n number consistent) in this position with numerical symbol.N is 〉=2 integer, and m is an integer.Carry is put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; On certain position, this n number average is no longer participated in computing simultaneously.That is, when same position is gone up the n number and is mQ, n number average can be scratched, then in high-order room or 0 locate to mend m.Q=10 when the decimal system draws Q and is " drawing ten ".
Formula six formulas seven
Operation layer more than two and two can appear in 2. a plurality of several additions.In order to reduce the computing number of plies, among the same operation layer room on the same position or 0, the occupy-place arbitrarily of carry and and number; Carry in operation layer on certain can be put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
3. reduce operation layer as far as possible.A, less number directly merge and calculate; B, the carry in " pairing " of trying one's best; The number of c, the minimizing addition number on first operation layer of trying one's best makes second and two above operation layer not occur as far as possible.
4. on the same position, each number carries out " adding up ", perhaps directly moves to next operation layer; Add up " majority adds up " of employing 〉=2; When adopting common two to count " adding up ", then the order serial adds up; " identical number ", " consecutive numbers " etc., can be direct " part and ".
2. mix number and mix the number system
" 2.1 the theoretical SZLL of numeral system "
2.1.1 by with a kind of regular record number, be convenient to be used in a number system, carrying out the system of the number of computing, be called " system of number representation system ".Abbreviate " numeral system " as.The matter of one number is at first decided by the numeral system under it.En Gesi points out: " single number has obtained certain germplasm in number scale, and matter decides according to this number scale." " law of all numbers all depends on the number scale that is adopted, and is determined by this number scale." numeral system be the number attribute.There is not the number that does not have affiliated numeral system, do not have the numeral system that does not have affiliated number yet.
" numeral system theoretical SZLL " is exactly the science of the generation of studying numeral system, classification, analysis, comparison, conversion, calculating etc.It also is that the research numeral system is in other branches of mathematics such as number theory, the group theory, set theory, games theory; And wait each contiguous subject at multi valued logic, Wa1sh function, " narrow sense and broad sense mould are with opinion MSL "; The science of in computing machine, written calculation engineering and the abacus in digital engineering field, using particularly.It is one of basic theory of mathematics.Science of mathematics, the i.e. science of " number ".The basic of " number " is " numeral system ".Therefore, " the theoretical SZLL of numeral system " is the basis of " number theory ", is one of " core " of " core mathematics ".
2.1.2 place value system numeral system
If, construct a number system, number wherein locational to have nothing in common with each other " number symbol " is represented." number symbol " claims " numeral " again.Numeral is horizontal from right to left usually.For all given unit value of the whole numerals on each numerical digit (claiming " place value " again), it is worth by low (little) to high (greatly).With this numeral system of representing each number in the whole number system, be called " place value system numeral system ".Our numeral system discussed below all is " a place value system numeral system ".When unlikely misunderstanding, also directly abbreviate " numeral system " as.
2.1.3 three big key element: numerical digit I of numeral system, several collection Zi of unit and power Li.
A, numerical digit I represent the position of each bit digital of number in the numeral system.I is an ordinal number, and everybody represents from a left side from the right side.That is, i=1,2,3 ... represent the 1st, 2,3 of this number ... the position.
B, several collection Zi of unit represent the set that " several unit " on the I position forms.In the same number system, all of distinct symbols gone up in the same position of each number, forms the number symbol collection on this position.The element that this number symbol is concentrated is called " element of number ".Abbreviate " several unit " as.Therefore, this number symbol collection is called " several collection Z of unit ".Several collection Zi of unit can be different and different along with the value of i, also can be identical.When the Zi on everybody was identical Z, corresponding numeral system was called " single collection numeral system " or " single numeral system "; Zi on everybody is incomplete when identical, and corresponding numeral system is called " uniting the collection numeral system " or " associating numeral system ".
Several units among several collection Zi of unit can be plural number or other varied symbols.In " numeral system theory ", with aj represent several units (a1, a2, a3 ...), j is a natural number.Represent several first aj on the i position with iaj.Agreement during aj=-A (A is a plural number), can be expressed as aj=A.Several unit collection Zi with set a1 ..., aj ... represent, i.e. Zi={a1 ..., aj ...; Perhaps, Z i shows its feature with literal.For ease of calculating, first aj that peeks usually is an integer, represents with arabic numeral.
The radix Pi (Pi is a natural number) of several collection Zi of unit has represented the element sum that collects.En Gesi points out: it " not only determines its matter, and determines the matter of other all numbers." the value difference of Pi, indicated the variation of several collection Zi of unit.Pi on everybody is identical P, then is called " single radix "; Otherwise, be called " associating radix ".
In " the place value system numeral system " of " numeral system theory ", " room " expression " nothing " in the definition number, its place value is 0, is called " room 0 "." room 0 " be 0 a kind of, be a kind of expression-form of 0, be a kind of implicit 0.Usually do not indicated; Concentrate in several units, " room " is a kind of special several units, is called " room unit ".Abbreviate " empty unit " as." empty unit " is several units that each " place value system numeral system " several units collection all has, and it is " room " in the expression that several units concentrate.Usually do not indicated." empty unit " is that several units concentrate, and uniquely is not counted in several first aj usually, also disregards number, and promptly number is several units of 0; On the other hand, under particular case, for unified statement, then it is counted several units, its number counts 1.
C, power Li represent the place value size on the i position.Special this place value that claims is " power Li ".Li is a real number.For ease of calculating, weighting Li is integer, particularly natural number usually, represents with arabic numeral.Different Li has just determined different place values.In " coding theory ", the principal character of " coding " just is to weigh Li.
Power Li common in the reality adopts so-called " power power ".That is, make Li=Qi (i-1), Qi is a real number.For ease of calculating, getting Qi usually is natural number.Qi can represent by arabic numeral, also can Chinese small letter numeral represent.Common every Li is power power, and becomes the numeral system of geometric ratio Q.Q is called " truth of a matter " or " truth of a matter " of numeral system of numeral system power power.The difference of truth of a matter Q has determined different Li, thereby has determined different place values.Qi can be different and different along with the value of i, also can be identical.Numeral system power power Qi on everybody, when its truth of a matter was identical Q, corresponding numeral system was called " single Q system ".Abbreviate " Q system " or " system " as.Numeral system power power Qi on everybody, its truth of a matter is incomplete when identical, and corresponding numeral system is called " associating Q system ".Another kind of power Li commonly used adopts " waiting power ", and promptly the power L on everybody is identical.
According to three big key elements of above-mentioned numeral system, numeral system can have inexhaustible kind.
2.2 mix number and mix the number system
In several unit collection Zi, when containing several unit 0, this corresponding numeral system is called as " containing 0 numeral system ".For system, then be called " containing 0 system "; In several unit collection Zi, when not containing several unit 0, this corresponding numeral system is called as " not containing 0 numeral system ".For system, then be called " not containing 0 system ".
In several unit collection Zi, existing positive number unit, when negative unit was arranged again, corresponding numeral system was called as " mixing the number numeral system ".For system, then be called " mixing the number system "; Mix the number in the number numeral system, be called " mixing number ".Existing positive number unit has the number of negative unit again in " mix number ", claims " pure mixed number ".In several collection Zi of unit, when positive negative unit was opposite number, corresponding numeral system was called " symmetrical numeral system ".For system, then be called " symmetrical system ".
In several unit collection Zi, whole several units are continuous integral number when becoming " integer section ", and this corresponding numeral system is called as " integer hop count system ".For system, then be called " integer section system " Engels and point out: " zero all numbers all have more abundant content than other." in view of this special significance of " 0 ", in " numeral system theory ", contain 0 integer section and remove at 0 o'clock, still as a kind of special integer section.
2.3 inclined to one side Q system Q ' }
In " numeral system theory ", set up " algebraically number system ".The title of a numeral system adopts " Zi Li ".
To the Q system, then be ZiQi; During single numeral system, then be ZLi; When uniting the Q system in the single numeral system, then be ZQi.During the Q system, then be ZQ in the single numeral system.Wherein, Q represents with Chinese small letter number.
For the common Q system that contains 0, Z={0,1 ..., (Q-1) }.So ZQ={0,1 ..., (Q-1) } and Q, Q is>1 integer, is called " containing 0 common Q system ".Symbolic representation is for { to contain 0, Q}; For do not contain 01,2 ..., Q}Q, Q is a natural number, is called " not containing 0 common Q system ".Symbolic representation is not for { to contain 0, Q}.
Contain 0 and do not contain 0 common Q system, be referred to as " common Q system " altogether, Q is a natural number.Symbolic representation is { Q}.When unlikely misunderstanding, " containing 0 common Q system " also can be described as " common Q system ", and also { Q} represents with symbol.So can symbol { two } and { ten } represent the ordinary binary and the common decimal system.
Have in the Q system numeral system of integer hop count unit collection at any, when P=Q, the form that natural number can be unique continuously in this numeral system is expressed, and is called " numeral system continuously ", claims again " common numeral system ":
When P>Q, natural number can be continuous in this numeral system, but express with variform sometimes, is called " repetition numeral system ", or " enhancing numeral system ".For the Q system, be called " strengthening the Q system " again, abbreviate " increasing the Q system " as;
When P<Q, the form that natural number can only be interrupted in this numeral system is expressed, and is called " interrupted numeral system ", or " weakening numeral system ".For the Q system, be called " weakening the Q system " again, abbreviate " subtracting the Q system " as.
Mixed several systems herein are mainly following a few class.
For contain 00, ± 1 ..., ± (Q/2-1), the Q/2}Q system, Q is a positive even numbers, is called " containing 0 inclined to one side Q system ".Symbolic representation is { containing 0, Q ' }: for do not contain 0 ± 1, ± 2 ..., ± (Q-1)/2, (Q+1)/2}Q, Q is a positive odd number, is called " not containing 0 inclined to one side Q system ".Symbolic representation is { not containing 0, Q ' }.Contain 0 and do not contain 0 inclined to one side Q system, be referred to as " Q system partially " altogether, Q is a natural number.Symbolic representation is { Q ' }.When unlikely misunderstanding, " containing 0 inclined to one side Q system " also can be described as " partially Q system ", also represents with symbol { Q ' }.So can symbol { ten ' } and { two ' } represent that " decimal system partially " reach " inclined to one side scale-of-two ".In " numeral system theory ", the title of { ten ' } is: " single radix P=10 contains 0, integer section, Dui Cheng the decimal system partially ".Can be written as { ten, contain 0, integer section, symmetry partially } decimal system, perhaps be written as 0, ± 1, ± 2 ..., ± 4, the 5} decimal system.Generally speaking, further symbolic representation is { ten ' }, and be called " decimal system partially ": the title of { two ' } is: " single radix P=2 contains 0, integer section, Dui Cheng scale-of-two partially ".Can be written as { two, contain 0, integer section, symmetry partially } scale-of-two, perhaps be written as 0, the 1} scale-of-two.Generally speaking, further symbolic representation is { two ' }, is called " scale-of-two partially ".
2.4 mix number encoder
Count unit when the A system and wait when encoding with B system number, the A system is counted step-by-step and is arranged in corresponding B system number etc.This is called " with the A system number of codings such as B system number ", abbreviates " the A number of B coding " as, or " coding B number ", or " coded number ".Example, { ten } 328={ two } 101001000; Its " coding { two } number " is 0011,0010,1000.As above-mentioned " coding { 0, ± 1} binary number ", promptly refer to 0, " coded numbers " that ± 1} scale-of-two (its special condition is an ordinary binary) number is encoded.The computing of so-called " coding B number " is " coding B system " computing.At this moment, the position and the interdigit of A system number are the computing of A system, but then are the computing of B system in every.The A system is counted unit and is waited when encoding with B system number, and maximum figure places of required B system number are called " code length "." code length " fixed is called " deciding code length "; Do not indicated that as most significant digit 0 when making it to become " room 0 ", corresponding " code length " changes, and is called " change code length ".
Inclined to one side Q system, carry line number digit engineering method, described operand is inclined to one side Q system number, Q is a natural number.Can not encode; Can mix several system number encoders; Also can complete one yard encode, be about to each figure place S of each inclined to one side Q system number, all arrange come corresponding from the lowest order order to high-order with | S| 1, all the other high positions are 0, and total bit then is Q/2 or (Q+1)/2; Simultaneously, with the number symbol of S, the number of promptly representing this is a plus or minus, as the number symbol on each in corresponding complete a yard; When adopting complete one yard inclined to one side Q system of encoding to count, n number addition only is 1 or 1 a not repeated arrangement in the n number; Its complete one yard compiling can be decided code length or become code length; In the computing machine of the present invention, employing is decided code length and is showed.
3. " advance method PJF partially " and the decimal system { ten ' } arithmetic partially.
Adopt mixed number system and " carry row method " to carry out the method for rational number operation, be called " mixing number system, carry row method ", abbreviate " infiltrating method HJF " as.Adopt inclined to one side Q system and " carry row method " to carry out the method for rational number operation, be called " Q system, carry row method partially "; Abbreviate " advancing method PJF partially " as.When being used for abacus or written calculation digital engineering, employing be { ten ' } " advancing method PJF partially " of decimal system etc. partially.When being used for computing machine, in the time of particularly in the robot calculator, employing be { two ' } partially scale-of-two and { ten ' } " the advancing method PJF partially " of decimal system etc. partially.If K common Q system number participated in plus and minus calculation, K is 〉=2 integer, and Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; Mix the computing of number system and can be one of aforementioned schemes; Among the present invention, " infiltrating method HJF " employing scheme one is showed with written calculation engineering; Can adopt aforementioned first kind or second kind of step.Here, adopt second kind of step.
At first, { the Q} number conversion is K or 2K { Q ' } number with K.
(1) be example to contain { Q} → { Q ' } number conversion of 0:
Q}={0,1 ..., (Q-1) } and Q, Q is>1 integer ... 1.
{Q’}={0,±1,…,±(Q/2-1),Q/2}Q。Q is a positive even numbers ... 2.
By 1. reaching 2. as can be known, Q is 〉=2 even number.
Q≥2,2Q≥2+Q,Q≥Q/2+1,∴(Q-1)≥Q/2
When Q=2, (Q-1)=Q/2, promptly with absolute value, { two } maximum number unit represented { two } number equals { two ' } maximum number unit represented { two } number; When Q was>2 even number, (Q-1)>Q/2, promptly with absolute value, { Q} maximum number unit is represented, and { the Q} number was always greater than { Q ' } represented { the Q} number of maximum number unit.At this moment { Q} counts unit (Q-1)={ Q ' } 11.That is, { Q} counts unit (Q-1) and converts accordingly { Q ' } number to, is double figures 11.Wherein, high-order essence is " carry ".
Hence one can see that, and { the Q} number conversion becomes corresponding { Q ' } number when Q=2, still is { Q ' } number; When Q is>2 even number, can unify to become two { Q ' } number sums.One of them { Q ' number, be " carry row " number.K { the Q} number conversion becomes corresponding { Q ' } number when Q=2, still be K { Q ' } number: as Q during for>2 even number, can unify to become 2K { Q ' } and count sum.
(2) for the situation that does not contain 0, Q is a positive odd number.Can prove that similar conclusion is arranged.
(3) as with one (Q) number, be converted to one { Q ' } number separately, then K { the Q} number conversion is K { Q ' } number.
Among the present invention, all adopt 2K inclined to one side Q system number to show.
3.1{ ten ' } addition
Example: 1 23+344-43 3 (seeing formula eight)
Try to achieve in the formula and be 43 3.When needs are converted into the common decimal system { ten } when number and are 427.In general, sue for peace and 43 3 needn't transform (particularly as computation process intermediate result time).When really needing to transform, method is seen 4.1 conversion rules.
Figure A20051011981500211
Formula eight formulas nine formulas ten
3.2{ ten ' } subtraction
3.2.1 example 1 23-344=1 23+ 34 4=34 1
Example 11,2+1 4 4-32-1 25+1,3 3-5 4=1 32 (seeing formula nine)
At first subtraction turns to addition and comes computing.This comes in the actual computation, and plus-minus has just been merged into addition.This has just eliminated the difficulty that connects plus-minus usually, and this is because the characteristic of mixed number determines.
" 3.2.2 mixed approximately ".When this is meant n number summation on the same position, and if number be zero, then this n number can cancellation." mixed approximately " also can be described as " offseting " or " liquidating ".That is, during m=0, be called " liquidating " in " draw Q ".In formula, this n number on this can be scratched by oblique line, no longer participates in later computing.In actual operation, adopt elder generation's " liquidating ", back " to draw Q ", " add up " again, obtain the result of inclined to one side Q number.
3.3{ ten ' } multiplication
Example 2 42 * 1 31=11502 (formula ten)
3.4{ ten ' } division
Figure A20051011981500221
Formula ten same form 12
Example 14 33 2 ÷ 23,=25 1 ... 1
Main points: 1. formula 11 adopts former common division, now adopts four fundamental rules to unify formula.Suc as formula 12.
2. mix number owing to adopting in the formula 12, can make " subtracting " process in the division become " adding " process.
In order to remove the thinking of " subtracting " process, further can also make the dividend reversion.Then, whole " subtracting " process becomes " adding " process fully.This can make the complicacy of whole computing further reduce.After, division just carries out with this.Should be noted that and if remainder occurs, then will be only the remainder of final operation result this moment after this remainder reversion.
3.5 the characteristics of arithmetic
1. plus-minus method is merged into addition.
2. multiplication and division method is simple; " subtracting " process in the division can be changed into " adding " process; Examination merchant process in the division can be changed into and gives the iterative process of setting earlier.
3. the arithmetic addition subtraction multiplication and division all can significantly improve arithmetic speed all sidedly.
4. strengthen the guarantee of computing correctness, in " written calculation engineering ", reduce the error rate of written calculation greatly.
4. " partially the decimal system " { ten ' } and " the common decimal system " { tens' } relation.
4.1{ ten ' } with { ten } number transformation approach
Here the situation that refers to integer, for example { ten ' } 222 32 4={ ten } 221716 (formulas 13).{ ten } number needs to be converted into { ten ' } number through table one.
{ ten ' } number conversion becomes { ten } number.Method has several: a kind of is that { ten ' } number is become one positive one negative two { ten } number summation.This has good multimode.Wherein, be typically each positive number word bit in this { ten ' } number and 0 as { a ten } number just, and with each negative word bit as one negative { ten } number.Example { ten ' } 222 32 4={ ten } 222020-304=221716.Another is on everybody of this number, makes positive number constant: negative becomes its absolute value and gets " benefits " number to 10, and the while subtracted for 1 (promptly adding 1) in an adjacent high position.Another kind method is: on everybody of this number, the digital section of positive digital (or 0) is constant according to writing continuously.As 222 * 2 *.But when it did not count end (individual position) in { ten ' }, then lowest order added 1; The digital section of negative word then makes the negative word become its absolute value and gets " benefit " number to 9 continuously, as * * * 6 * 5.Then, add 1 at its lowest order.Like this, trying to achieve the result is 221716, is corresponding { ten } number.
Count the first place for negative when { ten ' } of need conversion, promptly should count when being negative, then the opposite number that will count converts { ten } number to, and the symbol of getting these { ten } number then gets final product for bearing.
4.2{ ten ' } with { ten } table of comparisons and explanation (seeing Table) thereof
Illustrate: the numeral system of corresponding this no repeat number is called inclined to one side Q system { Q ' }, the situation of Q=10 in the table one.
10 9876543210123456789 10--{ ten }
10 11 12 13 14 15 4321012345141312111 0--{ ten ' }
Table one { ten ' } and { ten } number table of comparisons
4.3{ ten ' } with { ten } relationship analysis
4.3.1{ ten } number is " corresponding one by one " relation with the relation of { ten ' } number.{ ten ' } number conversion is { ten } number, can only turn to a corresponding unique number.This is because { ten ' } number can directly obtain through { ten } number plus-minus, and the result that { ten } count behind the plus and minus calculation is unique.Otherwise { ten } number also can only turn to corresponding unique { ten ' } number.
4.3.2 can set up thus, the mapping relations each other of a kind of { ten ' } number and { ten } number.For arithmetic system, { ten } and { ten ' } number system " isomorphism ".The various fundamental operation character of corresponding { ten } number are also set up in { ten ' } number system.
4.3.3{ ten ' } P=Q in, thereby in this numeral system, natural number is that continuous unique form is expressed.It does not have diversity, has lacked corresponding dirigibility yet.
4.3.4 should be pointed out that obviously, above-mentioned to { ten } analysis with { ten ' }, fully corresponding to the analysis of { Q} with { Q ' }, because { ten } and { Q} isomorphism.Hence one can see that: 1. the relation of { Q} number with { Q ' } number is " corresponding one by one ".2. { Q} with { Q ' } number system " isomorphism ".It is corresponding that { the various fundamental operation character of Q} number system are also set up in { Q ' } number system.
5. comprehensively above-mentioned, following terse conclusion can be arranged:
Inclined to one side Q system Q ' } and reach " advancing method PJF partially " in digital engineering, can significantly improve arithmetic speed, and reduce the error rate of written calculation greatly.It is the mathematics pointed out of Qian Xuesen the 3rd time " direct applied engineering " to the greatest extent just.The method that this " engineering " and digital computation engineering are combined closely is called " Q system, carry line number digit engineering method partially ".
The inclined to one side Q system of second portion, carry row computing machine
Arithmetic is the basis of all computings, obviously also is the basis of computing machine, particularly robot calculator.Fig. 1 is the corresponding total logic diagram of Q system computing machine partially of computing machine of the present invention.Form by input logic 101, CPU central computer 102, external memory 103, output logic 104, control desk 105, output conversion logic 108, { Q} → { Q ' } conversion logic 109.Central computer 102 is made up of internal memory 106, inclined to one side Q s operation control logical one 07.The annexation of these parts is well known in the art.Wherein, common Q system number process Q} → and Q ' } conversion logic 109, code conversion becomes inclined to one side Q system number.Q system number is by input logic 101 input central computers 102 partially.And carrying out inclined to one side Q computing by inclined to one side Q s operation control logical one 07, operation result connects output conversion logic 108.The result with inclined to one side Q system number or common Q system number or common decimal number by output logic 104 outputs.Internal memory 106 and external memory 103 and s operation control logical one 07 swap data are carried out the program of original common Q system.Total operation is pressed blas control by control desk 105, realizes with time clock.
Fig. 2 is inclined to one side Q system, carry row computing machine (s operation control) logic diagram, by input logic 101, and the heavy arithmetical unit 202 of 2K, output conversion logic 108 and controller 201 are formed.Among the present invention, all adopt 2K inclined to one side Q system number to show.Wherein, the heavy arithmetical unit 202 of controller 201 and 2K is formed inclined to one side Q s operation control logical one 07.Common Q system number process Q} → and Q ' } conversion logic 109, code conversion becomes inclined to one side Q system number.Q system number is by input logic 101 input central computers 102 partially.When adopting complete one yard coding, as long as { sign symbol of Q} number is assigned to corresponding these several complete one yard each and gets on these complete one yard codings.Then, through Q} → and Q ' } conversion logic 109, code conversion is helped one yard inclined to one side Q system number.Input logic 101 is complete one yard shift register.Q system number is delivered to the heavy arithmetical unit 202 of 2K partially.In the heavy arithmetical unit 202 of 2K, partially Q system number through 2K heavily computing obtain the result of inclined to one side Q system number, via code translator output conversion logic 108 with inclined to one side Q system number or common Q system number or common decimal number by output logic 104 outputs.Controller 201 is coordinated the logic of the whole arithmetic and control unit of control.
Fig. 3 is the logic diagram of the heavy arithmetical unit of 2K I position, and I is an ordinal number; Mix the computing of number system and can be one of aforementioned schemes; In the computing machine of the present invention, employing scheme two is showed; " 2K weighs arithmetical unit " 202 is made up of totalizer ∑ i304 and register net 311, the net 312 that liquidates, a stroke Q net 313; I is an ordinal number; When being used for computing machine, in the time of particularly in the robot calculator arithmetical unit, digital engineering method can adopt aforementioned first kind or second kind or the third step.Here, adopt the third step to show.
Wherein register net 311 is made up of 1 register 1i301,2 register 2i302,2K register 2Ki303 etc.; Each register two or two links to each other; 2K register deposited 2K inclined to one side Q number of input; Totalizer ∑ i304 is and 2Ki register 303 corresponding totalizers, is used for depositing adding up and counting.Each distributes a sign bit each register and totalizer ∑ i304, and this sign bit is common two condition trigger; Sign bit also can be placed in the special-purpose sign bit register, when computing is to deposit the register of inclined to one side Q number or symbol of each distribution of totalizer.
Under the control of operational order, adopt in the heavy arithmetical unit 202 of 2K so-called " two-dimentional computing ".That is, on everybody of number, carry out computing simultaneously: and each is several each on, also carries out computing simultaneously.Then, " partly and " number is delivered in the register net 311, replaces former poke; Carry is delivered to the adjacent high position in the register net 311, replaces former poke.When the instruction of next operation layer arrives, carry digit and " step-by-step and " number are carried out addition again; So repeat, in operation layer, only obtain till the number after the computing.At last, again through the totalizer ∑ i304 output number of suing for peace.
In the computing machine corresponding calculated machine arithmetical unit of the present invention, except that adopting general totalizer computing,, can adopt " liquidating " to reach " drawing Q " logic in order to quicken computing.When the n number in the 2K number was carried out summation operation, if on a certain position, wherein " step-by-step and " of n operand was zero, but generation carry m (with the n number consistent with numerical symbol); N is 〉=2 integer, and m is an integer; Carry is put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; Then, with certain all reset logically of position of n operand, no longer participate in later computing; This is called " drawing Q "; During m=0, be called " liquidating " in " draw Q "; Perhaps, do not adopt " liquidating " to reach " drawing Q "." liquidating " and reaching " drawing Q " logic is simple ripe technically.Wherein, " liquidating ", " draw Q " are adopted n=2, Q, m=0, ± " drawing Q " of 1 o'clock; Components and parts adopt the two-value components and parts in the computing machine.
" liquidate " and reach " drawing Q " can adopt and liquidate net 312 and draw a Q net 313.The net 312 that liquidates is patrolled and examined by the logic 305 that liquidates; Or by the individual logic 305 that liquidates of K (2K-1), the logic that liquidates 306 ..., the logic that liquidates 307 composition that links to each other with each register two or two in the register net 311; Or form by the logic that liquidates of classification, grouping.Drawing Q net 313 is patrolled and examined by one stroke of Q logic 308; Or by individual stroke of Q logic 308 of K (2K-1), draw Q logic 309 ..., draw a Q logic 310 composition that links to each other with each register two or two in the register net 311; Or form by the Q logic of drawing of classification, grouping.
When adopting " liquidating " reach " drawing Q ", the instruction of being sent by controller or program is implemented " liquidating ", back " stroke Q " computing earlier to each of each operand.Draw " carry " (with computing and the same symbols of number) that Q produces, deliver to the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place.That is, " carry " delivered to the room of the adjacent high position of arbitrary register in the heavy arithmetical unit 202 of 2K or 0 and located set terminal.Then, carry out accumulating operation." most totalizer " of employing 〉=2 adds up; When adopting common two to count " totalizer ", then the order serial adds up.When adopting complete one yard coding, the totalizer ∑ i304 in the heavy arithmetical unit 202 of 2K can economize slightly complete one yard shift register.This register is deposited result and number specially, is called " sum register " again.At this moment, as adopt above-mentioned " two-dimentional computing ", then be called " three-dimensional computing ".Corresponding arithmetical unit then is called " three-dimensional arithmetical unit ".
Above-mentioned " 2K heavy arithmetical unit " when 2K value is big, in addition classification, the processing and amplifying of dividing into groups.
Fig. 4 is the logic diagram of logic (device liquidates) that liquidate.The logic typical combination that liquidates wherein, by the 2i position 302 of 1i position 301,2 registers of 1 register, with logic 403, different logic 404 and form with door 405; The 1i position 301 of 1 register and the 2i position 302 of 2 registers with sign bit, are common two condition trigger before it; When adopting complete one yard to encode and when adopting the two-value components and parts, liquidate and adopt n=2, m=0; The 1i position 301 of 1 register, complete one be encoded to 1i1 position 401,1i2, The 2i position 302 of 2 registers, complete one be encoded to 2i1 position 402,2i2, The Ki position 303 of K register, complete one be encoded to Ki1, Ki2, From 1i1,1i2 ... and 2i1,2i2 ..., until Ki1, Ki2 ..., among complete one yard coding all, appoint and get two and form combination; Example is got typical combination such as following in this: the 1i1 position 401 of 1 register, and its " 1 " end connects the input with logic 403, and " 21 " end of 1i1 symbol connects different logic 404 inputs; The 2i1 position 402 of 2 registers, its " 1 " end connects the input with logic 403, and " 1 " end of 2i1 symbol connects the input of different logic 404: the output with logic 403 connects and door 405 inputs; The output of different logic 404 connects and door 405 inputs; With the output of door 405, connect the reset terminal of the 1i1 position 401 and the 2 register 2i1 positions 402 of 1 register;
Fig. 5 is for drawing the logic diagram of Q logic (drawing the Q device).Wherein draw Q logic typical combination, by the 2i position 302 of 1i position 301,2 registers of 1 register, Q value decision logic 501, with logic 502 and with door 503 compositions; The 1i position 301 of 1 register and the 2i position 302 of 2 registers with sign bit, are common two condition trigger before it; When adopting complete one yard to encode and when adopting the two-value components and parts, draw Q and adopt n=Q, m=± 1; The 1i position 301 of 1 register, complete one be encoded to 1i1 position 401,1i2 ...: the 2i position 302 of 2 registers, complete one be encoded to 2i1 position 402,2i2, The Ki position 303 of K register, complete one be encoded to Ki1, Ki2, From 1i1,1i2 ... and 2i1,2i2 ..., until Ki1, Ki2 ..., among complete one yard coding all, appoint and get Q and form and make up; Example is got typical combination such as following in this: " 1 " end of 1i1 position 401 connects the input of Q value decision logic 501, and " 1 " end of 1i symbol connects the input with logic 502; " 1 " end of 2i1 position 402 connects the input of Q value decision logic 501; " 1 " end of 2i symbol connects the input with logic 502; So connect Q altogether; Q value decision logic 501 is accepted Q input altogether; The output of Q value decision logic 501 connects the input with door 503: accept Q input altogether with logic 502; Output with logic 502 connects and door 503 inputs; With door 503 output carries (same symbol), deliver to the adjacent high-order set terminal of arbitrary carry row register in the heavy arithmetical unit of K, and it is identical with the 1i symbol to put this seniority symbol; Simultaneously, with door 503 output carries, connect 401,2 register 2i1 positions 402,1i1 position and interior Q reset terminal altogether of combination of 1 register.
Inclined to one side Q system, carry row computing machine, wherein said operand is inclined to one side Q system number, Q is a natural number.Represent with complete one yard coding; Perhaps, to mix number system number encoder; Perhaps, do not encode; When encoding with complete one yard, be about to each figure place S of each inclined to one side Q system number, all arrange come corresponding from the lowest order order to high-order with | S| 1, all the other high positions are 0, and total bit then is Q/2 or (Q+i)/2; Simultaneously, with the number symbol of S, the number of promptly representing this is a plus or minus, as the number symbol on each in corresponding complete a yard; When adopting complete one yard inclined to one side Q system of encoding to count, n number addition only is 1 or 1 a not repeated arrangement in the n number; Its complete one yard compiling can be decided code length or become code length; In the computing machine of the present invention, employing is decided code length and is showed.
The components and parts that adopted in the computing machine are P value components and parts, and P is the radix of several units collection, and P is>1 integer: perhaps often get the two-value components and parts; Perhaps get three value components and parts.When adopting { Q ' } computing, and during with complete one yard coding (it is similar that other mix number systems), adopt in computing and control thereof that { 1,0, the 1} three-state is carried out.So components and parts in the computing machine adopt three value components and parts.When adopting the two-value components and parts, wherein 1,1 sign shows that with { a two } numerical table its power is 0.That is, with two { two } number encoders 1,0, the 1} three-state.At this moment, the totalizer ∑ i304 in the heavy arithmetical unit 202 of 2K can economize slightly general register.
When adopting { Q ' } computing, the input of arithmetical unit needs { decoding of Q} number be converted to { Q ' }.On the other hand, the output of arithmetical unit is at general pilot process, and unnecessary is { Q} number with { Q ' } number conversion.Only when needs output net result, just will { Q ' } number conversion be { Q} number (essence be only be { Q} number) with pure { Q ' } number conversion.At this moment, computing machine corresponding calculated machine of the present invention on output interface of " computing " numeral, only need add that { Q ' } is transformed into that { the Q} code translator gets final product.In principle, computing machine corresponding calculated machine of the present invention, its external memory and input/output terminal are with existing { Q} robot calculator just the same (comprising program).
In the computing machine computer system thereof of the present invention, adopt by " multiple arithmetic unit ".For example, adopt " eightfold arithmetical unit ".So-called " eightfold arithmetical unit " is about to 8 numbers and puts into 8 registers, the disposable plus and minus calculation of finishing.If multiplicity is 2K, then 2K=2t may more suitable (t be a natural number).So 2K=2,4,8 ...Wherein, practical is 2K=8,16,256,1024,4096 etc.Simultaneously, multiplication was exactly continuous addition in essence originally, and division was exactly continuous subtraction in essence originally.Therefore, in multiplication and division, computing machine corresponding calculated machine of the present invention also can use multiple plus-minus to handle.
Particularly when adopting complete one yard coding, in { Q ' } robot calculator, only need earlier " liquidating ", back " to draw Q ", just can obtain { Q ' } and count operation result.When net result need be exported, just incite somebody to action Q ' { the Q} number perhaps converts the output of { ten } number to number conversion one-tenth.
Brief summary:
One, computing machine corresponding calculated machine of the present invention is the robot calculator of inclined to one side Q system { Q ' }, is " advancing method PJF partially " robot calculator.
Two, partially the robot calculator of Q system { Q ' } makes the modern times and following based on the various robot calculator on other principles, comprises that the arithmetic speed of " superconducting computer ", " quantum computer " etc. improves greatly.With the eightfold arithmetical unit is example, and estimation roughly will make arithmetic speed improve five times.That is to say that former 200,000 times/s brings up to about 1,000,000 times/s; Former 2,000,000,000 times/s brings up to about 10,000,000,000 times/s.When 2K increases, then arithmetic speed also will further improve.
Third part increases Q system and complete one yard
1. increase the Q system
1.1 definition and symbol
In a Q system numeral system, the system of the system of all P>Q, particularly P=Q+1>Q is called " strengthening the Q system ".Q is a natural number.Abbreviate " increasing the Q system " as.Wherein, contain 0 integer section, the asymmetric Q of increasing system is called " containing the 0 asymmetric Q of increasing system ".Obviously, { 0,1, the 2} scale-of-two is " containing the 0 asymmetric scale-of-two that increases "; { 1,0, the 1} scale-of-two is " contain 0 symmetry and increase scale-of-two ".In addition, also have other to increase scale-of-two.
1.2{0,1} one system and computing thereof
Increase in the Q system, when Q=1, be and increase a system.Increase in the system, mainly contain two kinds.The first 0, and 1} one system, it can represent whole nonnegative integers.Its components and parts are the two condition device.It two is 1, and 1} one system, it can represent whole integers.Its components and parts also are the two condition device.Alleged below this paper " increasing a system ", except that indicating especially, all refer to 0,1} one system.
0, the computing of 1} one system.Here list additive operation, { ten } 4+3+2=9={0 for example, 1} one system 110101+1011+101=11001100010101011=...
1.3{0,1} one system and the { relation of Q}.
1.3.1{0,1} one system number and the { transformation approach of Q} number.
{ 0, { the Q} number can be with { 0, each bit digital 1 in the 1} one system number is so that { the Q} counting gets final product for 1} one system number conversion one-tenth.Gained Q} counting and, be corresponding { Q} number.In other words, and 0, have severally 1 in the 1} one system number, it is then corresponding that { the Q} number is several.Obviously, this is foolproof rule.(table two }
Q) number conversion becomes that { 0,1} one system number can { Q} counts everybody and all multiply by power on everybody, then these is amassed with 1 of same number, and { 0,1} one system numerical digit is put, and lists getting final product in unduplicated mode to be expressed respectively.In other words, the Q} number is several, then 0, just have several 1 in the 1} one system number.Obviously, this also is foolproof rule.(seeing Table three)
1.3.2{0 1} one system number is with { Q} counts the table of comparisons and explanation thereof
Figure A20051011981500292
Table two table three
Figure A20051011981500293
Table four
Illustrate: 1. { 0,1} one system number can be represented all { Q} numbers
2. more repeat number is arranged, with 40,1} one system number is an example, and except that 0 and 4 unique, all the other all have repeat number.Wherein, 1 has 4; 2 have 6; 3 have 4.So, be respectively 1,4 from 0~4 repeat number, 6,4,1.This is consistent with binomial expansion coefficient C2Kn.Figure place n is a natural number, and 2K is 0~n.(table four is raised the brightness triangle.)
3. in the table Representation is all abbreviations of " nonnegative integer individual 0 continuously ".Promptly
Figure A20051011981500295
, can be 00, can be 10, can be 00, can be 000 ... etc. form.The set that this form is represented is called " connecting collection ".Obviously, " connecting collection " is infinite set.If E is an integer, then E is " connecting collection " of E, abbreviates " connecting E " as.Pronounce " E point ".With " even collection " one group of infinite number that form is represented, be called " connect and collect array " or " connecting collection group number ".
1.3.3{0,1} one system and { Q} relationship analysis.
(1) Q 1, and Q is a natural number; 1 is minimum natural number, also is the most basic natural number unit.Q really comprises 1, this make corresponding Q} with 0, have the contact of nature between 1} one system.
(2) { the Q} number is with { 0, the relation of 1} one system number is " corresponding more than one " relation, rather than " corresponding one by one " relation.0, P=Q+1>Q in 1} one system, thereby in this numeral system, variform appears in natural number sometimes expresses, this is this numeral system dirigibility place just.We can say that also { 0,1} one system is to have exchanged dirigibility for diversity.P=Q among the Q}, thereby in such number, natural number is that continuous unique form is expressed.It does not have this species diversity, has lacked this corresponding dirigibility yet.
(3) { 0,1} one system number conversion is that { the Q} number can only turn to a corresponding unique number.This is because { 0,1} one system number can be through { Q} number plus-minus directly obtains, and { result that Q} counts behind the plus and minus calculation is unique.Otherwise { the Q} number also can only turn to corresponding unique one group, and { 0,1} one system " connects collection group number ".So this { " " of Q} number is with { 0, " one " that 1} one system " connects collection group number " organizes, and the two is " corresponding one by one " relation.Thus, can set up a kind of 0,1} one system number and the { mapping relations each other of Q} number.For arithmetic system, and Q} with 0,1} one system number system " isomorphism ".Corresponding the various fundamental operation character of Q} number, also 0, set up in the 1} one system number system.
1.4{0, the application of 1} one system
0,1} one system since with the unit 1 be equipped with 0 the structure number, and power be 1, so its " computing " often realizes with " transmission ".This is that { 0,1} one system is counted one of quick reason of computing.{ 0,1} one system is counted " carry " in the computing, and also with the addition without carry of two number present bit be 0, and carry is Q's " draw Q " logic realization.This " transmission " reaches the logic realization of " drawing Q ", and simple in structure, speed is fast.This is, and { 0,1} one system is counted computing former fast therefore two.When 0, when 1} one system number and various mixed several systems are counted associative operation, replenished again that " liquidating " this structure is more simple, speed logic more fast.This is, and { 0,1} one system is counted computing former fast therefore three.
It is above-mentioned that { 0,1} one system combines with various mixed several systems, makes function strengthen more.Consider that { 0,1} one system → { Q} → various mixed several systems, this wherein has inherent contact.Obviously, everything is all in the contemplation.
2. a full system and a full coding
2.1 a full system and a full number
{ 0, the diversity of 1} one system number has just obtained the dirigibility of various processing.But, because { 0, form that 1} one system number " connects collection " has and only has a kind of And have extreme various, " connecting collection " form more than in same number, can occurring once.Cause the form of same number too various thus, be difficult to hold, be not easy to control, certainly will increase equipment and influence arithmetic speed.Therefore, in the ordinary course of things, be necessary { 0,1} one system number is certain constraint condition in addition.This has just produced " a full system ".
0, and in the positive integer of 1} one system, limiting each group " even collection group number " and only choose from a position beginning, continuous from right to left unique a kind of form of arranging unit 1 is expressed; Be 0 on the high position, or represent with the room.For example: { ten } number 3={0,1} one system several 111/111
Figure A20051011981500311
/ 11
Figure A20051011981500312
1/ ... ("/" table " perhaps ") is defined as { ten } 3={0,1} one system 111.Like this, the repetition number average during each group " connects collection group number " is deleted, and the only surplus next one is unique form of 1 entirely, and we are called " a full number ".The system of expressing " a full number " is referred to as " a full system ".In the table three, { 0, the leftmost form of 1} one system number is " a full system " number.Therefore, " a full system " can be add the particular constraints condition 0,1} one system.
In " the place value system numeral system " of " numeral system theory ", the room in the definition number represents to have implicit " room 0 "; Concentrate in its several units, " room " is a kind of special several units, is called " room unit ".Abbreviate " empty unit " as.Therefore, " a full system " can never contain 0 common Q system and { not contain 0, { the 1} one system acquisition among the Q}; So can define " a full system " for { 1} one system, { one } represents with symbol.When considering positive negative integer, can be with the sign symbol of this full system number, be assigned to this number everybody get on, thereby construct everybody all with the full system number of same-sign.Except that indicating especially, all refer to this kind " a full system " among the present invention, also represent with symbol { }.
" a full system " also can never contain for 0 " { 1,1} one system " that increases in the system, and the addition of constraints condition obtains.Constraint condition is this system number, and it is all identical everyly to go up symbol; In addition, can also mix the number system from other obtains.
2.2 complete one yard
-complete-sign indicating number { two }
0 1 0 1
Nine complete-sign indicating numbers { ten }
00…0 00…1 00…11  111111111 0 1 2  9
Table five table six
A full system obviously has following relative merits.Advantage: 1. fast operation." transmission " replaced " upset ".2. during multiple arithmetic, do not need two or two summations, only need elder generation " liquidate " back " draw Q " and get final product the result.This has just accelerated overall arithmetic speed greatly.3. with { Q} changes convenient; Shortcoming: 1. " word length " is oversize, and figure place is many.(when getting variable word length, its average word length only is half.) 2. the load quantity of information is less.Therefore, according to the relative merits of a full system, maximizing favourable factors and minimizing unfavourable ones, is suitable with a full system number various mixed several system numbers of encoding.Encode with " a full system " number, be called " a full coding "." a full number " that adopts in " a full coding " is called " complete one yard ".Table five demonstrates complete one yard one, the situation of coding { two } several units.By table five as seen, { two } of complete one yard coding number is { two } number itself.Table six demonstrates with complete one yard nine, the situation of coding { ten } several units.By table six as seen, { ten } of complete one yard nine coding number, code length increases to 9 times.(when getting variable code length, its mean code length only is 5 times.) for example: the complete one yard=≡ of { ten } 23=.For various mixed several system numbers, all can complete one yard encode.
2.3 complete one yard calculating.
Complete one yard calculating is very simple.N number addition only is 1 or 1 a not repeated arrangement in the n number, is called " row 1 ".With two number additions is example, as 11+111=11111.Particularly, in the digital engineering of various mixed several systems, only need " liquidating " back " stroke Q " earlier, just can obtain the operation result of various mixed several system numbers.When net result need be exported, just will convert { Q} or the output of { ten } number to various mixed several system numbers of complete one yard coding.
2.4 complete one yard application.
Complete one yard is mainly used in { Q} number and various mixed several system numbers are encoded.Particularly,
1. adopt complete one yard nine codings { ten } numbers, can realize the common decimal system { ten }, complete one yard, carry row computing machine and written calculation engineering and abacus.
2. adopt complete one yard five codings { ten ' } number, can realize the inclined to one side decimal system { ten ' }, complete one yard, carry row computing machine and written calculation engineering and abacus.
3. adopt complete one yard various mixed several system number of coding, can realize various mixed several systems, complete one yard, carry row computing machine and written calculation engineering and abacus.
4. adopt complete one yard encode { ten } or { ten ' } several or various mixed several system numbers, come secondary coding with " positive and negative sign indicating number " again, can realize the new solution of another abacus.
The inclined to one side decimal system of the 4th part { ten ' }, complete one yard, carry row computing machine
(1) in the human history, the breadth and depth of { ten } computing application, all be other numeral systems can not compare.The inside information and the deposition of human long history culture make { ten } have unbreakable most distinguished status.Therefore, the inclined to one side decimal system { ten ' } computing machine has the meaning of particular importance.For this reason, list the inclined to one side decimal system { ten ' }, complete one yard, carry row computing machine especially this part.
(2) the inclined to one side decimal system { ten ' } " advancing method PJF partially " is adopted in the computing of this computing machine.Mix the computing of number system and can be one of aforementioned schemes; In the computing machine of the present invention, employing scheme two is showed; When being used for computing machine, in the time of particularly in the robot calculator arithmetical unit, digital engineering method can adopt aforementioned first kind or second kind or the third step; Here, adopt the third step to show.
(3) the inclined to one side decimal system { ten ' }, complete one yard, carry row computing machine are complete one yard five { ten ' } computing machines of encoding.Its complete one yard compiling can be decided code length or become code length; In the computing machine of the present invention, employing is decided code length and is showed.At this moment, adopt in computing and control thereof that { 1,0, the 1} three-state is carried out.The components and parts that adopted in the computing machine are three value components and parts; Perhaps often get the two-value components and parts.When adopting the two-value components and parts, wherein 1,1 sign shows that with { a two } numerical table its power is 0.That is, with two { two } number encoders 1,0, the 1} three-state.
(4) the inclined to one side decimal system { ten ' }, complete one yard, the total logic diagram of carry row robot calculator, as shown in Figure 1.Partially in the decimal system { ten ' }, complete one yard, carry row robot calculator, { ten ' } number is converted to common decimal number with complete one yard five encode input and final outputs.When adopting { ten ' } computing, the input of arithmetical unit needs { ten } number conversion is { ten ' } number.Among the present invention, all adopt 2K inclined to one side Q system number to show.When adopting complete one yard coding, as long as, be assigned to complete one yard each of corresponding these numbers and get on the sign symbol of these { ten ' } number.On the other hand, in the output of arithmetical unit, general pilot process is unnecessary to be { ten } number with { ten ' } number conversion.Only when needs output net result, { ten ' } number conversion is { ten } number (essence is only pure { ten ' } number conversion to be { ten } number).At this moment, computing machine of the present invention is on the output interface of " computing ", and the code translator that { ten ' } that only need add simple especially complete one yard coding is transformed into { ten } gets final product.There is not hell and high water technically in this point.In principle, computing machine corresponding calculated machine of the present invention, its external memory and input/output terminal and existing { ten } robot calculator just the same (comprising program).
(5) partially in the decimal system { ten ' }, complete one yard, carry row electronic computer system, adopt by " multiple arithmetic unit ".For example, adopt " eightfold arithmetical unit ".So-called " eightfold arithmetical unit " is about to 8 numbers and puts into 8 registers, the disposable plus and minus calculation of finishing.If multiplicity is 2K, then 2K=2t may more suitable (t be a positive integer).Wherein, practical may be 2K=8,16,256,1024,4096 etc.Simultaneously, multiplication was exactly continuous addition in essence originally, and division was exactly continuous subtraction in essence originally.Therefore, in multiplication and division, computing machine of the present invention also can use multiple plus-minus to handle.
(6) partially the decimal system { ten ' }, complete one yard, carry row robot calculator adopt " liquidating " reach " stroke ten " logic.When it carried out summation operation to the n number in the 2K number, if on a certain position, wherein " step-by-step and " of n operand was zero, but generation carry m (with the n number consistent with numerical symbol); N is 〉=2 integer, and m is an integer; Carry is put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; Then, with certain all reset logically of position of n operand, no longer participate in later computing; This is called " drawing Q "; During m=0, be called " liquidating " in " draw Q "; Perhaps, do not adopt " liquidating " to reach " drawing Q "." liquidating " and reaching " drawing ten " logic is simple ripe technically.See Fig. 4 and Fig. 5.
Adopt so-called " two-dimentional computing " in the heavy arithmetical unit of 2K.That is, the number everybody on carry out computing simultaneously; And each is several on each, also carries out elder generation simultaneously and " liquidates ", afterwards " draws Q ", " adds up ".When the instruction of next operation layer arrives, carry digit and " step-by-step and " number are carried out addition again; So repeat, in operation layer, only obtain till the number after the computing.At last, again through the totalizer ∑ i output number of suing for peace; When adopting complete one yard coding, as adopt above-mentioned " two-dimentional computing ", then be called " three-dimensional computing ".Corresponding arithmetical unit then is called " three-dimensional arithmetical unit ".Particularly, in { ten ' } complete one yard, carry row robot calculator, only need elder generation's " liquidating ", back " to draw ten ", just can obtain operation result.When net result need be exported, { the ten ' } number conversion with complete one yard coding became the output of { ten } number.
Brief summary:
One, complete one yard of the inclined to one side decimal system { ten ' }, carry row computing machine are the inclined to one side decimal system { ten ' } computing machines, are " advancing method PJF partially " computing machines.
Two, complete one yard of the inclined to one side decimal system of the present invention { ten ' }, carry row computing machine, its corresponding robot calculator, make the modern times and following, comprise that the arithmetic speed of " superconducting computer ", " quantum computer " etc. improves greatly based on the various robot calculator on other principles.With the eightfold arithmetical unit is example, and estimation roughly will make arithmetic speed improve more than five times.That is to say that former 200,000 times/s brings up to about 1,000,000 times/s; Former 2,000,000,000 times/s brings up to about 10,000,000,000 times/s.When 2K increases, then arithmetic speed also will further improve.

Claims (10)

1. the computer technical scheme of an inclined to one side Q system, carry line number digit engineering method adopts Q system number, with the computing of Q system; Q is a natural number; It is characterized in that, adopt " Q system partially " number, with " mixing number system, carry row method " computing.
2. as the computer technical scheme of the inclined to one side Q system of claim 1, carry line number digit engineering method, it is characterized in that " mixing number system, carry row method " computing can be one of following scheme; Scheme one: (being suitable in computing machine, the written calculation engineering) be common Q system number encoder or be converted to separately and mix number system numbers 1.; 2. mix number system computing (" liquidating ", " drawing Q ", " adding up "); 3. mix the number decoding of number system or be converted to common Q system number separately; Scheme two: (be suitable in computing machine, the abacus; Also can be used for written calculation engineering, also can; ) 1. common Q system number encoder or be converted to separately and mix number system numbers; Mixing number system number encoder is " the full system number of encoding "; 2. " the full system number of encoding " computing (" liquidating ", " drawing Q ", " adding up "); 3. " the full system number of encoding " is decoded as and mixes number system number; Mix the number decoding of number system or be converted to common Q system number separately; Scheme three: (being suitable in the computing machine) be common Q system number encoder or be converted to separately and mix number system numbers 1.; Mix number system number encoders or be converted to separately 0, ± 1} binary number (its special condition is " an ordinary binary number "); 2. 0, ± 1} binary arithmetic (" liquidating ", " drawing Q ", " adding up "); 3. { 0, ± 1} binary number is deciphered or is converted to separately to mix and counts the system number; Mix the number decoding of number system or be converted to common Q system number separately; Scheme four: (being suitable in the computing machine) be common Q system number encoder or be converted to separately and mix number system numbers 1.; Mix number system number encoders or be converted to " coding { 0, ± 1} binary number " (its special condition be " ordinary binary of an encoding number ") separately; 2. " coding 0, ± 1} binary number " computing (" liquidating ", " drawing Q ", " adding up "); 3. " coding 0, ± 1} binary number " decipher or be converted to separately to mix and count the system number; Mix the number decoding of number system or be converted to common Q system number separately; Among the present invention, employing scheme one, scheme two are showed.
3. as the computer technical scheme of the inclined to one side Q system of claim 1-2, carry line number digit engineering method, it is characterized in that " mixing number system, carry row method " comprises following first kind of step:
The 1st step, establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show);
In the 2nd step,, carry out the summation operation of inclined to one side Q system to two numbers in K or the 2K number; Begin or every addition of step-by-step simultaneously from lowest order, promptly on a certain position, get this two numbers step-by-step addition; Adopt " liquidating ", " drawing Q ", add up, obtain this this position of two numbers " addition without carry " and number; This and number scale are gone into next operation layer, as " partly and " number; Gained " Q carry partially " simultaneously then is stored in the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
In the 3rd step, on an adjacent high position of above-mentioned certain, repeat the computing in the 2nd step; So repeatedly, until two number most significant digits also till the computing; When adopting concurrent operation, everybody carries out the 2nd step and the 3rd step computing simultaneously two numbers, and then this step can jump over over; When adopting serial-parallel operation, then similar processing;
The 4th step, get two numbers in addition in K or the 2K number, carry out the 2nd step and the 3rd step computing; So repeatedly, till all number average has been got in K or 2K number exclusive disjunction layer; When a remaining number only, then directly move to next operation layer as " partly and " number;
In the 5th step, in next operation layer, above-mentioned " step-by-step and " number and " carry " number are carried out aforementioned the 2nd step, the 3rd step, the 4th step summation operation; So repeatedly, in operation layer, only obtain till the number after the computing; Then last gained inclined to one side Q system additive operation and number are the K that asks common Q system and count the plus and minus calculation result;
Perhaps, adopt following second kind of step:
The 1st step, establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show);
In the 2nd step,, promptly on a certain position, get two numbers, K or the addition simultaneously of 2K number from lowest order; Adopt " liquidating ", " drawing Q ", add up; Promptly when two numbers, obtain this position of two numbers " addition without carry " and number; This and number scale are gone into next operation layer, as " partly and " number; Gained " Q carry partially " simultaneously then is stored in the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
The 3rd step, on above-mentioned certain position, get two numbers in addition in K or the 2K number, repeat the computing in the 2nd step; So repeatedly, till all number average has been got in K or 2K number exclusive disjunction layer; When a remaining number only, then directly move to next operation layer as " partly and " number;
When adopting same position to go up each number computing simultaneously, carry out the 2nd step and the 3rd step computing simultaneously, then this step can jump over over; At this moment on same position, to n be that 0 number carries out " liquidating " earlier; Then, carry out " stroke Q " to n with for the number of mQ; N is 〉=2 integer, and m is an integer; Gained " partially Q carry " then is stored in the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; On the same position, remaining each number carries out " adding up ", perhaps directly moves to next operation layer; Add up " majority adds up " of employing 〉=2; When adopting common two to count " adding up ", then the order serial adds up;
In the 4th step, on an adjacent high position of above-mentioned certain, repeat the computing in the 2nd step and the 3rd step; So repeatedly, until K or 2K number most significant digit also till the computing;
In the 5th step, in next operation layer, above-mentioned " step-by-step and " number and " carry " number are carried out aforementioned the 2nd step, the 3rd step, the 4th step summation operation; So repeatedly, in operation layer, only obtain till the number after the computing; Then last gained inclined to one side Q system additive operation and number are the K that asks common Q system and count the plus and minus calculation result;
Perhaps, adopt following the third step:
The 1st step, establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show);
In the 2nd step, adopt so-called " two-dimentional computing "; That is, on everybody of K or 2K number, carry out computing simultaneously; And simultaneously on each, n and be that 0 number carries out " liquidating "; N is 〉=2 integer;
In the 3rd step, adopt so-called " two-dimentional computing "; That is, on everybody of K or 2K number, carry out computing simultaneously; And simultaneously on each, n and carry out " drawing Q " for the number of mQ: n is 〉=2 integer, and m is an integer; Gained " partially Q carry " then is stored in next operation layer, the room of the adjacent high position of arbitrary data line or 0 place;
In the 4th step, adopt so-called " two-dimentional computing "; That is, on everybody of K or 2K number, carry out computing simultaneously; And simultaneously on each, remaining each number carries out " adding up ", perhaps directly moves to next operation layer; Add up " majority adds up " of employing 〉=2; When adopting common two to count " adding up ", then the order serial adds up;
In the 5th step, in next operation layer, above-mentioned " step-by-step and " number and " carry " number are carried out aforementioned the 2nd step, the 3rd step, the 4th step summation operation; So repeatedly, in operation layer, only obtain till the number after the computing; Then last gained inclined to one side Q system additive operation and number are the K that asks common Q system and count the plus and minus calculation result.
4. as the computer technical scheme of the inclined to one side Q system of claim 1-3, carry line number digit engineering method, it is characterized in that, " mixed number system, carry row method " is when carrying out summation operation to the n number in 2K the inclined to one side Q system number, if on a certain position, wherein " step-by-step and " of n operand is zero, but produces carry m (with on this position of n number consistent with numerical symbol); N is 〉=2 integer, and m is an integer; Carry is put into the not computing as yet of next operation layer or this operation layer, the room of the adjacent high position of arbitrary data line or 0 place; Then, with certain all reset logically of position of n operand, no longer participate in later computing; This is called " drawing Q "; During m=0, be called " liquidating " in " draw Q "; Perhaps, do not adopt " liquidating " to reach " drawing Q ".
5. as the computer technical scheme of the inclined to one side Q system of claim 1-4, carry line number digit engineering method, it is characterized in that " mixing number system, carry row method " wherein said operand is inclined to one side Q system number, Q is a natural number; It is characterized in that, can not encode; Can mix several system number encoders; Also can complete one yard encode, be about to each figure place S of each inclined to one side Q system number, all arrange come corresponding from the lowest order order to high-order with | S| 1, all the other high positions are 0, and total bit then is Q/2 or (Q-1)/2; Simultaneously, with the number symbol of S, the number of promptly representing this is a plus or minus, as the number symbol on each in corresponding complete a yard; When adopting complete one yard inclined to one side Q system of encoding to count, n number addition only is 1 or 1 a not repeated arrangement in the n number; Its complete one yard compiling can be decided code length or become code length.
6. as the computer technical scheme of the inclined to one side Q system of claim 1-5, carry line number digit engineering method, it is characterized in that, the computing machine of Q system, carry line number digit engineering method comprises partially: input logic (101), the heavy arithmetical unit (202) of 2K, output conversion logic (108) and controller (201) are formed; Wherein, heavy arithmetical unit (202) of 2K and controller (201) are formed inclined to one side Q s operation control logic (107); It is characterized in that establish K common Q system number and participate in plus and minus calculation, K is 〉=2 integer, Q is a natural number; These number conversions are become K or 2K inclined to one side Q system number; (among the present invention, all adopting 2K inclined to one side Q system number to show); The input of common Q system number Q} → and Q ' } the inclined to one side Q system number of conversion logic (109) acquisition; Partially Q system number through shift register input logic (101) to the heavy arithmetical unit (202) of 2K; In the heavy arithmetical unit of 2K (202), partially Q system number through 2K heavily computing obtain the result of inclined to one side Q system number; Then, output conversion logic (108) with inclined to one side Q system number or common Q system number or common decimal number by output logic (104) output; Controller (201) is coordinated the logic of the whole arithmetic and control unit of control.
7. as the computer technical scheme of the inclined to one side Q system of claim 1-6, carry line number digit engineering method, it is characterized in that the computing machine of Q system, carry line number digit engineering method adopts " Q system, carry row method partially " computing partially, Q is a natural number; Mix the computing of number system and can be one of aforementioned schemes; In the computing machine of the present invention, employing scheme two is showed; Further comprise: " the heavy arithmetical unit of 2K " (202) are made up of totalizer ∑ i (304) and register net (311), the net that liquidates (312), a stroke Q net (313); I is an ordinal number; Perhaps, do not adopt net that liquidates (312) and stroke Q net (313);
When being used for computing machine, in the time of particularly in the robot calculator arithmetical unit, digital engineering method can adopt aforementioned first kind or second kind or the third step; Here, adopt the third step to show;
Adopt in the heavy arithmetical unit of 2K (202) " two-dimentional computing "; That is, the number everybody on carry out computing simultaneously; And each is several on each, also carries out elder generation simultaneously and " liquidates ", afterwards " draws Q ", " adds up "; When the instruction of next operation layer arrives, carry digit and " step-by-step and " number are carried out addition again; So repeat, in operation layer, only obtain till the number after the computing; At last, again through totalizer ∑ i (304) the output number of suing for peace; When adopting complete one yard coding, above-mentioned " two-dimentional computing " then is " three-dimensional computing ";
When adopting " liquidating " reach " drawing Q ", the instruction of being sent by controller or program is carried out computing simultaneously on number every; And each is several on each, also carries out elder generation simultaneously and " liquidates ", afterwards " draws Q ", " adds up "; " most totalizer " of employing 〉=2 adds up; When adopting common two to count " totalizer ", then the order serial adds up; Wherein totalizer ∑ i (304) has a sign bit for each, with the corresponding totalizer of 2Ki register (303); When adopting complete one yard coding, the totalizer ∑ i (304) in the heavy arithmetical unit of 2K (202) can economize slightly complete one yard shift register;
Above-mentioned " the heavy arithmetical unit of 2K " when the 2K value is big, can carry out classification, grouping is amplified.
8. as the computer technical scheme of the inclined to one side Q system of claim 1-7, carry line number digit engineering method, it is characterized in that, the computing machine of inclined to one side Q system, carry line number digit engineering method, wherein register net (311) is made up of 1 register 1i (301), 2 register 2i (302), 2K register 2Ki (303) etc.; Each register two or two links to each other; Wherein, be sign bit of each distribution of each register in 2K the register and corresponding totalizer ∑ i (304) thereof, this sign bit is common two condition trigger; 2K register deposited 2K inclined to one side Q number of input; The net that liquidates (312) is is wherein patrolled and examined by the logic that liquidates (305); Or by the individual logic that liquidates of K (2K-1) (305,306 ..., 307) composition links to each other with each register two or two in the register net (311); Or form by the logic that liquidates of classification, grouping; The Q net (313) of drawing is is wherein patrolled and examined by one stroke of Q logic (308); Or by individual stroke of Q logic of K (2K-1) (308,309 ..., 310) composition links to each other with each register two or two in the register net (311); Or form by the Q logic of drawing of classification, grouping.
9. as the computer technical scheme of the inclined to one side Q system of claim 1-8, carry line number digit engineering method, it is characterized in that, the computing machine of inclined to one side Q system, carry line number digit engineering method, the logic typical combination that liquidates wherein, 1i position (301) by 1 register, the 2i position (302) of 2 registers, same logic (403), different logic (404) reach with door (405) to be formed; The 1i position (301) of 1 register and the 2i position (302) of 2 registers with sign bit, are common two condition trigger before it; When adopting complete one yard to encode and when adopting the two-value components and parts, the 1i position (301) of 1 register, complete one be encoded to 1i1 (401), 1i2, The 2i position (302) of 2 registers, complete one be encoded to 2i1 (402), 2i2, The Ki position (303) of K register, complete one be encoded to Ki1, Ki2, From 1i1,1i2 ... and 2i1,2i2 ..., until Ki1, Ki2 ..., among complete one yard coding all, appoint and get two and form combination; Example is got typical combination such as following in this: the 1i1 position (401) of 1 register, and its " 1 " end connects the input of same logic (403), and " 1 " end of 1i1 symbol connects different logic (404) input; The 2i1 position (402) of 2 registers, its " 1 " end connects the input of same logic (403), and " 1 " end of 2i1 symbol connects the input of different logic (404); The output of same logic (403) connects and door (405) input; The output of different logic (404) connects and door (405) input; With the output of door (405), connect the 1i1 position (401) of 1 register and the reset terminal of 2 register 2i1 positions (402);
Stroke Q logic typical combination wherein, by the 1i position (301) of 1 register, the 2i position (302) of 2 registers, Q value decision logic (501), same logic (502) reaches with door (503) to be formed; The 1i position (301) of 1 register and the 2i position (302) of 2 registers with sign bit, are common two condition trigger before it; When adopting complete one yard to encode and when adopting the two-value components and parts, the 1i position (301) of 1 register, complete one be encoded to 1i1 (401), 1i2, The 2i position (302) of 2 registers, complete one be encoded to 2i1 (402), 2i2, The Ki position (303) of K register, complete one be encoded to Ki1, Ki2, From 1i1,1i2 ... and 2i1,2i2 ..., until Ki1, Ki2 ..., among complete one yard coding all, appoint and get Q and form and make up; Example is got the input of " 1 " the end connection Q value decision logic (501) of typical combination such as following a: 1i1 (401) in this, and " 1 " end of 1i symbol connects the input of same logic (502); " 1 " end of 2i1 (402) connects the input of Q value decision logic (501); " 1 " end of 2i symbol connects the input of same logic (502); So connect Q altogether; Q value decision logic (501) is accepted Q input altogether; The output of Q value decision logic (501) connects the input with door (503); Same logic (502) is accepted Q input altogether; The output of same logic (502) connects and door (503) input; With door (503) output carry (same symbol), deliver to the adjacent high-order set terminal of arbitrary carry row register in the heavy arithmetical unit of K, and it is identical with the 1i symbol to put this seniority symbol; Simultaneously, with door (503) output carry, connect interior Q reset terminal altogether of 1i1 position (401), 2 register 2i1 positions (402) and combination of 1 register.
10. as the computer technical scheme of the inclined to one side Q system of claim 1-9, carry line number digit engineering method, it is characterized in that, the computing machine of inclined to one side Q system, carry line number digit engineering method, the components and parts of employing are P value components and parts, P is the radix of several units collection, and P is>1 integer; Perhaps often get the two-value components and parts; Perhaps get three value components and parts.
CN200510119815.2A 2004-11-08 2005-11-07 Bias Q carrying system, carrying line digital engineering method computer technical scheme Expired - Fee Related CN1776605B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200510119815.2A CN1776605B (en) 2004-11-08 2005-11-07 Bias Q carrying system, carrying line digital engineering method computer technical scheme

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN 200410094538 CN1619486A (en) 2004-11-08 2004-11-08 Partial Q access scale, carry line digital engineering method and processor
CN200410094538.X 2004-11-08
CN200510119815.2A CN1776605B (en) 2004-11-08 2005-11-07 Bias Q carrying system, carrying line digital engineering method computer technical scheme

Publications (2)

Publication Number Publication Date
CN1776605A true CN1776605A (en) 2006-05-24
CN1776605B CN1776605B (en) 2014-08-27

Family

ID=36766149

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200510119815.2A Expired - Fee Related CN1776605B (en) 2004-11-08 2005-11-07 Bias Q carrying system, carrying line digital engineering method computer technical scheme

Country Status (1)

Country Link
CN (1) CN1776605B (en)

Also Published As

Publication number Publication date
CN1776605B (en) 2014-08-27

Similar Documents

Publication Publication Date Title
CN1149496C (en) Apparatus for adaptively processing video signals
Molahosseini et al. Efficient Reverse Converter Designs for the New 4-Moduli Sets $\{2^{n}-1, 2^{n}, 2^{n}+ 1, 2^{2n+ 1}-1\} $ and $\{2^{n}-1, 2^{n}+ 1, 2^{2n}, 2^{2n}+ 1\} $ Based on New CRTs
CN1702613A (en) Montgomery modular multiplier
CN1630204A (en) CRC computing method and system having matrix conversion technology
CN1838024A (en) Logarithm processing system and method
CN1296813C (en) Floating-point storage method and floating-point arithmetic device
CN1306390C (en) Multiplier and shift device using signed digit representation
CN87104093A (en) The calculation element of one dimension cosine transform and the image coding device and the decoding device that comprise this calculation element
CN1659785A (en) Method and system for multi-rate lattice vector quantization of a signal
CN1021004C (en) Method and apparatus for encoding and decoding data in residue number system
CN1577250A (en) Method and apparatus for implementing power of two floating point estimation
CN1142683C (en) Two-dimensional discrete cosine conversion/counter-conversion VLSI structure and method with no transposition part and separate line and column
CN101046396A (en) Specific coder
CN1752923A (en) Computer technological scheme of mixed Q carry system, carry line digit engineering method
CN1301363A (en) Digital signal processor
CN1776605A (en) Bias Q carrying system, carrying line digital engineering method computer technical scheme
CN1782986A (en) Computer technology plan of mixed number system, carry liner digital engineering method
CN1776606A (en) Add Q carrying system, carrying line digital engineering method computer technical scheme
CN1886739A (en) Distributed memory type information processing system
CN1890629A (en) Floating-point operations using scaled integers
CN1619485A (en) Gain Q access scale, carry line digital engineering method and processor
CN1967469A (en) High efficiency modular multiplication method and device
CN1619487A (en) Match Q access scale, carry line digital engineering method and processor
CN1760824A (en) Written calculations engineering scheme of carry line digital engnieering method in partial O scale
CN1619486A (en) Partial Q access scale, carry line digital engineering method and processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140827

Termination date: 20191107