Unit 1 - Computer Arithmetic

Size: px
Start display at page:

Download "Unit 1 - Computer Arithmetic"

Transcription

1 FIXD-POINT (FX) ARITHMTIC Unit 1 - Comuter Arithmetic INTGR NUMBRS n bit number: b n 1 b n 2 b 0 Decimal Value Range of values UNSIGND n 1 SIGND D = b i 2 i D = 2 n 1 b n 1 + b i 2 i n 2 i=0 i=0 [0, 2 n 1] [ 2 n 1, 2 n 1 1] FIXD POINT RPRSNTATION Tyical reresentation [n ]: n bit number with fractional bits: b n 1 b n 2 b 0. b 1 b 2 b n Decimal Value Range of values Dynamic Range Resolution (1 LSB) Dynamic Range: UNSIGND n 1 D = b i 2 i i= SIGND n 2 D = 2 n 1 b n 1 + b i 2 i [ 0 2, 2n 1 2 ] = [0, 2 n 2 ] [ 2n 1 2, 2n ] = [ 2 n 1, 2 n 1 2 ] 2 n 2 2 = 2 n 2 n = 2 n 1 (db) = 20 log 10 (2 n 1) (db) = 20 log 10 (2 n 1 ) 2 2 Dynamic Range = largest abs. value smallest nonzero abs. value i= Unsigned numbers: Range of Values Dynamic Range(dB) = 20 log 10 (Dynamic Range) Signed numbers: Range of Values xamles: UNSIGND SIGND FX Format Range Dynamic Range (db) Resolution [8 7] [0, ] [12 8] [0, ] [16 10] [0, ] [8 7] [-1, ] [12 8] [-8, ] [16 10] [-64, ] Instructor: Daniel Llamocca

2 c 9 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =1 c 4 =1 c 3 =1 c 2 =1 c 1 =0 c 10 =1 c 9 =1 c 8 =1 c 7 =0 c 6 =1 c 5 =1 c 4 =1 c 3 =0 c 2 =0 c 1 =0 c 9 =1 c 8 =1 c 7 =0 c 6 =0 c 5 =0 c 4 =1 c 3 =0 c 2 =0 c 1 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 4 =0 c 3 =0 c 2 =0 c 1 =0 c 8 =1 c 7 =1 c 6 =1 c 5 =1 c 4 =0 c 3 =1 c 2 =0 c 1 =0 b 7 =0 b 6 =0 b 5 =0 b 4 =1 b 3 =1 b 2 =1 b 1 =1 b 0 =0 c 6 =1 c 5 =1 c 4 =1 c 3 =0 c 2 =0 c 1 =1 c 10 =0 c 9 =0 c 8 =0 c 7 =1 c 6 =0 c 5 =0 c 4 =0 c 3 =0 c 2 =0 c 1 =0 FIXD-POINT ADDITION/SUBTRACTION Addition of two numbers reresented in the format [n ]: + A 2 ± B 2 = (A ± B) 2 We erform integer addition/subtraction of A and B. We just need to interret the result differently by lacing the fractional oint where it belongs. Notice that the hardware is the same as that of integer addition/subtraction. +1 When adding/subtracting numbers with different formats [n ] and [m ], we first need to align the fractional oint so that we use a format for both numbers: it could be [n ], [m ], [n + ], [m + ]. This is done by zero-adding and sign-extending where necessary. In the figure below, the format selected for both numbers is [m ], while the result is in the format [m + 1 ]. + m- m- m-+1 Imortant: The result of the addition/subtraction requires an extra bit in the worst-case scenario. In order to correctly comute it in fixed-oint arithmetic, we need to sign-extend (by one bit) the oerators rior to addition/subtraction. m- + m-+1 Multi-oerand Addition: N numbers of format [n ]: The total number of bits is given by : n + log 2 N (this can be demonstrated by an adder tree). Notice that the number of fractional bits does not change (it remains ), only the integer bits increase by log 2 N, i.e., the number of integer bits become n + log 2 N. xamles: Calculate the result of the additions and subtractions for the following fixed-oint numbers. UNSIGND SIGND Unsigned: Signed: Instructor: Daniel Llamocca

3 FIXD-POINT MULTIPLICATION Unsigned multilication Multilication of two signed numbers reresented with different formats [n ], [m ]: x m- (A 2 ) (B 2 ) = (A B) 2. We can erform integer multilication of A and B and then lace the fractional oint where it belongs. The format of the multilication result is given by [n + m + ]. There is no need to align the fractional oint of the inut quantities. Secial case: m = n, = (A 2 ) (B 2 ) = (A B) 2 2. Here, the format of the multilication result is given by [2n 2]. Multilication rocedure for unsigned integer numbers: n+m-- + a 3 a 2 a 1 a 0 x b 3 b 2 b 1 b 0 a 3 b 0 a 2 b 0 a 1 b 0 a 0 b 0 a 3 b 1 a 2 b 1 a 1 b 1 a 0 b 1 a 3 b 2 a 2 b 2 a 1 b 2 a 0 b 2 a 3 b 3 a 2 b 3 a 1 b 3 a 0 b xamle: when multilying, we treat the numbers as integers. Only when we get the result, we lace the fractional oint where it belongs = x 6.5 = x = Signed Multilication: We first tae the absolute value of the oerands. Then, if at least one of the oerands was negative, we need to change the sign of the result. We then lace the fractional oint where it belongs. xamles: x x x x x x x x x x x x Instructor: Daniel Llamocca

4 FIXD-POINT DIVISION Unsigned integer division: The division of two unsigned integer numbers A B (where A is the dividend and B the divisor), results in a quotient Q and a remainder R, where A = B Q + R. Most divider architectures outut Q and R. 15 Q Q ALGORITHM B 101 R end For n-bits dividend (A) and m-bits divisor (B): The largest value for Q is 2 n 1 (by using B = 1). The smallest value for Q is 0. So, we use n bits for Q. The remainder R is a value between 0 and B 1. Thus, at most we use m bits for R. If A = 0, B 0, then Q = R = 0. If B = 0, we have a division by zero. The result is undetermined. In comuter arithmetic, integer division usually means getting Q = A B. Unsigned FX Division: A f B f We first need to align the numbers so that they have the same number of fractional bits, then divide them treating them as integers. The quotient will be integer, while the remainder will have the same number of fractional bits as A f. A f is in the format [na a]. B f is in the format [nb b]. We wor with a b. If a < b, just aend 0 s to A f so that a = b. Ste 1: For a b, we align the fractional oints and then get the integer numbers A and B, which result from: A = A f 2 a B = B f 2 a Ste 2: Integer division: A B = A f B f The numbers A and B are related by the formula: A = B Q + R, where Q and R are the quotient and remainder of the integer division of A and B. Note that Q is also the quotient of A f B f. Ste 3: To get the correct remainder of A f B f, we re-write the revious equation: Then: Q f = Q, R f = R 2 a xamle: A ,011 11,1 R B A A f 2 a = (B f 2 a ) Q + R A f = B f Q + (R 2 a ) R = 0 for i = n-1 downto 0 left shift R (inut = a i ) if R B Ste 1: Alignment, a = ,011 = 1010,011 11,1 11,100 = Ste 2: Integer Division = 11100(10) Q = 10, R = Ste 3: Get actual remainder: R 2 a R f = 11,011 Verification: 1010,011 = 11,1(10) + 11,011, Q f = 10, R f = 11,011 Adding recision to Qf (quotient of A f B f ): The revious rocedure only gets Q as an integer. What if we want to get the division result with x number of fractional bits? To do so, after alignment, we aend x zeros to A f 2 a and erform integer division. A = A f 2 a 2 x B = B f 2 a A f 2 a+x = (B f 2 a ) Q + R A f = B f (Q 2 x ) + (R 2 a x ) Then: Q f = Q 2 x, R f = R 2 a x q i else q i = 0 end = 1, R R-B xamle: 1010,011 11,1 Ste 1: Alignment, a = 3 Ste 2: Aend x = 2 zeros with x = 2 bits of recision 1010,011 = 1010,011 11,1 11,100 = = Instructor: Daniel Llamocca

5 Ste 3: Integer Division Ste 4: Get actual remainder and quotient: Q f = Q 2 x, R f = R 2 a x = 11100(1011) , Q = 1011, R = Q f = 10,11, R f = 0,11000 Verification: 1010,01100 = 11,1(10,11) + 0,11000 Signed FX Division: In this case (as in the multilication), we first tae the absolute value of the oerators A and B. If only one of the oerators is negative, the result of A B requires a sign change. Note that once the correct quotient Q f with fractional bits is available, getting R f with the correct sign is not very useful. xamles: Get the division result (with x = 4 fractional bits) for the following signed fixed-oint numbers: : To ositive (numerator and denominator), alignment, and then to unsigned: a = 4: = Aend x = 4 zeros: Unsigned integer Division: Q = , R = 100 Qf = (x = 4) Final result (2C): = (this is reresented as a signed number) : To ositive (numerator and denominator), alignment, and then to unsigned, a = 5: Aend x = 4 zeros: Unsigned integer Division: Q = 1111, R = 101 Qf = (x = 4) Final result (2C): = (this is reresented as a signed number) : To ositive (numerator), alignment, and then to unsigned, a = 4: = Aend x = 4 zeros: Unsigned integer Division: Q = 10100, R = Qf = (x = 4) Qf here is reresented as an unsigned number Final result (2C): = 2C(01.01) = = : To ositive (denominator), alignment, and then to unsigned, a = 5: = Aend x = 4 zeros: Unsigned integer Division: Q = 111, R = 1110 Qf = (x = 4) Final result (2C): = 2C(0.0111) = Instructor: Daniel Llamocca

6 ARITHMTIC FX UNITS. TRUNCATION/ROUNDING/SATURATION ARITHMTIC FX UNITS They are essentially the same as those integer arithmetic units. The main difference is that we need to now where to lace the fractional oint. The design must ee trac of the FX format at every oint of the architecture. For examle, in FX division, we need first to erform alignment and aend x zeros for a desired recision; this incurs in slightly extra hardware. One benefit of FX reresentation is that we can erform truncation, rounding and saturation on the inut, intermediate, and outut values. These oerations usually require extra hardware resources. Truncation This is a useful oeration when less hardware is required in subsequent oerations. However this comes at the exense of less accuracy. To assess the effect of truncation, use PSNR (db) or MS with resect to a double floating oint result or with resect to the original [n ] format. Truncation is usually meant to be truncation of the fractional art. However, we can also - truncate the integer art (cho off MSBs). This is not recommended as it might render the number unusable. Rounding This oeration allows for hardware savings in subsequent oerations at the exense of reduced accuracy. But it is more accurate than simle truncation. However, it requires extra hardware to deal with the rounding oeration. For the number b n 1 b n 2 b 0. b 1 b 2 b, if we want to cho bits (LSB ortion), we use the b 1 bit to determine whether to round. If the b 1 = 0, we just truncate. If b 1 = 1, we need to add 1 to the LSB of the truncated result Saturation This is helful when we need to restrict the number of integer bits. Here, we are ased to reduce the number of integer bits by. Simle truncation chos off the integer art by bits; this might comletely modify the number and render it totally unusable. Instead, in n- saturation, we aly the following rules: If all the + 1 MSBs of the initial number are identical, that means that choing by bits does not change the number at all, so we just discard the MSBs. - If the + 1 MSBs are not identical, choing by bits does change the number. Thus, here, if the MSB of the initial number is 1, the resulting (n )-bit number will be 2 n 1 = 10 0 (largest negative number). If the MSB is 0, the resulting (n )-bit number will be 2 n 1 2 = (largest ositive number). xamles: Reresent the following signed FX numbers in the signed fixed-oint format: [8 7]. You can use rounding or truncation for the fractional art. For the integer art, use saturation. 1, : To reresent this number in the format [8 7], we ee the integer bit, and we can only truncate or round the last LSB: After truncation: 1, After rounding: 1, = 1, , : Here, we need to get rid of on MSB and two LSBs. Let s use rounding (to the next bit). Saturation in this case amounts to truncation of the MSB, as the number won t change if we remove the MSB. After rounding: 11, = 11, After saturation: 1, , : Here, we need to get rid of two MSB and two LSBs. Saturation: Since the three MSBs are not the same and the MSB=1 we need to relace the number by the largest negative number (in absolute terms) in the format [8 7]: 1, , : Here, we need to get rid of two MSB and three LSBs. Saturation: Since the three MSBs are not identical and the MSB=0, we need to relace the number by the largest ositive number in the format [8 7]: 0, Instructor: Daniel Llamocca

7 FLOATING-POINT (FP) ARITHMTIC FLOATING POINT RPRSNTATION There are many ways to reresent floating numbers. A common way is: X = ±significand 2 e e significand m xonent e: Signed integer. It is common to encode this field using a bias: e + bias. This facilitates zero detection (e + bias = 0). Note that the exonent of the actual number is always e regardless of the bias (the bias is just for encoding). e [ 2 1, ] Significand: Unsigned fixed-oint number. Usually normalized to a articular format, e.g.: [0, 1), [1,2). Format (unsigned): [m ]. Range: [0, 2m 1 m ] = [0, 2 2m 2 ], = m If = 0 Significand [0,1 2 ] = [0,1) If = m Significand [0, 2 m 1]. Integer significand. Another common reresentation of the significand is using = 1 and setting that bit (the MSB) to 1. Here, the range of the significand would be [0, ], but since the integer bit is 1, the values start from 1, which result in the following significand range: [1, ]. This is a oular normalization, as it allows us to dro the MSB in the encoding. I-754 STANDARD The reresentation is as follows: X = ±1. f 2 e sign bit biased exonent e+bias Significand: Unsigned FX number. The reresentation is normalized to s = 1. f, where f is the mantissa. There is always an integer bit 1 (called hidden 1) in the reresentation of the significand, so we do not need to indicate in the encoding. Thus, we only use f the mantissa in the significant field. Significand range: [1,2 2 ] = [1,2) Biased exonent: Unsigned integer with bits. bias = Thus, ex = e + bias e = ex bias. We just subtract the bias from the exonent field in order to get the exonent value e. ex = e + bias [0, 2 1 ]. ex is reresented as un unsigned integer number with bits. The bias maes sure that ex 0. Also note that e [ , 2 1 ]. The I-754 standard reserves the following cases: i) ex = 2 1 (e = 2 1 ) to reresent secial numbers (NaN and ± ), and ii) ex = 0 to reresent the zero and the denormalized numbers. The remaining cases are called ordinary numbers. significand f Ordinary numbers: biased exonent e+bias [1,2-2] significand Range of e: [ , 2 1 1]. largest exonent Max number:largest significand 2 f max = = (2 2 ) Min. number: smallest significand 2 min = = Dynamic Range = max min = (2 2 ) = (2 2 ) Dynamic Range (db) = 20 log 10 {(2 2 ) } smallest exonent Plus/minus Infinite: ± biased exonent significand e+bias = 2-1 f=0 The ex field is a string of 1 s. This is a secial case where ex = 2 1. (e = 2 1 ) ± = ±2 2 1 Not a Number: NaN biased exonent e+bias = 2-1 significand f 0 The ex field is a strings of 1 s. ex = 2 1. This is a secial case where ex = 2 1 (e = 2 1 ). The only difference with ± is that f is a nonzero number. 7 Instructor: Daniel Llamocca

8 Zero: biased exonent significand Zero cannot be reresented with a normalized significand s = since X = ±1. f 2 e cannot be e+bias = 0 f=0 zero. Thus, a secial code must be assigned to it, where s = and ex = 0. very single bit (excet for the sign) is zero. There are two reresentations for zero. The number zero is a secial case of the denormalized numbers, where s = 0. f (see below). Denormalized numbers: The imlementation of these numbers is otional in the standard (excet for the zero). Certain small values that are not reresentable as normalized numbers (and are rounded to zero), can be reresented more recisely with denormals. This is a graceful underflow rovision, which leads to hardware overhead. biased exonent e+bias = 0 significand f 0 These numbers have the ex field equal to zero. The tricy art is that e is set to (not , as the e + bias formula states). The significand is reresented as s = 0. f. Thus, the floating oint number is X = ±0. f These numbers can reresent numbers lower (in absolute value) than min (the number zero is a secial case). Why is e not ? Note that the smallest ordinary number is The largest denormalized number with e = is: = (1 2 ) The largest denormalized number with e = is: = (1 2 ) By icing e = , the ga between the largest denormalized number and the smallest ordinary number is smaller. Though this secification maes the formula e + bias = 0 inconsistent, it hels to imrove accuracy. Deiction of the range of values: Underflow region (or denormal numbers) Overflow region The I (revision of I ) standard defines several reresentations: half (16 bits, =5, =10), single (32 bits, = 8, = 23) and double (64 bits, = 11, = 52). There is also quadrule recision (128 bits) and octule recision (256 bits). You can define your own reresentation by selecting a articular number of bits for the exonent and significand. The table lists various arameters for half, single and double FP arithmetic (ordinary numbers): Ordinary numbers xonent Dynamic Significand Significand Range of e Bias Min Max bits () Range (db) range bits () Half 2 14 ( ) [ 14,15] db [1, ] 10 Single ( ) [ 126,127] db [1, ] 23 Double ( ) [ 1022,1023] db [1, ] 52 Rules for arithmetic oerations: Ordinary number (+ ) = ±0 Ordinary number (0) = ± (+ ) Ordinary number = ± NaN + Ordinary number = NaN (0) (0) = NaN (± ) (± ) = NaN (0) (± ) = NaN ( ) + ( ) = NaN xamles: F43D962 (single): e + bias = = 232 e = = 105 Significand = = X = = FAD5 (single): e + bias = = 0 Denormal number e = 126 Significand = = X = = Instructor: Daniel Llamocca

9 c 12 =1 c 11 =1 c 10 =1 c 9 =1 c 8 =1 c 7 =0 c 6 =1 c 5 =0 c 4 =1 c 3 =1 c 2 =0 c 1 =1 ADDITION/SUBTRACTION b 1 = ±s 1 2 e 1, s 1 = 1. f 1 b 2 = ±s 2 2 e 2, s 1 = 1. f 2 b 1 + b 2 = ±s 1 2 e 1 ± s 2 2 e 2 If e 1 e 2, we simly shift s 2 to the right by e 1 e 2 bits. This ste is referred to as alignment shift. s 2 2 e 2 = s 2 2 e 2 1 e e 1 2 b 1 + b 2 = ±s 1 2 e 1 ± s 2 2 e 2 1 e e 1 = (±s 2 1 ± s 2 2 e ) 2 1 e e 1 = s 2 e 2 b 1 b 2 = ±s 1 2 e 1 s 2 2 e 1 e 2 2 e 1 = (±s 1 s 2 2 e 1 e 2 ) 2 e 1 = s 2 e Normalization: Once the oerators are aligned, we can add. The result might not be in the format 1. f, so we need to discard the leading 0 s of the result and sto when a leading 1 is found. Then, we must adjust e 1 roerly, this results in e. For examle, for addition, when the two oerands have similar signs, the resulting significand is in the range [1,4), thus a single bit right shift is needed on the significant to comensate. Then, we adjust e 1 by adding 1 to it (or by left shifting everything by 1 bit). When the two oerands have different signs, the resulting significand might be lower than 1 (e.g.: ) and we need to first discard the leading zeros and then right shift until we get 1. f. We then adjust e 1 by adding the same number as the number of shifts to the right on the significand. Note that overflow/underflow can occur during the addition ste as well as due to normalization. xamle: s 3 = (±s 1 ± s 2 2 e 1 e2 ) = First, discard the leading zeros: s 3 = Normalization: right shift 1 bit: s = s = Now that we have the normalized significand s, we need to adjust the exonent e 1 by adding 1 to it: e = e 1 + 1: (s ) 2 e 1+1 = s 2 e = e 1+1 xamle: b 1 = , b 2 = b = b 1 + b 2 = = ( ) = To get this result, we convert the oerands to the 2C reresentation (you can also do unsigned subtraction if the result is ositive). Here, the result is ositive. Finally, we erform normalization: b = b 1 + b 2 = ( ) 2 5 = ( ) = xamle (Subtraction): b 1 = , b 2 = b = b 1 b 2 = = ( ) 2 5 To subtract, we convert to 2C reresentation: R = = = Here, the result is negative. So, we get the absolute value ( R = 2C(1.0111) = ) and lace the negative sign on the final result: b = b 1 b 2 = (0.1001) 2 5 xamles: X = 50DAD000 D0FAD000: 50DAD000: e + bias = = 161 e = = 34 Significand = DAD000 = D0FAD000: e + bias = = 161 e = = 34 Significand = D0FAD000 = X = (unsigned addition) X = = e + bias = = 162 = X = = 516AD Instructor: Daniel Llamocca

10 X = 60A C2F97000: 60A10000: e + bias = = 193 e = = 66 Significand = A10000 = C2F97000: e + bias = = 133 e = = 6 Significand = C2F97000 = X = X = Reresenting the division by 2 60 requires more than + 1 = 24 bits. Thus, we can aroximate the 2 nd oerand with 0. X = X = = 60A10000 MULTIPLICATION b 1 = ±s 1 2 e 1, b 2 = ±s 2 2 e 2 b 1 b 2 = (±s 1 2 e 1 ) (±s2 2 e 2 ) = ±(s1 s 2 )2 e 1+e 2 Note that s = (s 1 s 2 ) [1,4). This means that the result might require normalization. xamle: b 1 = , b 2 = , b = b 1 b 2 = ( ) 2 6 = (10,0001) 2 6, Normalization of the result: b = (10, ) 2 7 = (1,00001) 2 7. Note: If the multilication requires more bits than allowed by the reresentation (32, 64 bits), we have to do truncation or rounding. It is also ossible that overflow/underflow might occur due to large/small exonents and/or multilication of large/small numbers. xamles: X = 7A09D300 0BF000: 7A09D300: e + bias = = 244 e = = 117 Significand = A09D300 = BF000: e + bias = = 23 e = = 104 Significand = BF000 = X = X = = = e + bias = = 141 = X = = 4680A35F (four bits were truncated) X = 0B09A000 8FACC000: 0B092000: e + bias = = 22 e = = 105 Significand = B = FACC000: e + bias = = 31 e = = 96 Significand = FAC000 = X = = = e + bias = = 74 < 0 Here, there is underflow (not even denormalized numbers different than zero can reresent it). Then X 0. X = = Instructor: Daniel Llamocca

11 DIVISION b 1 = ±s 1 2 e 1, b 2 = ±s 2 2 e 2 b 1 b 2 = ±s 12 e1 ±s 2 2 e 2 = ± s 1 s 2 2 e 1 e 2 Note that s = ( s 1 s 2 ) (1/2,2). This means that the result might require normalization. xamle: b 1 = , b 2 = b = b = : unsigned division, here we can include as many fractional bits as we want. With x = 4 (and a = 0) we have: = 10101(1011) Q f = 1,0101, R f = 00,0011 If the result is not normalized, we need to normalized it. In this examle, we do not need to do this. b = b = xamle: X = : : e + bias = = 146 e = = 19 Significand = = : e + bias = = 128 e = = 1 Significand = BF000 = X = Alignment: = = Aend x = 8 zeros: Integer division Q = , R = Qf = Thus: X = = = = e + bias = = 145 = X = = 489B Instructor: Daniel Llamocca

12 DUAL FIXD-POINT (DFX) ARITHMTIC Floating oint (FP) and fixed oint (FX) arithmetic are the standard numerical reresentations. Floating oint features a large dynamic range at the exense of a large resource usage. On the other hand, fixed oint requires fewer resources, but it delivers a low dynamic range. Dual fixed oint (DFX) arithmetic is an alternative reresentation that overcomes the limitations of FX (it greatly imroves dynamic range) without the high resource comlexity of floating oint. n bit Dual Fixed Point (DFX) number: exonent (), signed significand (X) with n 1 bits. xonent : It selects between two scalings for the significand X. Thus, there are two ossible cases for a DFX number D: D = { num0: X. 2 0, if = 0 num1: X. 2 1, if = 1, 0 > 1 num0: It has 0 fractional bits. num1: It has 1 fractional bits. Notation of a DFX number: n_0_1 or [n 0 1 ]. XPONNT SIGND SIGNIFICANT: n-1 bits X n bits BOUNDARY VALU The scaling (value of ) is determined by the boundary value B: = { 0 (num0), B D < B 1 (num1), D < B and D B Boundary value B: Defined as the next incremental value after the maximum ositive number of num0: Range of num0 = 2(n 1) 1 2 to 2(n 1) 1 1 n B = 2(n 1) LSB = 2(n 1) B = 2n num0: 0 0 If we have a num0 number with n bits, it seems that we could convert it into a num1 number with n bits (by truncating 0 1 LSBs and by sign-extending the MSB of the significand). However, we cannot do this, as the number will not be in the num1 range (D < B and D B). To convert a num0 number that does not fit with n bits (but with n + x bits, format (n + x)_ 0 _ 1 ) into a num1 number that might fit with n bits (format n_ 0 _ 1 ), we need to discard the 0 1 LSBs and then sign-extend the significand by 0 1 x bits. xamle: Format 16_7_3 to 14_7_3: x = 2, 0 1 = 4 num0 number in format 16_7_3: Convert to 14_7_3: it has to be num1: (num0 would not wor as we will lose MSBs) RANGS FOR num0 and num1: num0 range: There is smaller sacing (2 0 ) between consecutive numbers; thus, they are more accurate. num1 range: There is larger sacing (2 1 ) between consecutive numbers; thus, they are less accurate. num1 Range num0 Range 0 Range for num0: [ 2 n 0 2, 2 n ] Range for num1: [ 2 n 1 2, 2 n ] [ 2 n 0 2, 2 n ] 12 Instructor: Daniel Llamocca

13 DYNAMIC RANG It is defined as the ratio between the largest absolute value and the smallest nonzero absolute value. Unsigned numbers with n bits: Signed numbers (2 s comlement): [n ] Dual fixed oint (DFX) numbers: n_0_1 2 n 1 = 2 1 n 1 Dynamic Range = 20 log 10 (2 n 1) db 2 n 1 2 = 2 n 1 Dynamic Range = 20 log 10 (2 n 1 ) db 2 n = 2 0 n Dynamic Range = 20 log 10 (2 n ) db FX TO DFX CONVRSION What if we have [nin in] (signed) and we want to convert to n_0_1? We first try with num0 (since it is more accurate). For num0 we need: B D < B, B = 2 n 0 2. Note that B 2 0 = B = A quic way to chec this is by aligning the two formats and then comaring the nin in (n 1 0) + 1 MSBs of the FX format with the MSB (of the significand) of the DFX number. If they are all the same, that means that the number is a num0. niin in [nin in] n num0 0 If the number is not a num0, we try with num1: niin in [nin in] num1 1 n If num1 does not wor either, it means there is overflow and we need more than n bits. Note: This rocedure always starts by checing if the number is num0. A common mistae is to start by checing if the number is num1. The rocedure only wors for continuous ranges, which is not the case of num1. To directly verify that a DFX number is a num1, see if we can dro off enough MSBs so as to mae it a num0. If the integer art is affected, then the number is a num1; otherwise it is a num0. xamles: Signed [8 4] to 7_4_3. We first chec for num0, then for num1. None of these wor, so there is overflow (need more bits). 8 bits 8 bits [8 4] [8 4] _4_3, num _4_3, num bits 7 bits Signed [8 4] to 8_4_3. We first chec for num0, which does not wor. Then, we chec for num1, which wors. 8 bits 8 bits [8 4] [8 4] _4_3, num _4_3, num bits 13 Instructor: Daniel Llamocca

14 xamles Convert the following signed fixed-oint numbers in format [12 8] to Dual Fixed Point Format 12_8_4:.: To DFX 12_8_4 (num0): = 6 A.CD: To DFX 12_8_4 (num0): = not a num0! To DFX 12_8_4 (num1): = FAC C.1B: To DFX 12_8_4 (num0): = 41B 8.B9: To DFX 12_8_4 (num0): = not a num0! To DFX 12_8_4 (num1): = F8B 3.0A: To DFX 12_8_4 (num0): = 10A DUAL FIXD-POINT ADDITION Here, we add two DFX numbers A and B with n bits. To do this, we need to follow this rocedure: Pre-scaling: We get rid of the exonent () bit. Then, we align the two (n 1)-bit significands (signed FX numbers). Here, alignment might require discarding 0 1 fractional bits (truncation) and sign-extending MSBs by 0 1 bits. Imroving DFX Adder accuracy: We can save the 0 1 truncated LSBs. In the ost-scaler, we might be able to shift in the truncated LSBs. This only wors when A and B have different exonents. Fixed-oint addition: This is a simle addition of two (n 1)-bit significands. Note that in the addition result can have u to n bits. The format would be either [n 0 ] or [n 1 ]. Post-scaling: The n-bit FX result must be converted to n-bit DFX. In some cases, there can be overflow when the result cannot fit as a num1 in DFX. xamles: Addition of numbers in format 8_3_2. The result should be in the same format. Addition of two num0 numbers: FX addition requires 9 bits. When this FX number is converted to DFX, we notice that it cannot be reresented as a num0 (unless we change the DFX format to 9_3_2); it will have to be a num1. DFX FX FX DFX: num0 DFX: num Addition of two num1 numbers. Addition results in overflow (we need 9 bits to reresent the result). Here, the result in format 8_3_2 has to include an overflow flag. We can recover from this if we include a carry out (c n ) bit in the circuitry. DFX FX FX Overflow! DFX: num0 DFX: num Instructor: Daniel Llamocca

15 Addition of a num0 and a num1 number. Addition does not result in overflow, num0 suffices to reresent the addition in the 8_3_2 format. Here, there are two ways: add zero the LSB or retrieve the saved bit. DFX FX FX DFX: num0 OR DFX: num Subtraction of two num1 numbers. The oeration does not result in overflow, num0 suffices to reresent the final result in the 8_3_2 format. DFX FX FX FX bits 7 bits 7 bits DFX: num0 8 bits DUAL FIXD-POINT MULTIPLICATION Here, we add two DFX numbers with n bits. To do this, we get rid of the exonent () bit, and then we only need to multily two (n 1)-bit significands in fixed oint arithmetic. Then, we convert the FX result into the DFX number. Unlie DFX addition, there is no re-scaling. We just multily the two signed FX numbers. The result will have 2n-2 bits. We need a Post-Scaling stage that converts this FX result into the DFX format. xamles: DFX multilication of numbers in [8 3 2] format. DFX x DFX x x Signed FX x Unsigned FX Unsigned integer x x Signed FX x Unsigned FX Unsigned integer x Signed FX Signed FX Mult. Result Signed FX Mult. Result To DFX 8_3_2 (num0): = To DFX 8_3_2 (num0): = Instructor: Daniel Llamocca

Computer arithmetic. Intensive Computation. Annalisa Massini 2017/2018

Computer arithmetic. Intensive Computation. Annalisa Massini 2017/2018 Comuter arithmetic Intensive Comutation Annalisa Massini 7/8 Intensive Comutation - 7/8 References Comuter Architecture - A Quantitative Aroach Hennessy Patterson Aendix J Intensive Comutation - 7/8 3

More information

Round-off Errors and Computer Arithmetic - (1.2)

Round-off Errors and Computer Arithmetic - (1.2) Round-off Errors and Comuter Arithmetic - (.). Round-off Errors: Round-off errors is roduced when a calculator or comuter is used to erform real number calculations. That is because the arithmetic erformed

More information

CSC165H, Mathematical expression and reasoning for computer science week 12

CSC165H, Mathematical expression and reasoning for computer science week 12 CSC165H, Mathematical exression and reasoning for comuter science week 1 nd December 005 Gary Baumgartner and Danny Hea hea@cs.toronto.edu SF4306A 416-978-5899 htt//www.cs.toronto.edu/~hea/165/s005/index.shtml

More information

Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure!

Solutions - Homework 1 (Due date: September 25 th ) Presentation and clarity are very important! Show your procedure! c 10 =0 c 9 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 10 =1 c 9 =1 c 8 =1 c 7 =0 c 6 =1 c 5 =1 c 4 =1 c 8 =1 c 7 =1 c 6 =0 c 5 =0 c 8 =0 c 7 =0 c 6 =0 c 5 =0 c 8 =1 c 7 =1 c 6 =1 c 5 =0 c 4 =1 b 7 =0 b 6 =0 b 5

More information

Binary Floating-Point Numbers

Binary Floating-Point Numbers Binary Floating-Point Numbers S exponent E significand M F=(-1) s M β E Significand M pure fraction [0, 1-ulp] or [1, 2) for β=2 Normalized form significand has no leading zeros maximum # of significant

More information

Cryptanalysis of Pseudorandom Generators

Cryptanalysis of Pseudorandom Generators CSE 206A: Lattice Algorithms and Alications Fall 2017 Crytanalysis of Pseudorandom Generators Instructor: Daniele Micciancio UCSD CSE As a motivating alication for the study of lattice in crytograhy we

More information

4. Score normalization technical details We now discuss the technical details of the score normalization method.

4. Score normalization technical details We now discuss the technical details of the score normalization method. SMT SCORING SYSTEM This document describes the scoring system for the Stanford Math Tournament We begin by giving an overview of the changes to scoring and a non-technical descrition of the scoring rules

More information

The Euler Phi Function

The Euler Phi Function The Euler Phi Function 7-3-2006 An arithmetic function takes ositive integers as inuts and roduces real or comlex numbers as oututs. If f is an arithmetic function, the divisor sum Dfn) is the sum of the

More information

ALU (3) - Division Algorithms

ALU (3) - Division Algorithms HUMBOLDT-UNIVERSITÄT ZU BERLIN INSTITUT FÜR INFORMATIK Lecture 12 ALU (3) - Division Algorithms Sommersemester 2002 Leitung: Prof. Dr. Miroslaw Malek www.informatik.hu-berlin.de/rok/ca CA - XII - ALU(3)

More information

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017

9. Datapath Design. Jacob Abraham. Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 9. Datapath Design Jacob Abraham Department of Electrical and Computer Engineering The University of Texas at Austin VLSI Design Fall 2017 October 2, 2017 ECE Department, University of Texas at Austin

More information

MA3H1 TOPICS IN NUMBER THEORY PART III

MA3H1 TOPICS IN NUMBER THEORY PART III MA3H1 TOPICS IN NUMBER THEORY PART III SAMIR SIKSEK 1. Congruences Modulo m In quadratic recirocity we studied congruences of the form x 2 a (mod ). We now turn our attention to situations where is relaced

More information

2. Review of Calculus Notation. C(X) all functions continuous on the set X. C[a, b] all functions continuous on the interval [a, b].

2. Review of Calculus Notation. C(X) all functions continuous on the set X. C[a, b] all functions continuous on the interval [a, b]. CHAPTER Mathematical Preliminaries and Error Analysis. Review of Calculus Notation. C(X) all functions continuous on the set X. C[a, b] all functions continuous on the interval [a, b]. C n(x) all functions

More information

Pretest (Optional) Use as an additional pacing tool to guide instruction. August 21

Pretest (Optional) Use as an additional pacing tool to guide instruction. August 21 Trimester 1 Pretest (Otional) Use as an additional acing tool to guide instruction. August 21 Beyond the Basic Facts In Trimester 1, Grade 8 focus on multilication. Daily Unit 1: Rational vs. Irrational

More information

Feedback-error control

Feedback-error control Chater 4 Feedback-error control 4.1 Introduction This chater exlains the feedback-error (FBE) control scheme originally described by Kawato [, 87, 8]. FBE is a widely used neural network based controller

More information

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation

14:332:231 DIGITAL LOGIC DESIGN. 2 s-complement Representation 4:332:23 DIGITAL LOGIC DESIGN Ivan Marsic, Rutgers University Electrical & Computer Engineering Fall 203 Lecture #3: Addition, Subtraction, Multiplication, and Division 2 s-complement Representation RECALL

More information

MATH 2710: NOTES FOR ANALYSIS

MATH 2710: NOTES FOR ANALYSIS MATH 270: NOTES FOR ANALYSIS The main ideas we will learn from analysis center around the idea of a limit. Limits occurs in several settings. We will start with finite limits of sequences, then cover infinite

More information

Chapter 7 Rational and Irrational Numbers

Chapter 7 Rational and Irrational Numbers Chater 7 Rational and Irrational Numbers In this chater we first review the real line model for numbers, as discussed in Chater 2 of seventh grade, by recalling how the integers and then the rational numbers

More information

For q 0; 1; : : : ; `? 1, we have m 0; 1; : : : ; q? 1. The set fh j(x) : j 0; 1; ; : : : ; `? 1g forms a basis for the tness functions dened on the i

For q 0; 1; : : : ; `? 1, we have m 0; 1; : : : ; q? 1. The set fh j(x) : j 0; 1; ; : : : ; `? 1g forms a basis for the tness functions dened on the i Comuting with Haar Functions Sami Khuri Deartment of Mathematics and Comuter Science San Jose State University One Washington Square San Jose, CA 9519-0103, USA khuri@juiter.sjsu.edu Fax: (40)94-500 Keywords:

More information

Sets of Real Numbers

Sets of Real Numbers Chater 4 Sets of Real Numbers 4. The Integers Z and their Proerties In our revious discussions about sets and functions the set of integers Z served as a key examle. Its ubiquitousness comes from the fact

More information

MODELING THE RELIABILITY OF C4ISR SYSTEMS HARDWARE/SOFTWARE COMPONENTS USING AN IMPROVED MARKOV MODEL

MODELING THE RELIABILITY OF C4ISR SYSTEMS HARDWARE/SOFTWARE COMPONENTS USING AN IMPROVED MARKOV MODEL Technical Sciences and Alied Mathematics MODELING THE RELIABILITY OF CISR SYSTEMS HARDWARE/SOFTWARE COMPONENTS USING AN IMPROVED MARKOV MODEL Cezar VASILESCU Regional Deartment of Defense Resources Management

More information

Approximating min-max k-clustering

Approximating min-max k-clustering Aroximating min-max k-clustering Asaf Levin July 24, 2007 Abstract We consider the roblems of set artitioning into k clusters with minimum total cost and minimum of the maximum cost of a cluster. The cost

More information

HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH

HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH 1. Section 2.1, Problems 5, 8, 28, and 48 Problem. 2.1.5 Write a single congruence that is equivalent to the air of congruences x 1 mod 4 and x 2

More information

Cryptography. Lecture 8. Arpita Patra

Cryptography. Lecture 8. Arpita Patra Crytograhy Lecture 8 Arita Patra Quick Recall and Today s Roadma >> Hash Functions- stands in between ublic and rivate key world >> Key Agreement >> Assumtions in Finite Cyclic grous - DL, CDH, DDH Grous

More information

Topic: Lower Bounds on Randomized Algorithms Date: September 22, 2004 Scribe: Srinath Sridhar

Topic: Lower Bounds on Randomized Algorithms Date: September 22, 2004 Scribe: Srinath Sridhar 15-859(M): Randomized Algorithms Lecturer: Anuam Guta Toic: Lower Bounds on Randomized Algorithms Date: Setember 22, 2004 Scribe: Srinath Sridhar 4.1 Introduction In this lecture, we will first consider

More information

arxiv: v1 [physics.data-an] 26 Oct 2012

arxiv: v1 [physics.data-an] 26 Oct 2012 Constraints on Yield Parameters in Extended Maximum Likelihood Fits Till Moritz Karbach a, Maximilian Schlu b a TU Dortmund, Germany, moritz.karbach@cern.ch b TU Dortmund, Germany, maximilian.schlu@cern.ch

More information

0.6 Factoring 73. As always, the reader is encouraged to multiply out (3

0.6 Factoring 73. As always, the reader is encouraged to multiply out (3 0.6 Factoring 7 5. The G.C.F. of the terms in 81 16t is just 1 so there is nothing of substance to factor out from both terms. With just a difference of two terms, we are limited to fitting this olynomial

More information

HENSEL S LEMMA KEITH CONRAD

HENSEL S LEMMA KEITH CONRAD HENSEL S LEMMA KEITH CONRAD 1. Introduction In the -adic integers, congruences are aroximations: for a and b in Z, a b mod n is the same as a b 1/ n. Turning information modulo one ower of into similar

More information

CMSC 425: Lecture 4 Geometry and Geometric Programming

CMSC 425: Lecture 4 Geometry and Geometric Programming CMSC 425: Lecture 4 Geometry and Geometric Programming Geometry for Game Programming and Grahics: For the next few lectures, we will discuss some of the basic elements of geometry. There are many areas

More information

Evaluating Circuit Reliability Under Probabilistic Gate-Level Fault Models

Evaluating Circuit Reliability Under Probabilistic Gate-Level Fault Models Evaluating Circuit Reliability Under Probabilistic Gate-Level Fault Models Ketan N. Patel, Igor L. Markov and John P. Hayes University of Michigan, Ann Arbor 48109-2122 {knatel,imarkov,jhayes}@eecs.umich.edu

More information

Modeling and Estimation of Full-Chip Leakage Current Considering Within-Die Correlation

Modeling and Estimation of Full-Chip Leakage Current Considering Within-Die Correlation 6.3 Modeling and Estimation of Full-Chi Leaage Current Considering Within-Die Correlation Khaled R. eloue, Navid Azizi, Farid N. Najm Deartment of ECE, University of Toronto,Toronto, Ontario, Canada {haled,nazizi,najm}@eecg.utoronto.ca

More information

On split sample and randomized confidence intervals for binomial proportions

On split sample and randomized confidence intervals for binomial proportions On slit samle and randomized confidence intervals for binomial roortions Måns Thulin Deartment of Mathematics, Usala University arxiv:1402.6536v1 [stat.me] 26 Feb 2014 Abstract Slit samle methods have

More information

Elementary Analysis in Q p

Elementary Analysis in Q p Elementary Analysis in Q Hannah Hutter, May Szedlák, Phili Wirth November 17, 2011 This reort follows very closely the book of Svetlana Katok 1. 1 Sequences and Series In this section we will see some

More information

GIVEN an input sequence x 0,..., x n 1 and the

GIVEN an input sequence x 0,..., x n 1 and the 1 Running Max/Min Filters using 1 + o(1) Comarisons er Samle Hao Yuan, Member, IEEE, and Mikhail J. Atallah, Fellow, IEEE Abstract A running max (or min) filter asks for the maximum or (minimum) elements

More information

GOOD MODELS FOR CUBIC SURFACES. 1. Introduction

GOOD MODELS FOR CUBIC SURFACES. 1. Introduction GOOD MODELS FOR CUBIC SURFACES ANDREAS-STEPHAN ELSENHANS Abstract. This article describes an algorithm for finding a model of a hyersurface with small coefficients. It is shown that the aroach works in

More information

Galois Fields, Linear Feedback Shift Registers and their Applications

Galois Fields, Linear Feedback Shift Registers and their Applications Galois Fields, Linear Feedback Shift Registers and their Alications With 85 illustrations as well as numerous tables, diagrams and examles by Ulrich Jetzek ISBN (Book): 978-3-446-45140-7 ISBN (E-Book):

More information

Linear diophantine equations for discrete tomography

Linear diophantine equations for discrete tomography Journal of X-Ray Science and Technology 10 001 59 66 59 IOS Press Linear diohantine euations for discrete tomograhy Yangbo Ye a,gewang b and Jiehua Zhu a a Deartment of Mathematics, The University of Iowa,

More information

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2, MATH 4400 roblems. Math 4400/6400 Homework # solutions 1. Let P be an odd integer not necessarily rime. Show that modulo, { P 1 0 if P 1, 7 mod, 1 if P 3, mod. Proof. Suose that P 1 mod. Then we can write

More information

Solved Problems. (a) (b) (c) Figure P4.1 Simple Classification Problems First we draw a line between each set of dark and light data points.

Solved Problems. (a) (b) (c) Figure P4.1 Simple Classification Problems First we draw a line between each set of dark and light data points. Solved Problems Solved Problems P Solve the three simle classification roblems shown in Figure P by drawing a decision boundary Find weight and bias values that result in single-neuron ercetrons with the

More information

State Estimation with ARMarkov Models

State Estimation with ARMarkov Models Deartment of Mechanical and Aerosace Engineering Technical Reort No. 3046, October 1998. Princeton University, Princeton, NJ. State Estimation with ARMarkov Models Ryoung K. Lim 1 Columbia University,

More information

Numerical Linear Algebra

Numerical Linear Algebra Numerical Linear Algebra Numerous alications in statistics, articularly in the fitting of linear models. Notation and conventions: Elements of a matrix A are denoted by a ij, where i indexes the rows and

More information

Pretest (Optional) Use as an additional pacing tool to guide instruction. August 21

Pretest (Optional) Use as an additional pacing tool to guide instruction. August 21 Trimester 1 Pretest (Otional) Use as an additional acing tool to guide instruction. August 21 Beyond the Basic Facts In Trimester 1, Grade 7 focus on multilication. Daily Unit 1: The Number System Part

More information

Combinational Logic Design Arithmetic Functions and Circuits

Combinational Logic Design Arithmetic Functions and Circuits Combinational Logic Design Arithmetic Functions and Circuits Overview Binary Addition Half Adder Full Adder Ripple Carry Adder Carry Look-ahead Adder Binary Subtraction Binary Subtractor Binary Adder-Subtractor

More information

Outline. EECS150 - Digital Design Lecture 26 Error Correction Codes, Linear Feedback Shift Registers (LFSRs) Simple Error Detection Coding

Outline. EECS150 - Digital Design Lecture 26 Error Correction Codes, Linear Feedback Shift Registers (LFSRs) Simple Error Detection Coding Outline EECS150 - Digital Design Lecture 26 Error Correction Codes, Linear Feedback Shift Registers (LFSRs) Error detection using arity Hamming code for error detection/correction Linear Feedback Shift

More information

Almost 4000 years ago, Babylonians had discovered the following approximation to. x 2 dy 2 =1, (5.0.2)

Almost 4000 years ago, Babylonians had discovered the following approximation to. x 2 dy 2 =1, (5.0.2) Chater 5 Pell s Equation One of the earliest issues graled with in number theory is the fact that geometric quantities are often not rational. For instance, if we take a right triangle with two side lengths

More information

Finding Shortest Hamiltonian Path is in P. Abstract

Finding Shortest Hamiltonian Path is in P. Abstract Finding Shortest Hamiltonian Path is in P Dhananay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune, India bstract The roblem of finding shortest Hamiltonian ath in a eighted comlete grah belongs

More information

Series Handout A. 1. Determine which of the following sums are geometric. If the sum is geometric, express the sum in closed form.

Series Handout A. 1. Determine which of the following sums are geometric. If the sum is geometric, express the sum in closed form. Series Handout A. Determine which of the following sums are geometric. If the sum is geometric, exress the sum in closed form. 70 a) k= ( k ) b) 50 k= ( k )2 c) 60 k= ( k )k d) 60 k= (.0)k/3 2. Find the

More information

Real Analysis 1 Fall Homework 3. a n.

Real Analysis 1 Fall Homework 3. a n. eal Analysis Fall 06 Homework 3. Let and consider the measure sace N, P, µ, where µ is counting measure. That is, if N, then µ equals the number of elements in if is finite; µ = otherwise. One usually

More information

Binary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding

Binary Multipliers. Reading: Study Chapter 3. The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding Binary Multipliers The key trick of multiplication is memorizing a digit-to-digit table Everything else was just adding 2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9 2 2 4 6 8 2 4 6 8 3 3 6 9 2 5 8 2 24 27 4 4 8 2 6

More information

Infinite Number of Twin Primes

Infinite Number of Twin Primes dvances in Pure Mathematics, 06, 6, 95-97 htt://wwwscirorg/journal/am ISSN Online: 60-08 ISSN Print: 60-068 Infinite Number of Twin Primes S N Baibeov, Durmagambetov LN Gumilyov Eurasian National University,

More information

Elliptic Curves and Cryptography

Elliptic Curves and Cryptography Ellitic Curves and Crytograhy Background in Ellitic Curves We'll now turn to the fascinating theory of ellitic curves. For simlicity, we'll restrict our discussion to ellitic curves over Z, where is a

More information

The Noise Power Ratio - Theory and ADC Testing

The Noise Power Ratio - Theory and ADC Testing The Noise Power Ratio - Theory and ADC Testing FH Irons, KJ Riley, and DM Hummels Abstract This aer develos theory behind the noise ower ratio (NPR) testing of ADCs. A mid-riser formulation is used for

More information

Math 104B: Number Theory II (Winter 2012)

Math 104B: Number Theory II (Winter 2012) Math 104B: Number Theory II (Winter 01) Alina Bucur Contents 1 Review 11 Prime numbers 1 Euclidean algorithm 13 Multilicative functions 14 Linear diohantine equations 3 15 Congruences 3 Primes as sums

More information

3 Properties of Dedekind domains

3 Properties of Dedekind domains 18.785 Number theory I Fall 2016 Lecture #3 09/15/2016 3 Proerties of Dedekind domains In the revious lecture we defined a Dedekind domain as a noetherian domain A that satisfies either of the following

More information

Convex Optimization methods for Computing Channel Capacity

Convex Optimization methods for Computing Channel Capacity Convex Otimization methods for Comuting Channel Caacity Abhishek Sinha Laboratory for Information and Decision Systems (LIDS), MIT sinhaa@mit.edu May 15, 2014 We consider a classical comutational roblem

More information

CSE 599d - Quantum Computing When Quantum Computers Fall Apart

CSE 599d - Quantum Computing When Quantum Computers Fall Apart CSE 599d - Quantum Comuting When Quantum Comuters Fall Aart Dave Bacon Deartment of Comuter Science & Engineering, University of Washington In this lecture we are going to begin discussing what haens to

More information

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z: NUMBER SYSTEMS Number theory is the study of the integers. We denote the set of integers by Z: Z = {..., 3, 2, 1, 0, 1, 2, 3,... }. The integers have two oerations defined on them, addition and multilication,

More information

The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001

The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001 The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001 The Hasse-Minkowski Theorem rovides a characterization of the rational quadratic forms. What follows is a roof of the Hasse-Minkowski

More information

Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013

Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013 18.782 Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013 In this lecture we lay the groundwork needed to rove the Hasse-Minkowski theorem for Q, which states that a quadratic form over

More information

By Evan Chen OTIS, Internal Use

By Evan Chen OTIS, Internal Use Solutions Notes for DNY-NTCONSTRUCT Evan Chen January 17, 018 1 Solution Notes to TSTST 015/5 Let ϕ(n) denote the number of ositive integers less than n that are relatively rime to n. Prove that there

More information

MAT 311 Solutions to Final Exam Practice

MAT 311 Solutions to Final Exam Practice MAT 311 Solutions to Final Exam Practice Remark. If you are comfortable with all of the following roblems, you will be very well reared for the midterm. Some of the roblems below are more difficult than

More information

ute measures of uncertainty called standard errors for these b j estimates and the resulting forecasts if certain conditions are satis- ed. Note the e

ute measures of uncertainty called standard errors for these b j estimates and the resulting forecasts if certain conditions are satis- ed. Note the e Regression with Time Series Errors David A. Dickey, North Carolina State University Abstract: The basic assumtions of regression are reviewed. Grahical and statistical methods for checking the assumtions

More information

Elements of Floating-point Arithmetic

Elements of Floating-point Arithmetic Elements of Floating-point Arithmetic Sanzheng Qiao Department of Computing and Software McMaster University July, 2012 Outline 1 Floating-point Numbers Representations IEEE Floating-point Standards Underflow

More information

Lecture 2: Number Representations (2)

Lecture 2: Number Representations (2) Lecture 2: Number Representations (2) ECE 645 Computer Arithmetic 1/29/08 ECE 645 Computer Arithmetic Lecture Roadmap Number systems (cont'd) Floating point number system representations Residue number

More information

Topic 7: Using identity types

Topic 7: Using identity types Toic 7: Using identity tyes June 10, 2014 Now we would like to learn how to use identity tyes and how to do some actual mathematics with them. By now we have essentially introduced all inference rules

More information

Cmpt 250 Unsigned Numbers January 11, 2008

Cmpt 250 Unsigned Numbers January 11, 2008 Cmt 25 Unsined Numbers Januar, 28 These notes serve two uroses in the contet of Cmt 25: as we develo the basic desin of an inteer ALU, we ll review the basics of number reresentation and combinational

More information

PHYS 301 HOMEWORK #9-- SOLUTIONS

PHYS 301 HOMEWORK #9-- SOLUTIONS PHYS 0 HOMEWORK #9-- SOLUTIONS. We are asked to use Dirichlet' s theorem to determine the value of f (x) as defined below at x = 0, ± /, ± f(x) = 0, - < x

More information

John Weatherwax. Analysis of Parallel Depth First Search Algorithms

John Weatherwax. Analysis of Parallel Depth First Search Algorithms Sulementary Discussions and Solutions to Selected Problems in: Introduction to Parallel Comuting by Viin Kumar, Ananth Grama, Anshul Guta, & George Karyis John Weatherwax Chater 8 Analysis of Parallel

More information

Chapter 1 Error Analysis

Chapter 1 Error Analysis Chapter 1 Error Analysis Several sources of errors are important for numerical data processing: Experimental uncertainty: Input data from an experiment have a limited precision. Instead of the vector of

More information

Desingularization Explains Order-Degree Curves for Ore Operators

Desingularization Explains Order-Degree Curves for Ore Operators Desingularization Exlains Order-Degree Curves for Ore Oerators Shaoshi Chen Det. of Mathematics / NCSU Raleigh, NC 27695, USA schen2@ncsu.edu Maximilian Jaroschek RISC / Joh. Keler University 4040 Linz,

More information

2 Asymptotic density and Dirichlet density

2 Asymptotic density and Dirichlet density 8.785: Analytic Number Theory, MIT, sring 2007 (K.S. Kedlaya) Primes in arithmetic rogressions In this unit, we first rove Dirichlet s theorem on rimes in arithmetic rogressions. We then rove the rime

More information

PRIME NUMBERS YANKI LEKILI

PRIME NUMBERS YANKI LEKILI PRIME NUMBERS YANKI LEKILI We denote by N the set of natural numbers:,2,..., These are constructed using Peano axioms. We will not get into the hilosohical questions related to this and simly assume the

More information

Elementary theory of L p spaces

Elementary theory of L p spaces CHAPTER 3 Elementary theory of L saces 3.1 Convexity. Jensen, Hölder, Minkowski inequality. We begin with two definitions. A set A R d is said to be convex if, for any x 0, x 1 2 A x = x 0 + (x 1 x 0 )

More information

2 Asymptotic density and Dirichlet density

2 Asymptotic density and Dirichlet density 8.785: Analytic Number Theory, MIT, sring 2007 (K.S. Kedlaya) Primes in arithmetic rogressions In this unit, we first rove Dirichlet s theorem on rimes in arithmetic rogressions. We then rove the rime

More information

Representing Integers as the Sum of Two Squares in the Ring Z n

Representing Integers as the Sum of Two Squares in the Ring Z n 1 2 3 47 6 23 11 Journal of Integer Sequences, Vol. 17 (2014), Article 14.7.4 Reresenting Integers as the Sum of Two Squares in the Ring Z n Joshua Harrington, Lenny Jones, and Alicia Lamarche Deartment

More information

Section 0.10: Complex Numbers from Precalculus Prerequisites a.k.a. Chapter 0 by Carl Stitz, PhD, and Jeff Zeager, PhD, is available under a Creative

Section 0.10: Complex Numbers from Precalculus Prerequisites a.k.a. Chapter 0 by Carl Stitz, PhD, and Jeff Zeager, PhD, is available under a Creative Section 0.0: Comlex Numbers from Precalculus Prerequisites a.k.a. Chater 0 by Carl Stitz, PhD, and Jeff Zeager, PhD, is available under a Creative Commons Attribution-NonCommercial-ShareAlike.0 license.

More information

LIMITATIONS OF RECEPTRON. XOR Problem The failure of the perceptron to successfully simple problem such as XOR (Minsky and Papert).

LIMITATIONS OF RECEPTRON. XOR Problem The failure of the perceptron to successfully simple problem such as XOR (Minsky and Papert). LIMITATIONS OF RECEPTRON XOR Problem The failure of the ercetron to successfully simle roblem such as XOR (Minsky and Paert). x y z x y z 0 0 0 0 0 0 Fig. 4. The exclusive-or logic symbol and function

More information

Algorithms for Air Traffic Flow Management under Stochastic Environments

Algorithms for Air Traffic Flow Management under Stochastic Environments Algorithms for Air Traffic Flow Management under Stochastic Environments Arnab Nilim and Laurent El Ghaoui Abstract A major ortion of the delay in the Air Traffic Management Systems (ATMS) in US arises

More information

EE 508 Lecture 13. Statistical Characterization of Filter Characteristics

EE 508 Lecture 13. Statistical Characterization of Filter Characteristics EE 508 Lecture 3 Statistical Characterization of Filter Characteristics Comonents used to build filters are not recisely redictable L C Temerature Variations Manufacturing Variations Aging Model variations

More information

STA 250: Statistics. Notes 7. Bayesian Approach to Statistics. Book chapters: 7.2

STA 250: Statistics. Notes 7. Bayesian Approach to Statistics. Book chapters: 7.2 STA 25: Statistics Notes 7. Bayesian Aroach to Statistics Book chaters: 7.2 1 From calibrating a rocedure to quantifying uncertainty We saw that the central idea of classical testing is to rovide a rigorous

More information

Analysis of execution time for parallel algorithm to dertmine if it is worth the effort to code and debug in parallel

Analysis of execution time for parallel algorithm to dertmine if it is worth the effort to code and debug in parallel Performance Analysis Introduction Analysis of execution time for arallel algorithm to dertmine if it is worth the effort to code and debug in arallel Understanding barriers to high erformance and redict

More information

FE FORMULATIONS FOR PLASTICITY

FE FORMULATIONS FOR PLASTICITY G These slides are designed based on the book: Finite Elements in Plasticity Theory and Practice, D.R.J. Owen and E. Hinton, 1970, Pineridge Press Ltd., Swansea, UK. 1 Course Content: A INTRODUCTION AND

More information

A Recursive Block Incomplete Factorization. Preconditioner for Adaptive Filtering Problem

A Recursive Block Incomplete Factorization. Preconditioner for Adaptive Filtering Problem Alied Mathematical Sciences, Vol. 7, 03, no. 63, 3-3 HIKARI Ltd, www.m-hiari.com A Recursive Bloc Incomlete Factorization Preconditioner for Adative Filtering Problem Shazia Javed School of Mathematical

More information

Divider Implementation

Divider Implementation c n = cn-= LCTRICAL AD COTR GIRIG DPARTT, OAKLAD UIVRSITY RCRLA@OU ALGORITH Divider Implementation The division of two unsigned integer numbers A (where A is the dividend and the divisor), results in a

More information

Solution sheet ξi ξ < ξ i+1 0 otherwise ξ ξ i N i,p 1 (ξ) + where 0 0

Solution sheet ξi ξ < ξ i+1 0 otherwise ξ ξ i N i,p 1 (ξ) + where 0 0 Advanced Finite Elements MA5337 - WS7/8 Solution sheet This exercise sheets deals with B-slines and NURBS, which are the basis of isogeometric analysis as they will later relace the olynomial ansatz-functions

More information

ANALYTIC NUMBER THEORY AND DIRICHLET S THEOREM

ANALYTIC NUMBER THEORY AND DIRICHLET S THEOREM ANALYTIC NUMBER THEORY AND DIRICHLET S THEOREM JOHN BINDER Abstract. In this aer, we rove Dirichlet s theorem that, given any air h, k with h, k) =, there are infinitely many rime numbers congruent to

More information

DSP IC, Solutions. The pseudo-power entering into the adaptor is: 2 b 2 2 ) (a 2. Simple, but long and tedious simplification, yields p = 0.

DSP IC, Solutions. The pseudo-power entering into the adaptor is: 2 b 2 2 ) (a 2. Simple, but long and tedious simplification, yields p = 0. 5 FINITE WORD LENGTH EFFECTS 5.4 For a two-ort adator we have: b a + α(a a ) b a + α(a a ) α R R R + R The seudo-ower entering into the adator is: R (a b ) + R (a b ) Simle, but long and tedious simlification,

More information

Why Proofs? Proof Techniques. Theorems. Other True Things. Proper Proof Technique. How To Construct A Proof. By Chuck Cusack

Why Proofs? Proof Techniques. Theorems. Other True Things. Proper Proof Technique. How To Construct A Proof. By Chuck Cusack Proof Techniques By Chuck Cusack Why Proofs? Writing roofs is not most student s favorite activity. To make matters worse, most students do not understand why it is imortant to rove things. Here are just

More information

Laboratoire de l Informatique du Parallélisme

Laboratoire de l Informatique du Parallélisme Laboratoire de l Informatique du Parallélisme Ecole Normale Suérieure de Lyon Unité de recherche associée au CNRS n 1398 Asynchronous Sub-Logarithmic Adders J.M. Muller, A. Tisserand and J.M. Vincent May

More information

16.2. Infinite Series. Introduction. Prerequisites. Learning Outcomes

16.2. Infinite Series. Introduction. Prerequisites. Learning Outcomes Infinite Series 6. Introduction We extend the concet of a finite series, met in section, to the situation in which the number of terms increase without bound. We define what is meant by an infinite series

More information

Statics and dynamics: some elementary concepts

Statics and dynamics: some elementary concepts 1 Statics and dynamics: some elementary concets Dynamics is the study of the movement through time of variables such as heartbeat, temerature, secies oulation, voltage, roduction, emloyment, rices and

More information

19th Bay Area Mathematical Olympiad. Problems and Solutions. February 28, 2017

19th Bay Area Mathematical Olympiad. Problems and Solutions. February 28, 2017 th Bay Area Mathematical Olymiad February, 07 Problems and Solutions BAMO- and BAMO- are each 5-question essay-roof exams, for middle- and high-school students, resectively. The roblems in each exam are

More information

Paper C Exact Volume Balance Versus Exact Mass Balance in Compositional Reservoir Simulation

Paper C Exact Volume Balance Versus Exact Mass Balance in Compositional Reservoir Simulation Paer C Exact Volume Balance Versus Exact Mass Balance in Comositional Reservoir Simulation Submitted to Comutational Geosciences, December 2005. Exact Volume Balance Versus Exact Mass Balance in Comositional

More information

Metrics Performance Evaluation: Application to Face Recognition

Metrics Performance Evaluation: Application to Face Recognition Metrics Performance Evaluation: Alication to Face Recognition Naser Zaeri, Abeer AlSadeq, and Abdallah Cherri Electrical Engineering Det., Kuwait University, P.O. Box 5969, Safat 6, Kuwait {zaery, abeer,

More information

Named Entity Recognition using Maximum Entropy Model SEEM5680

Named Entity Recognition using Maximum Entropy Model SEEM5680 Named Entity Recognition using Maximum Entroy Model SEEM5680 Named Entity Recognition System Named Entity Recognition (NER): Identifying certain hrases/word sequences in a free text. Generally it involves

More information

ALTERNATIVE SOLUTION TO THE QUARTIC EQUATION by Farid A. Chouery 1, P.E. 2006, All rights reserved

ALTERNATIVE SOLUTION TO THE QUARTIC EQUATION by Farid A. Chouery 1, P.E. 2006, All rights reserved ALTERNATIVE SOLUTION TO THE QUARTIC EQUATION b Farid A. Chouer, P.E. 006, All rights reserved Abstract A new method to obtain a closed form solution of the fourth order olnomial equation is roosed in this

More information

Graduate Institute of Electronics Engineering, NTU Basic Division Scheme

Graduate Institute of Electronics Engineering, NTU Basic Division Scheme Basic Division Scheme 台灣大學電子所吳安宇博士 2002 ACCESS IC LAB Outline Shift/subtract division algorithm. Programmed division. Restoring hardware dividers. Nonstoring and signed division. Radix-2 SRT divisioin.

More information

On the irreducibility of a polynomial associated with the Strong Factorial Conjecture

On the irreducibility of a polynomial associated with the Strong Factorial Conjecture On the irreducibility of a olynomial associated with the Strong Factorial Conecture Michael Filaseta Mathematics Deartment University of South Carolina Columbia, SC 29208 USA E-mail: filaseta@math.sc.edu

More information

Recent Developments in Multilayer Perceptron Neural Networks

Recent Developments in Multilayer Perceptron Neural Networks Recent Develoments in Multilayer Percetron eural etworks Walter H. Delashmit Lockheed Martin Missiles and Fire Control Dallas, Texas 75265 walter.delashmit@lmco.com walter.delashmit@verizon.net Michael

More information

Tests for Two Proportions in a Stratified Design (Cochran/Mantel-Haenszel Test)

Tests for Two Proportions in a Stratified Design (Cochran/Mantel-Haenszel Test) Chater 225 Tests for Two Proortions in a Stratified Design (Cochran/Mantel-Haenszel Test) Introduction In a stratified design, the subects are selected from two or more strata which are formed from imortant

More information

Meshless Methods for Scientific Computing Final Project

Meshless Methods for Scientific Computing Final Project Meshless Methods for Scientific Comuting Final Project D0051008 洪啟耀 Introduction Floating island becomes an imortant study in recent years, because the lands we can use are limit, so eole start thinking

More information