Efficient Implementations of the Chinese Remainder Theorem for Sign Detection and Residue Decoding

Size: px
Start display at page:

Download "Efficient Implementations of the Chinese Remainder Theorem for Sign Detection and Residue Decoding"

Transcription

1 646 IEEE TRANSACTIONS ON COPUTERS, VOL. c-34, NO. 7, JULY 1985 Efficient Implementations of the Chinese Remainder Theorem for Sign Detection and Residue Decoding THU VAN VU Abstract -Two conversion techniques based on the Chinese remainder theorem are developed for use in residue number systems. The new implementations are fast and simple mainly because adders modulo a large and arbitrary integer are effectively replaced by binary adders and possibly a lookup table of small address space. Although different in form, both techniques share the same principle that an appropriate representation of the summands must be employed in order to evaluate a sum modulo efficiently. The first technique reduces the sum modulo in the conversion formula to a sum modulo 2 through the use of fractional representation, which also exposes the sign bit of numbers. Thus, this technique is particularly useful for sign detection and for any operation requiring a comparison with a binary fraction of. The other technique is preferable for the full conversion from residues to unsigned or 2's complement integers. By expressing the summands in terms of quotients and remainders with respect to a properly chosen divisor, the second technique systematically replaces the sum modulo by two binary sums, one accumulating the quotients modulo a power of 2 and the other accumulating the remainders the ordinary way. A final recombination step is required but is easily implemented with a small lookup table and binary adders. Index Terms -Fractional representation, multioperand modular addition, quotient-remainder representation, residue decoding, residue number system, sign detection. I. INTRODUCTION U NLIKE the fast operations of addition, subtraction, and multiplication, most other operations in residue number systems are found to be slow because of their dependence on the magnitude of residue numbers [1]-[3]. For example, the sign of a residue number is determined by comparing the number with /2 where is the range of the number system. agnitude information is also indispensable in a redundant residue number system because a possible first step toward correcting errors is to compare projections of a number with the ratio T/R where T is the total range and R is the redundant range. Since the magnitude is not explicitly available in the residue representation of a number, some form of conversion from residues to digits in a weighted number system is necessary. Currently known techniques for residue decoding are based either on the Chinese remainder theorem or on a mixed radix conversion [4]-[13]. Although the Chinese remainder theorem provides a direct conversion formula which is simple and potentially fast, its imple- anuscript received December 22, 1983; revised June 1, The author is with the Government Aerospace Systems Division, Harris Corporation, elbourne, FL mentation into high-speed digital systems has been hindered by the lack of adders modulo a large and arbitrary integer. On the contrary, conversion to mixed radix digits can be easily realized with lookup tables of modest size, but the process is notoriously slow due to the propagation of carries, a computational bottleneck characteristic of weighted number systems. In an effort to speed up some of the difficult operations in residue number systems, the major obstacle in the implementation of the Chinese remainder theorem has been examined and successfully removed. This paper presents two new hardware realizations of the theorem which consist strictly of binary adders and lookup tables of small address space. The elimination of modular adders is possible because with an appropriate representation of the summands different than integers, addition modulo a large and arbitrary integer can be transformed equivalently into simple addition modulo a power of 2. Thus, this new development, coupled with the use of fast techniques for multioperand binary addition, should make the theorem a faster alternative for conversion purposes than techniques relying on mixed radix digits. Section II begins the discussion with a review of past implementations of the theorem, emphasizing achievements and limitations which motivate the development of the new implementations. Section III shows how afractional representation can be used to accelerate sign detection and other operations based on magnitude comparison. A detailed error analysis and examples are also included. In Section IV, conversion to binary numbers, signed or unsigned, is demonstrated to be most efficient with the use of a quotientremainder representation. II. THE CHINESE REAINDER THEORE In this theorem [1] an integer X is converted from its residue number representation by the weighted sum X =I (WiXi)m) (1) where mi's are the system moduli, = mim2 a * * m, is the system range, wi's are constants such that ((/mi)wi)mi = 1, is -the residue of X with respect to mi. As only and each xi integers in the range [0, ) are considered, the weighted sum is evaluated modulo ; that is, X is the nonnegative remainder obtained when the sum is divided by. The Chinese remainder theorem may be used as the basis for a fast and simple residue number decoder (Fig. 1). Since /85/ $01.00 C 1985 IEEE

2 VAN VU: IPLEENTATIONS OF THE CHINESE REAINDER THEORE xi x2 X3 xni n steps. Then the raw result is compared with a series of reference points, and a proper correction-term is generated to be RO RO applied to the sum. Normally, for a sum of n operands, all of which are less than, n - 1 reference points are required. sn-i sn By shifting the sum and scrutinizing overflow bits from binary adders employed in accumulating the sum, Fraser and Bryg [7] managed to cut the number of comparisons down to exactly one. Their technique worked correctly for the example given in [7]. Later, Cheng and Huang [8] formalized the technique and revealed, however, that a certain inequality must be satisfied by in order to keep the number of comparisons at one. It was found that as the n'umber of moduli x increases, must approach a power of 2, a restriction which Fig. 1. Residue decoding by the Chinese remainder theorem. also complicates the selection of mi's. The new conversion techniques described in this paper are xi is usually small, the values motivated by both accomplishments and shortcomings of past implementations of the theorem. First, it is ideal to have the Si =- (WiXi)m (2) bulk of the computation (i.e., the summation of n numbers) 'mi carried out by binary adders. Although intermediate coras a function of xi. rection steps are allowed, they must be in a very simple form can be stored practically in a lookup table For example, 5 bit residues occupy only 332 locations with a such as dropping the most significant bits. This is to make word length equal to Flog2 ]. However, Ithe sum modulo possible the use of standard binary hardware and fast techcauses a major implementation problem be.cause is gener- niques for multioperand binary addition to fully exploit the ally a very large and arbitrary integer. The common practice parallel conversion algorithm provided by the theorem. It is of substituting lookup tables for modular adders is obviously also desired to complete any final correction step at a minimal out of the question. On the other hand,,a modular adder cost using as much simple hardware as possible. Last and designed from a conventional binary ad( der would require most importantly, there must not be any severe restrictions on additional logic to detect overflow and correct the over- the definition of the system moduli. flowed sum [4]. Such an adder must be custom designed and It turns out that these objectives can be achieved by an is more expensive to operate than an ordi: nary binary adder. appropriate representation of si's other than the usual integer Hence, clever ways for handling the sum rmodulo must be representation. Since the summands are intended to be found if an efficient residue number decoder based on the fetched from lookup tables, representing them in a different theorem is to be built. form does not require any special real-time processing. The Two approaches have been taken by ivarious authors to true requirements for a candidate number representation are compute the sum modulo in (1). In the first approach that addition modulo be transformed into the much desired overflow is detected and a correction mlade as soon as a addition modulo a power of 2, and that the adjustment of the partial sum is formed. The total sum is c)btained either se- final sum back to a standard form be easy. In the following, quentially by a modulo accumulator or iin parallel by a tree two alternatives for representing the summands are proposed array of modulo adders. Thus, the basic ] nrohlet-n oroblem of mecha-v to efficiently implement the Chinese remainder theorem. nizing addition of two numbers modulo is encountered here. Taylor [13] assumed that = 2' - 2b (a, b integers) because for this particular value he could implement the de- programmable It has been mentioned that some residue number operations III. IPLEENTATION BY A FRACTIONAL REPRESENTATION tection and correction steps with a simlple logic array. Nevertheless, compared with a binary adder, his depend totally on the outcome of a comparison with a constant fraction of. To perform these operations by way of proposed adder is still expensive, and the riestriction imposed on severely limits the selection of th.e system moduli, the Chinese remainder theorem, one might first compute (1), which must be relatively prime in pairs. T 4aking use of only then compare the result with the constant. This solution is binary adders, Jenkins [12] computed an ordinary sum but disappointingly expensive because it requires the explicit biased the sum so that the detection step became completely evaluation of a sum modulo and a separate comparison. trivial. With the bias included, overflow in addition modulo However, if the summands are changed to reflect the constant, the sum modulo may become easier to deal with, coincides with overflow in binary addit on, which is indithe correction step and the comparison step may be completely eliminated. As cated by the most significant carry bit, but may still be required in the form of another addition. So when an example, the implementation of sign detection is now discussed in detail. a sum of n operands is carried out, the aidditional delay is multiplied either by n - 1 for sequential summation or by A standard residue number system is defined exclusively Flog2 ni for parallel summation. for positive integers in the range [0, ). To accommodate In the second approach, the sum is allowed to grow without negative integers, an implicit signed number system may be the interference of any intermediate detecttion and correction considered in which the range is split evenly into a positive 647

3 648 half and a negative half. Thus, integers X in the interval [0, /2) are interpreted as positive X; integers X in the interval [/2, ) are interpreted as negative X -. The objective of sign detection is to construct a sign function S(X) such that S S(X) = ifo X K 2 ' if- X <. 2 Note that when is even, the positive and negative halves are [0, (/2) - 1] and [/2, - 1], respectively. For odd they are [0, ( - 1)/2] and [( + 1)/2, - 1], respectively. In both cases the real number /2 serves as the delimiter for positive and negative integers. Hence, if X is scaled down by /2 to yield X, - (2/)X, this number is a fractional number lying in the range [0, 2) and is such that ( ) If O CXs < I, Therefore, if Xs is represented in a binary form where the binary point is placed after the leftmost bit, the value of this leftmost bit is no other than the sign function S(X,) = S(X). Furthermore, with this fractional representation the Chinese remainder theorem apears to be better suited for computing the scaled value Xs than for computing X itself. To see how addition modulo is eliminated, the expression given in (1) is first rewritten as X = - (waxi)m - p (5) i=l1 for some nonnegative integer p. Then, by dividing both sides of (5) by /2, a more manageable expression is obtained as X, = m: 2 (WiXi)mi -2p n ^} i=l Now, X, is computed simply by taking the sum in (6) as an ordinary sum of fractional numbers and by throwing away any multiples of 2 which show up in the integer part of the result. This can be trivially accomplished with binary adders by assigning only one bit to the integer part. The final sum is then in a form consistent with the representation of X, discussed previously where the sign bit is explicitly present at the leftmost position. The idea of using fractional numbers to simplify addition modulo in (1) has been recently proposed by Soderstrand et al. [ 11] as a technique for residue-to-analog conversion. However, their discussion was based solely on computer simulation of a very specific residue number system. Thus, some claims made with respect to accuracy are not valid when applied to more general systems. Accuracy is a cause for concern here because for most values of mi, the fractional summands Ui = - (WiXi)m mi cannot be represented exactly in a finite number of bits. (3) (6) (7) So IEEE TRANSACTIONS ON COPUTERS, VOL. c-34, NO. 7, JULY 1985 the number of bits sufficient to yield a correct sign function remains to be determined. Let t + 1 be the number of bits needed where the integer part takes 1 bit, and the fraction part occupies t bits. In the place of ui, let the truncated values u& = 1-2tui-12-t be stored in lookup tables. These values are contaminated with truncation errors so that the sum Ui= uii + ei, 0 < ei < 2-' n n n E ui =, ui +, ei = 2p + X, + e i=- i=1 i=l accumulates an error e which is a sum of ei's. This nonnegative quantity must be controlled in order to distinguish the sign of two distinct numbers, in particular the sign of those numbers close to the boundary of the positive and negative intervals. First, it is observed that the numbers X, are equally spaced in the interval [0, 2) by increments of 2/. In addition, the gap between the largest positive number and 1, the delimiter, is 2/ for even and 1 / for odd. Accordingly, the error in (9) must satisfy the upper bounds 2 e for even, < 1 e < (8) (9) for odd. (10) Since the integer part remains, fixed for these bounds, the computed value of X, is given by Xs = i -2p (11) [i.e., the same multiple of 2 is discarded as in (6)] and satisfies A Xs = Xs, + e,9 S(Xs) = S(Xs) = S(X). (12) If specific moduli were given, the accumulated error would be known exactly for every number in the system since there are only a finite number of moduli as well as a finite number of residue combinations. It would then not be difficult to calculate the maximum error and deduce from there the number of bits. In the absence of such specific information, a known upper bound of the error is used instead. It is obvious from (8) that e < n2-'. Hence, the upper bounds (10) are certainly satisfied when n2t c 2 n2-t or equivalently when t 2[log22nl- 1 for even, for odd (13) for even, t : Flog2 n] for odd. (14) Thus, compared with the usual integer representation, the

4 VAN VU: IPLEENTATIONS OF THE CHINESE REAINDER THEORE fractional representation requires roughly Flog2 nl extra bits (a fact omitted in [11]), but the simplicity and speed gained in computing the sum outweigh the minor cost of these bits. From residues to sign bit, it takes only one table lookup cycle and the fastest possible time to add n binary numbers (see, for example, [14] and [15] for a discussion of fast multioperand addition). Although the stored values ui are truncated up in the previous analysis, they may very well be truncated down or rounded. Truncating down generates negative errors with a lower bound - 2-T; rounding results in both negative and positive errors bounded in absolute value by 2-t. Because of negative errors, the sign may be incorrect for X = 0 or, when is even, for X = /2. However, this does not turn out to be a problem since these special boundary values are always correctly represented in fractional form. The same analysis for determining t should apply with little change. To illustrate the use of fractional representation for sign detection, a numerical example using the same system of moduli as in [11] is presented next. In this system, {11, 13, 15, 16}, residues are 4 bit words, and X is a 16 bit word since = Also, w1 = 8, w2 = 1, W3 = 2, and W4= 1. The sum in (6) is reduced to a sum of two terms 4 EUi- (U1 + U2) + (U3 + U4) = V1I + V2 to take advantage of lookup tables with 8 input bits. Thus, X, can be represented as a 17 bit word. To detect the sign of X = 1 = (1,1,1,1), the stored values of VI = --(8 x 1)I + -(1 x 1) _230 = , ~143 V= -(2 x 1)5 + -(1 x 1) _94_... = = are fetched and added: VI: loo V2: A~~~~~~~~~~~~~~~~~~~~ X,: As indicated by the leftmost bit in the sum, S(1) = 0. Likewise, for X =-1 = (10,12,14,15) vi = -(8 x 10),, + -(1 x 12) _ = , =2.-(2 X 14)15 + (1X 15) = Y406 = O O so that VI: V2: X,: Thus, S(- 1) = 1. Note, however, that if v, and V2 were rounded and if only a total of 11 bits were retained in the last calculation, the resulting sign would not be correct. The sum in this case would be leading to a wrong sign. Clearly, this example does not support the claim in [I1] that as few as 11 bits is sufficient for sign detection. IV. IPLEENTATION BY A QUOTIENT-REAINDER REPRESENTATION A residue-to-decimal converter can be obtained by extending the sign detector with a binary multiplier because. X = Xs(/2). Better still, the now available sign bit also indicates whether should be subtracted from the result in order to convert to a conventional signed number system. Computationally, the signed value of X is given by W = 2- (X (15) as a result of (10) and (12). The amount to be subtracted is changed to /2 if the integer part of X, is discarded as in IA A P W = LXS S(XS)) -~ () (16) Because a multiplication is involved in the final step, this type of fractional converter is not very useful unless residues are converted to analog signals as is done in [11]. There, the multiplication is conveniently incorporated into a D/A converter. For normal residue-to-binary conversion, the following technique is suggested which requires only one or two extra additions after the usual table lookups and the summing of n numbers have been completed. The key to the solution is a quotient-remainder representation for the summands. Recall from (2) that the summands s, are such that 0 ' si <. Now, if a particular modulus mj is singled out to be used in expressing si as Si = qi + ri mj (17) where qi and ri are, respectively, the quotient and remainder of si with respect to /mj such that 0 C qi <mk, 649 0, :C r. <- i (18) then the conversion expression in the Chinese remainder theorem becomes

5 650 IEEE TRANSACTIONS ON COPUTERS, VOL. c-34, NO. 7, JULY 1985 X = (ESi) i=l ( qi -r + i=l i ri) ( I qi) + ( ri) (my i=l )i (=l V (19) This leads to an efficient procedure for computing X without adders modulo as follows. Let and q = qij i= I i (20) r = ri) i=1 (21) Computing the sum in (20) is not a problem because the modulus mj is small; lookup tables are commonly used. However, q is obtained most easily when mj = 2' or 2k - 1, for some k, as these values correspond to k bit binary addition with discarded carry or end-around carry. Since it is not unusual to have a power of 2 included in most practical systems of moduli, mi = 2k is assumed from now on. The final sum in (20) will be a nonnegative integer strictly less than 2k, which in turn is multiplied by /2k via a table lookup. As for the sum in (21), the following inequality is true: n 0. rj < n < (22) =1 if n c m= i1 2k. Again, this condition is easily satisfied by most practical residue number systems. For example, when 2k is selected as the largest modulus, the number of relatively prime moduli which might be considered to complete the system is much less than 2k, even less than 2k-1. Thus, as a result of (22) the sum r is computed simply as an ordinary sum. Finally, let Z =-q(/2k) + r. Then from (19), X = (Z) or Fig. 2. Implementation using a quotient-remainder representation. resentation is summarized in Fig. 2 and in the following steps. 1) Use the residues xi to look up the quotients qi and the remainders ri of si with respect to /2k. 2) Compute in parallel the binary sums q = ( qi) mod 2k, r n = i=.] Iri. XZ if <, IZ - if Z ':-. The comparison of Z with can be eliminated by adding in advance a shift [7], [8] (or bias [12]) to Z. ore specifically, let c = Flog2 I and let the positive shift 2c - be included in the lookup table where q gets multiplied by /2k. That is, let Y = q(/2k)'+ (2C - ) be fetched from the table, given the input q. Then, when the shifted sum Z - Y + r = Z + (2c - ) is formed modulo 2c, a most significant carry bit b is also generated. If Z., this bit is 1 because Z + (2c - ). 2c; it is 0 otherwise. Thus, based simply on the bit value of b, the correction by and the reverse shift are applied accordingly to yield X = Z = Z- (2C - ), or X = Z - = Z. The new implementation using a quotient-remainder rep- 3) Use the sum q to look up Y = q(/2k) + (2C- ). 4) Form the binary sum Z = (Y + r) mod 2c, and retain the most significant carry bit b. 5) OutputX in [0,) as (23) (Z + ) mod 2C if b = 0, z (24) if b = 1. It can be seen that representing qi and rg takes the same number of bits as representing si, but in the (qi, ri) format, the summands can be rapidly accumulated by binary adders. Again, column-compression or carry-save summing techniques should be considered for fast-conversion time. As the word length of the sum q is much shorter than that of the sum r (k versus Flog2 n7 - k), step 3) may take place even before the sum r is completed. The remaining steps 4) and 5) are simple binary addition. The number X can be returned in 2's complement binary form by a very simple modification to the decoder. As mentioned in Section III, the signed value is W = X ifx < /2

6 651 VAN VU: IPLEENTATIONS OF THE CHINESE REAINDER THEORE NORAL POSITION: x CIRCULAR SHIFT: V = <X+ 2 > LINEAR SHIFT: W =V _ I L< I I, I exactly to a summand in the theorem, but is expressed in a mixed radix form. Thus, the sum modulo is transformed into a sum of mixed radix numbers. Nevertheless, mixed radix representation is seemingly not a good choice because the generation and propagation of carries is more cumbersome in mixed radix arithmetic than in binary arithmetic. + I REFERENCES 2 Fig. 3. Shifts used in conversion to signed integers. or W = X - if X 2 /2. Instead of the usual comparison and subtraction step following a conversion cycle, a cheaper alternative is taken as follows. Let V = (X + /2)m. This creates the effect of a circular shift, which pushes negative values into the lower half of the range [0, ) and positive values into the upper half. Then W is simply V - /2 because the shift, linear this time, sends values back to their correct position in the interval [-/2, /2). Thus, no comparison is necessary (Fig. 3). The circular shift is accomplished by changing the tables in step 1) so that /2 is added modulo mi to each residue xi. Note that when mj = 2' as assumed, this amounts to adding a zero for moduli with i f j. So only one table needs to be changed: the one which returns qj (rj is already zero!). The linear shift is easily included in step 5) as (Z + W =_ ) mod 2C if b = 0, ) if b = 1. mod 2C V. SUARY New techniques for an efficient implementation of the Chinese remainder theorem have been presented. By reformulating the conversion expression given in the theorem, the new techniques make it possible to evaluate the sum modulo easily with binary adders and lookup tables. As the obstacle posed by adders modulo a very large and arbitrary integer no longer exists, there is no doubt that this development offers a faster alternative to the traditionally slow mixed radix conversion method. Some difficult operations in residue number systems have already benefited from the new discovery. Sign detection and conversion to unsigned or signed binary numbers have been treated here. In [161 a versatile fractional representation is demonstrated to provide complete information for the simultaneous execution of error detection and residue-interacting operations such as sign detection, magnitude comparison, overflow detection, scaling, nonlinear mapping, and residue-to-analog conversion. In light of the various representations for the summands adopted in this paper, it is interesting to note that the parallel mixed radix conversion algorithm proposed by Huang [10] is, in effect, a disguise of the Chinese remainder theorem. Each orthogonal projection in that algorithm corresponds [1] N. S. Szabo and R. l. Tanaka, Residue Arithmetic and its Applications to Computer Technology. New York: cgraw-hill, [2] D. K. Banerji and J. A. Brzozowski, "Sign detection in residue number systems," IEEE Trans. Comput., vol. C-18, pp , Apr [3] F. Barsi and P. aestrini, "Error correcting properties of redundant residue number systems," IEEE Trans. Comput., vol. C-22, pp , ar [4] W. K. Jenkins and B. J. Leon, "The use of residue number systems in the design of finite impulse response digital filters," IEEE Trans. Circuits Syst., vol. CAS-24, pp , Apr [5] W. K. Jenkins, "Techniques for residue-to-analog conversion for residueencoded digital filters," IEEE Trans. Circuits Syst., vol. CAS-25, pp , July [6] A. Baraniecka and G. A. Jullien, "On decoding techniques for residue number system realizations of digital signal processing hardware," IEEE Trans. Circuits Syst., vol. CAS-25, pp , Nov [7] D. F. Fraser and N. J. Bryg, "An adaptive digital signal processor based on the residue number system," in Proc. AIAA 2nd Comput. Aerospace Conf., Los Angeles, CA, Oct , [8] V. S. Cheng and C. H. Huang, "On the decoding of residue numbers," in Proc. Int. Symp. ini-icrocomput. Contr. easurement, San Francisco, CA, ay 20-22, [9] F. J. Taylor and A. S. Ramnarayanan, "An efficient residue-to-decimal converter," IEEE Trans. Circuits Syst., vol. CAS-28, pp , Dec [10] C. H. Huang, "A fully parallel mixed-radix conversion algorithm for residue number applications," IEEE Trans. Comput., vol. C-32, pp , Apr [11]. A. Soderstrand, C. Vernia, and J. H. Chang, "An improved residue number system digital-to-analog converter," IEEE Trans. Circuits Syst., vol. CAS-30, pp , Dec [12] W. K. Jenkins, "A technique for the efficient generation of projections for error correcting residue codes," IEEE Trans. Circuits Syst., vol. CAS-31, pp , Feb [13] F. J. Taylor, "Residue arithmetic: A tutorial with examples," IEEE Comput. ag., vol. 17, pp , al [14] I. T. Ho and T. C. Chen, "ultiple addition by residue threshold functions and their representation by array logic," IEEE Trans. Comput., vol. C-22, pp , Aug [15] D. E. Atkins and S. C. Ong, "Time-component complexity of two approaches to multioperand binary addition," IEEE Trans. Comput., vol. C-28, pp , Dec [16] T. Van Vu, "The use of residue arithmetic for fault detection in a digital flight control system," in Proc. Nat. Aerospace Electron. Conf., Dayton, OH, ay 21-25, Thu Van Vu completed his undergraduate studies at anhattan College, Bronx, NY, in He received the.s. degree in mathematics from Rutgers University, New Brunswick, NJ, in 1979 and the Ph.D. degree in computer science from the University of Illinois, Urbana-Champaign, in His interests have been in computational mathematics and mathematical software for differential equations. He is currently at Harris Corporation, elbourne, FL, developing computation algorithms and architecture for high-speed and fault-tolerant digital systems.

An Efficient RNS to Binary Converter Using the Moduli Set {2n + 1, 2n, 2n 1}

An Efficient RNS to Binary Converter Using the Moduli Set {2n + 1, 2n, 2n 1} An Efficient RNS to Binary Converter Using the oduli Set {n + 1, n, n 1} Kazeem Alagbe Gbolagade 1,, ember, IEEE and Sorin Dan Cotofana 1, Senior ember IEEE, 1. Computer Engineering Laboratory, Delft University

More information

Lecture 2. Binary and Hexadecimal Numbers

Lecture 2. Binary and Hexadecimal Numbers Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic: Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents

More information

Lecture 8: Binary Multiplication & Division

Lecture 8: Binary Multiplication & Division Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 3 1 2 s Complement Signed Numbers two = 0 ten 0001 two

More information

8 Primes and Modular Arithmetic

8 Primes and Modular Arithmetic 8 Primes and Modular Arithmetic 8.1 Primes and Factors Over two millennia ago already, people all over the world were considering the properties of numbers. One of the simplest concepts is prime numbers.

More information

The BBP Algorithm for Pi

The BBP Algorithm for Pi The BBP Algorithm for Pi David H. Bailey September 17, 2006 1. Introduction The Bailey-Borwein-Plouffe (BBP) algorithm for π is based on the BBP formula for π, which was discovered in 1995 and published

More information

Implementation of Modified Booth Algorithm (Radix 4) and its Comparison with Booth Algorithm (Radix-2)

Implementation of Modified Booth Algorithm (Radix 4) and its Comparison with Booth Algorithm (Radix-2) Advance in Electronic and Electric Engineering. ISSN 2231-1297, Volume 3, Number 6 (2013), pp. 683-690 Research India Publications http://www.ripublication.com/aeee.htm Implementation of Modified Booth

More information

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers

This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition

More information

Computer Science 281 Binary and Hexadecimal Review

Computer Science 281 Binary and Hexadecimal Review Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

More information

NUMBER SYSTEMS. William Stallings

NUMBER SYSTEMS. William Stallings NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html

More information

CHAPTER 5 Round-off errors

CHAPTER 5 Round-off errors CHAPTER 5 Round-off errors In the two previous chapters we have seen how numbers can be represented in the binary numeral system and how this is the basis for representing numbers in computers. Since any

More information

THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0

THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0 THE NUMBER OF REPRESENTATIONS OF n OF THE FORM n = x 2 2 y, x > 0, y 0 RICHARD J. MATHAR Abstract. We count solutions to the Ramanujan-Nagell equation 2 y +n = x 2 for fixed positive n. The computational

More information

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit Decimal Division Remember 4th grade long division? 43 // quotient 12 521 // divisor dividend -480 41-36 5 // remainder Shift divisor left (multiply by 10) until MSB lines up with dividend s Repeat until

More information

The string of digits 101101 in the binary number system represents the quantity

The string of digits 101101 in the binary number system represents the quantity Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

More information

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1 Divide: Paper & Pencil Computer Architecture ALU Design : Division and Floating Point 1001 Quotient Divisor 1000 1001010 Dividend 1000 10 101 1010 1000 10 (or Modulo result) See how big a number can be

More information

RN-coding of Numbers: New Insights and Some Applications

RN-coding of Numbers: New Insights and Some Applications RN-coding of Numbers: New Insights and Some Applications Peter Kornerup Dept. of Mathematics and Computer Science SDU, Odense, Denmark & Jean-Michel Muller LIP/Arénaire (CRNS-ENS Lyon-INRIA-UCBL) Lyon,

More information

CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

More information

RN-Codings: New Insights and Some Applications

RN-Codings: New Insights and Some Applications RN-Codings: New Insights and Some Applications Abstract During any composite computation there is a constant need for rounding intermediate results before they can participate in further processing. Recently

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

8 Divisibility and prime numbers

8 Divisibility and prime numbers 8 Divisibility and prime numbers 8.1 Divisibility In this short section we extend the concept of a multiple from the natural numbers to the integers. We also summarize several other terms that express

More information

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem)

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem) Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem) In order to understand the details of the Fingerprinting Theorem on fingerprints of different texts from Chapter 19 of the

More information

Quotient Rings and Field Extensions

Quotient Rings and Field Extensions Chapter 5 Quotient Rings and Field Extensions In this chapter we describe a method for producing field extension of a given field. If F is a field, then a field extension is a field K that contains F.

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 17 Shannon-Fano-Elias Coding and Introduction to Arithmetic Coding

More information

3.Basic Gate Combinations

3.Basic Gate Combinations 3.Basic Gate Combinations 3.1 TTL NAND Gate In logic circuits transistors play the role of switches. For those in the TTL gate the conducting state (on) occurs when the baseemmiter signal is high, and

More information

1 Error in Euler s Method

1 Error in Euler s Method 1 Error in Euler s Method Experience with Euler s 1 method raises some interesting questions about numerical approximations for the solutions of differential equations. 1. What determines the amount of

More information

Binary Numbering Systems

Binary Numbering Systems Binary Numbering Systems April 1997, ver. 1 Application Note 83 Introduction Binary numbering systems are used in virtually all digital systems, including digital signal processing (DSP), networking, and

More information

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic Today Binary addition Representing negative numbers 2 Binary Addition Consider the following binary numbers: 0 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1 How do we add these numbers? 3 Binary Addition 0 0 1 0 0 1 1

More information

Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x

More information

Floating Point Fused Add-Subtract and Fused Dot-Product Units

Floating Point Fused Add-Subtract and Fused Dot-Product Units Floating Point Fused Add-Subtract and Fused Dot-Product Units S. Kishor [1], S. P. Prakash [2] PG Scholar (VLSI DESIGN), Department of ECE Bannari Amman Institute of Technology, Sathyamangalam, Tamil Nadu,

More information

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION

DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION DIGITAL-TO-ANALOGUE AND ANALOGUE-TO-DIGITAL CONVERSION Introduction The outputs from sensors and communications receivers are analogue signals that have continuously varying amplitudes. In many systems

More information

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2. Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

Factoring Whole Numbers

Factoring Whole Numbers 2.2 Factoring Whole Numbers 2.2 OBJECTIVES 1. Find the factors of a whole number 2. Find the prime factorization for any number 3. Find the greatest common factor (GCF) of two numbers 4. Find the GCF for

More information

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

EE 261 Introduction to Logic Circuits. Module #2 Number Systems EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

More information

FFT Algorithms. Chapter 6. Contents 6.1

FFT Algorithms. Chapter 6. Contents 6.1 Chapter 6 FFT Algorithms Contents Efficient computation of the DFT............................................ 6.2 Applications of FFT................................................... 6.6 Computing DFT

More information

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals: Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger

More information

Stupid Divisibility Tricks

Stupid Divisibility Tricks Stupid Divisibility Tricks 101 Ways to Stupefy Your Friends Appeared in Math Horizons November, 2006 Marc Renault Shippensburg University Mathematics Department 1871 Old Main Road Shippensburg, PA 17013

More information

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of.

Application. Outline. 3-1 Polynomial Functions 3-2 Finding Rational Zeros of. Polynomial. 3-3 Approximating Real Zeros of. Polynomial and Rational Functions Outline 3-1 Polynomial Functions 3-2 Finding Rational Zeros of Polynomials 3-3 Approximating Real Zeros of Polynomials 3-4 Rational Functions Chapter 3 Group Activity:

More information

ECE 842 Report Implementation of Elliptic Curve Cryptography

ECE 842 Report Implementation of Elliptic Curve Cryptography ECE 842 Report Implementation of Elliptic Curve Cryptography Wei-Yang Lin December 15, 2004 Abstract The aim of this report is to illustrate the issues in implementing a practical elliptic curve cryptographic

More information

LINEAR INEQUALITIES. Mathematics is the art of saying many things in many different ways. MAXWELL

LINEAR INEQUALITIES. Mathematics is the art of saying many things in many different ways. MAXWELL Chapter 6 LINEAR INEQUALITIES 6.1 Introduction Mathematics is the art of saying many things in many different ways. MAXWELL In earlier classes, we have studied equations in one variable and two variables

More information

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion CHAPTER 5 Number Theory 1. Integers and Division 1.1. Divisibility. Definition 1.1.1. Given two integers a and b we say a divides b if there is an integer c such that b = ac. If a divides b, we write a

More information

Design and FPGA Implementation of a Novel Square Root Evaluator based on Vedic Mathematics

Design and FPGA Implementation of a Novel Square Root Evaluator based on Vedic Mathematics International Journal of Information & Computation Technology. ISSN 0974-2239 Volume 4, Number 15 (2014), pp. 1531-1537 International Research Publications House http://www. irphouse.com Design and FPGA

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS

Sensitivity Analysis 3.1 AN EXAMPLE FOR ANALYSIS Sensitivity Analysis 3 We have already been introduced to sensitivity analysis in Chapter via the geometry of a simple example. We saw that the values of the decision variables and those of the slack and

More information

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook. Elementary Number Theory and Methods of Proof CSE 215, Foundations of Computer Science Stony Brook University http://www.cs.stonybrook.edu/~cse215 1 Number theory Properties: 2 Properties of integers (whole

More information

Operation Count; Numerical Linear Algebra

Operation Count; Numerical Linear Algebra 10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floating-point

More information

The Euclidean Algorithm

The Euclidean Algorithm The Euclidean Algorithm A METHOD FOR FINDING THE GREATEST COMMON DIVISOR FOR TWO LARGE NUMBERS To be successful using this method you have got to know how to divide. If this is something that you have

More information

Continued Fractions and the Euclidean Algorithm

Continued Fractions and the Euclidean Algorithm Continued Fractions and the Euclidean Algorithm Lecture notes prepared for MATH 326, Spring 997 Department of Mathematics and Statistics University at Albany William F Hammond Table of Contents Introduction

More information

Binary Adders: Half Adders and Full Adders

Binary Adders: Half Adders and Full Adders Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order

More information

A New Euclidean Division Algorithm for Residue Number Systems

A New Euclidean Division Algorithm for Residue Number Systems A New Euclidean Division Algorithm for Residue Number Systems Jean-Claude Bajard and Laurent Stéphane Didier Laboratoire d Informatique de Marseille CMI, Université de Provence, 39 rue Joliot-Curie, 3453

More information

9.2 Summation Notation

9.2 Summation Notation 9. Summation Notation 66 9. Summation Notation In the previous section, we introduced sequences and now we shall present notation and theorems concerning the sum of terms of a sequence. We begin with a

More information

IMPROVED NETWORK PARAMETER ERROR IDENTIFICATION USING MULTIPLE MEASUREMENT SCANS

IMPROVED NETWORK PARAMETER ERROR IDENTIFICATION USING MULTIPLE MEASUREMENT SCANS IMPROVED NETWORK PARAMETER ERROR IDENTIFICATION USING MULTIPLE MEASUREMENT SCANS Liuxi Zhang and Ali Abur Department of Electrical and Computer Engineering Northeastern University Boston, MA, USA lzhang@ece.neu.edu

More information

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009. Notes on Algebra U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, 2009 Notes on Algebra These notes contain as little theory as possible, and most results are stated without proof. Any introductory

More information

Linear Programming Notes V Problem Transformations

Linear Programming Notes V Problem Transformations Linear Programming Notes V Problem Transformations 1 Introduction Any linear programming problem can be rewritten in either of two standard forms. In the first form, the objective is to maximize, the material

More information

Chapter 1: Digital Systems and Binary Numbers

Chapter 1: Digital Systems and Binary Numbers Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching

More information

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture

More information

Useful Number Systems

Useful Number Systems Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2

More information

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test

Math Review. for the Quantitative Reasoning Measure of the GRE revised General Test Math Review for the Quantitative Reasoning Measure of the GRE revised General Test www.ets.org Overview This Math Review will familiarize you with the mathematical skills and concepts that are important

More information

Homework until Test #2

Homework until Test #2 MATH31: Number Theory Homework until Test # Philipp BRAUN Section 3.1 page 43, 1. It has been conjectured that there are infinitely many primes of the form n. Exhibit five such primes. Solution. Five such

More information

Module 3: Floyd, Digital Fundamental

Module 3: Floyd, Digital Fundamental Module 3: Lecturer : Yongsheng Gao Room : Tech - 3.25 Email : yongsheng.gao@griffith.edu.au Structure : 6 lectures 1 Tutorial Assessment: 1 Laboratory (5%) 1 Test (20%) Textbook : Floyd, Digital Fundamental

More information

Counters and Decoders

Counters and Decoders Physics 3330 Experiment #10 Fall 1999 Purpose Counters and Decoders In this experiment, you will design and construct a 4-bit ripple-through decade counter with a decimal read-out display. Such a counter

More information

1.4 Compound Inequalities

1.4 Compound Inequalities Section 1.4 Compound Inequalities 53 1.4 Compound Inequalities This section discusses a technique that is used to solve compound inequalities, which is a phrase that usually refers to a pair of inequalities

More information

Duality in Linear Programming

Duality in Linear Programming Duality in Linear Programming 4 In the preceding chapter on sensitivity analysis, we saw that the shadow-price interpretation of the optimal simplex multipliers is a very useful concept. First, these shadow

More information

Notes on Factoring. MA 206 Kurt Bryan

Notes on Factoring. MA 206 Kurt Bryan The General Approach Notes on Factoring MA 26 Kurt Bryan Suppose I hand you n, a 2 digit integer and tell you that n is composite, with smallest prime factor around 5 digits. Finding a nontrivial factor

More information

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti

Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML. By Prashanth Tilleti Correctly Rounded Floating-point Binary-to-Decimal and Decimal-to-Binary Conversion Routines in Standard ML By Prashanth Tilleti Advisor Dr. Matthew Fluet Department of Computer Science B. Thomas Golisano

More information

Solution of Linear Systems

Solution of Linear Systems Chapter 3 Solution of Linear Systems In this chapter we study algorithms for possibly the most commonly occurring problem in scientific computing, the solution of linear systems of equations. We start

More information

Basic Proof Techniques

Basic Proof Techniques Basic Proof Techniques David Ferry dsf43@truman.edu September 13, 010 1 Four Fundamental Proof Techniques When one wishes to prove the statement P Q there are four fundamental approaches. This document

More information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) * Instruction set architecture of a machine fills the semantic gap between the user and the machine. * ISA serves as the starting point for the design of a new machine

More information

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may Number Theory Divisibility and Primes Definition. If a and b are integers and there is some integer c such that a = b c, then we say that b divides a or is a factor or divisor of a and write b a. Definition

More information

POLYNOMIAL FUNCTIONS

POLYNOMIAL FUNCTIONS POLYNOMIAL FUNCTIONS Polynomial Division.. 314 The Rational Zero Test.....317 Descarte s Rule of Signs... 319 The Remainder Theorem.....31 Finding all Zeros of a Polynomial Function.......33 Writing a

More information

MATH 10034 Fundamental Mathematics IV

MATH 10034 Fundamental Mathematics IV MATH 0034 Fundamental Mathematics IV http://www.math.kent.edu/ebooks/0034/funmath4.pdf Department of Mathematical Sciences Kent State University January 2, 2009 ii Contents To the Instructor v Polynomials.

More information

The sum of digits of polynomial values in arithmetic progressions

The sum of digits of polynomial values in arithmetic progressions The sum of digits of polynomial values in arithmetic progressions Thomas Stoll Institut de Mathématiques de Luminy, Université de la Méditerranée, 13288 Marseille Cedex 9, France E-mail: stoll@iml.univ-mrs.fr

More information

CS321. Introduction to Numerical Methods

CS321. Introduction to Numerical Methods CS3 Introduction to Numerical Methods Lecture Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506-0633 August 7, 05 Number in

More information

Number Systems and Radix Conversion

Number Systems and Radix Conversion Number Systems and Radix Conversion Sanjay Rajopadhye, Colorado State University 1 Introduction These notes for CS 270 describe polynomial number systems. The material is not in the textbook, but will

More information

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system

Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter 4 described a mathematical system CHAPTER Number Theory FIGURE FIGURE FIGURE Plus hours Plus hours Plus hours + = + = + = FIGURE. Clock Arithmetic and Modular Systems Clock Arithmetic The introduction to Chapter described a mathematical

More information

SUM OF TWO SQUARES JAHNAVI BHASKAR

SUM OF TWO SQUARES JAHNAVI BHASKAR SUM OF TWO SQUARES JAHNAVI BHASKAR Abstract. I will investigate which numbers can be written as the sum of two squares and in how many ways, providing enough basic number theory so even the unacquainted

More information

Settling a Question about Pythagorean Triples

Settling a Question about Pythagorean Triples Settling a Question about Pythagorean Triples TOM VERHOEFF Department of Mathematics and Computing Science Eindhoven University of Technology P.O. Box 513, 5600 MB Eindhoven, The Netherlands E-Mail address:

More information

MACHINE INSTRUCTIONS AND PROGRAMS

MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations

More information

Performance Comparison of an Algorithmic Current- Mode ADC Implemented using Different Current Comparators

Performance Comparison of an Algorithmic Current- Mode ADC Implemented using Different Current Comparators Performance Comparison of an Algorithmic Current- Mode ADC Implemented using Different Current Comparators Veepsa Bhatia Indira Gandhi Delhi Technical University for Women Delhi, India Neeta Pandey Delhi

More information

3 Some Integer Functions

3 Some Integer Functions 3 Some Integer Functions A Pair of Fundamental Integer Functions The integer function that is the heart of this section is the modulo function. However, before getting to it, let us look at some very simple

More information

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 E-mail: siddika.ors@itu.edu.tr Grading 1st Midterm -

More information

NUMBER SYSTEMS APPENDIX D. You will learn about the following in this appendix:

NUMBER SYSTEMS APPENDIX D. You will learn about the following in this appendix: APPENDIX D NUMBER SYSTEMS You will learn about the following in this appendix: The four important number systems in computing binary, octal, decimal, and hexadecimal. A number system converter program

More information

23. RATIONAL EXPONENTS

23. RATIONAL EXPONENTS 23. RATIONAL EXPONENTS renaming radicals rational numbers writing radicals with rational exponents When serious work needs to be done with radicals, they are usually changed to a name that uses exponents,

More information

Integrals of Rational Functions

Integrals of Rational Functions Integrals of Rational Functions Scott R. Fulton Overview A rational function has the form where p and q are polynomials. For example, r(x) = p(x) q(x) f(x) = x2 3 x 4 + 3, g(t) = t6 + 4t 2 3, 7t 5 + 3t

More information

Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem.

Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem. Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem. Solve word problems that call for addition of three whole numbers

More information

Math Workshop October 2010 Fractions and Repeating Decimals

Math Workshop October 2010 Fractions and Repeating Decimals Math Workshop October 2010 Fractions and Repeating Decimals This evening we will investigate the patterns that arise when converting fractions to decimals. As an example of what we will be looking at,

More information

Examples of Functions

Examples of Functions Examples of Functions In this document is provided examples of a variety of functions. The purpose is to convince the beginning student that functions are something quite different than polynomial equations.

More information

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals of Computer Organization and Design. Introduction

More information

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations

ECE 0142 Computer Organization. Lecture 3 Floating Point Representations ECE 0142 Computer Organization Lecture 3 Floating Point Representations 1 Floating-point arithmetic We often incur floating-point programming. Floating point greatly simplifies working with large (e.g.,

More information

Linear Programming. Solving LP Models Using MS Excel, 18

Linear Programming. Solving LP Models Using MS Excel, 18 SUPPLEMENT TO CHAPTER SIX Linear Programming SUPPLEMENT OUTLINE Introduction, 2 Linear Programming Models, 2 Model Formulation, 4 Graphical Linear Programming, 5 Outline of Graphical Procedure, 5 Plotting

More information

Lies My Calculator and Computer Told Me

Lies My Calculator and Computer Told Me Lies My Calculator and Computer Told Me 2 LIES MY CALCULATOR AND COMPUTER TOLD ME Lies My Calculator and Computer Told Me See Section.4 for a discussion of graphing calculators and computers with graphing

More information

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

A s we saw in Chapter 4, a CPU contains three main sections: the register section, 6 CPU Design A s we saw in Chapter 4, a CPU contains three main sections: the register section, the arithmetic/logic unit (ALU), and the control unit. These sections work together to perform the sequences

More information

Lecture 11: Number Systems

Lecture 11: Number Systems Lecture 11: Number Systems Numeric Data Fixed point Integers (12, 345, 20567 etc) Real fractions (23.45, 23., 0.145 etc.) Floating point such as 23. 45 e 12 Basically an exponent representation Any number

More information

LEARNING OBJECTIVES FOR THIS CHAPTER

LEARNING OBJECTIVES FOR THIS CHAPTER CHAPTER 2 American mathematician Paul Halmos (1916 2006), who in 1942 published the first modern linear algebra book. The title of Halmos s book was the same as the title of this chapter. Finite-Dimensional

More information

Math 319 Problem Set #3 Solution 21 February 2002

Math 319 Problem Set #3 Solution 21 February 2002 Math 319 Problem Set #3 Solution 21 February 2002 1. ( 2.1, problem 15) Find integers a 1, a 2, a 3, a 4, a 5 such that every integer x satisfies at least one of the congruences x a 1 (mod 2), x a 2 (mod

More information

Section 1.1 Linear Equations: Slope and Equations of Lines

Section 1.1 Linear Equations: Slope and Equations of Lines Section. Linear Equations: Slope and Equations of Lines Slope The measure of the steepness of a line is called the slope of the line. It is the amount of change in y, the rise, divided by the amount of

More information

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra:

Partial Fractions. Combining fractions over a common denominator is a familiar operation from algebra: Partial Fractions Combining fractions over a common denominator is a familiar operation from algebra: From the standpoint of integration, the left side of Equation 1 would be much easier to work with than

More information

Arrangements of Stars on the American Flag

Arrangements of Stars on the American Flag Arrangements of Stars on the American Flag Dimitris Koukoulopoulos and Johann Thiel Abstract. In this article, we examine the existence of nice arrangements of stars on the American flag. We show that

More information