id stringlengths 14 20 | title stringlengths 4 181 | text stringlengths 1 43k | source stringclasses 1
value |
|---|---|---|---|
wiki_47_chunk_2 | Alternative algebra | The associator of an alternative algebra is therefore alternating. Conversely, any algebra whose associator is alternating is clearly alternative. By symmetry, any algebra which satisfies any two of:
left alternative identity:
right alternative identity:
flexible identity:
is alternative and therefore satisfies all ... | wikipedia |
wiki_47_chunk_3 | Alternative algebra | Examples
Every associative algebra is alternative.
The octonions form a non-associative alternative algebra, a normed division algebra of dimension 8 over the real numbers.
More generally, any octonion algebra is alternative. Non-examples
The sedenions and all higher Cayley–Dickson algebras lose alternativity. Prop... | wikipedia |
wiki_47_chunk_4 | Alternative algebra | Artin's theorem states that in an alternative algebra the subalgebra generated by any two elements is associative. Conversely, any algebra for which this is true is clearly alternative. It follows that expressions involving only two variables can be written unambiguously without parentheses in an alternative algebra. ... | wikipedia |
wiki_47_chunk_5 | Alternative algebra | A corollary of Artin's theorem is that alternative algebras are power-associative, that is, the subalgebra generated by a single element is associative. The converse need not hold: the sedenions are power-associative but not alternative. The Moufang identities hold in any alternative algebra. In a unital alternative a... | wikipedia |
wiki_47_chunk_6 | Alternative algebra | This is equivalent to saying the associator vanishes for all such and . If and are invertible then is also invertible with inverse . The set of all invertible elements is therefore closed under multiplication and forms a Moufang loop. This loop of units in an alternative ring or algebra is analogous to the group o... | wikipedia |
wiki_47_chunk_7 | Alternative algebra | Applications
The projective plane over any alternative division ring is a Moufang plane. The close relationship of alternative algebras and composition algebras was given by Guy Roos in 2008: He shows (page 162) the relation for an algebra A with unit element e and an involutive anti-automorphism such that a + a* and ... | wikipedia |
wiki_47_chunk_8 | Alternative algebra | Algebra over a field
Maltsev algebra
Zorn ring References External links Non-associative algebras | wikipedia |
wiki_48_chunk_0 | Arithmetic function | In number theory, an arithmetic, arithmetical, or number-theoretic function is for most authors any function f(n) whose domain is the positive integers and whose range is a subset of the complex numbers. Hardy & Wright include in their definition the requirement that an arithmetical function "expresses some arithmetica... | wikipedia |
wiki_48_chunk_1 | Arithmetic function | There is a larger class of number-theoretic functions that do not fit the above definition, for example, the prime-counting functions. This article provides links to functions of both classes. Arithmetic functions are often extremely irregular (see table), but some of them have series expansions in terms of Ramanujan's... | wikipedia |
wiki_48_chunk_2 | Arithmetic function | Multiplicative and additive functions
An arithmetic function a is
completely additive if a(mn) = a(m) + a(n) for all natural numbers m and n;
completely multiplicative if a(mn) = a(m)a(n) for all natural numbers m and n; Two whole numbers m and n are called coprime if their greatest common divisor is 1, that is, if t... | wikipedia |
wiki_48_chunk_3 | Arithmetic function | Then an arithmetic function a is
additive if a(mn) = a(m) + a(n) for all coprime natural numbers m and n;
multiplicative if a(mn) = a(m)a(n) for all coprime natural numbers m and n. Notation
and mean that the sum or product is over all prime numbers: Similarly, and mean that the sum or product is ov... | wikipedia |
wiki_48_chunk_4 | Arithmetic function | and mean that the sum or product is over all positive divisors of n, including 1 and n. For example, if n = 12, The notations can be combined: and mean that the sum or product is over all prime divisors of n. For example, if n = 18, and similarly and mean that the sum or product is over all pri... | wikipedia |
wiki_48_chunk_5 | Arithmetic function | Ω(n), ω(n), νp(n) – prime power decomposition
The fundamental theorem of arithmetic states that any positive integer n can be represented uniquely as a product of powers of primes: where p1 < p2 < ... < pk are primes and the aj are positive integers. (1 is given by the empty product.) | wikipedia |
wiki_48_chunk_6 | Arithmetic function | It is often convenient to write this as an infinite product over all the primes, where all but a finite number have a zero exponent. Define the p-adic valuation νp(n) to be the exponent of the highest power of the prime p that divides n. That is, if p is one of the pi then νp(n) = ai, otherwise it is zero. Then In ter... | wikipedia |
wiki_48_chunk_7 | Arithmetic function | To avoid repetition, whenever possible formulas for the functions listed in this article are given in terms of n and the corresponding pi, ai, ω, and Ω. Multiplicative functions σk(n), τ(n), d(n) – divisor sums
σk(n) is the sum of the kth powers of the positive divisors of n, including 1 and n, where k is a complex num... | wikipedia |
wiki_48_chunk_8 | Arithmetic function | Since a positive number to the zero power is one, σ0(n) is therefore the number of (positive) divisors of n; it is usually denoted by d(n) or τ(n) (for the German Teiler = divisors). Setting k = 0 in the second product gives φ(n) – Euler totient function
φ(n), the Euler totient function, is the number of positive integ... | wikipedia |
wiki_48_chunk_9 | Arithmetic function | Jk(n) – Jordan totient function
Jk(n), the Jordan totient function, is the number of k-tuples of positive integers all less than or equal to n that form a coprime (k + 1)-tuple together with n. It is a generalization of Euler's totient, . μ(n) – Möbius function
μ(n), the Möbius function, is important because of the Mö... | wikipedia |
wiki_48_chunk_10 | Arithmetic function | This implies that μ(1) = 1. (Because Ω(1) = ω(1) = 0.) τ(n) – Ramanujan tau function
τ(n), the Ramanujan tau function, is defined by its generating function identity: | wikipedia |
wiki_48_chunk_11 | Arithmetic function | Although it is hard to say exactly what "arithmetical property of n" it "expresses", (τ(n) is (2π)−12 times the nth Fourier coefficient in the q-expansion of the modular discriminant function) it is included among the arithmetical functions because it is multiplicative and it occurs in identities involving certain σk(... | wikipedia |
wiki_48_chunk_12 | Arithmetic function | cq(n) – Ramanujan's sum
cq(n), Ramanujan's sum, is the sum of the nth powers of the primitive qth roots of unity: Even though it is defined as a sum of complex numbers (irrational for most values of q), it is an integer. For a fixed value of n it is multiplicative in q: If q and r are coprime, then ψ(n) - Dedekind psi ... | wikipedia |
wiki_48_chunk_13 | Arithmetic function | λ(n) – Liouville function
λ(n), the Liouville function, is defined by χ(n) – characters
All Dirichlet characters χ(n) are completely multiplicative. Two characters have special notations: The principal character (mod n) is denoted by χ0(a) (or χ1(a)). It is defined as The quadratic character (mod n) is denoted by the... | wikipedia |
wiki_48_chunk_14 | Arithmetic function | In this formula is the Legendre symbol, defined for all integers a and all odd primes p by Following the normal convention for the empty product, Additive functions ω(n) – distinct prime divisors
ω(n), defined above as the number of distinct primes dividing n, is additive (see Prime omega function). Completely additiv... | wikipedia |
wiki_48_chunk_15 | Arithmetic function | νp(n) – p-adic valuation of an integer n
For a fixed prime p, νp(n), defined above as the exponent of the largest power of p dividing n, is completely additive. Neither multiplicative nor additive | wikipedia |
wiki_48_chunk_16 | Arithmetic function | (x), Π(x), θ(x), ψ(x) – prime-counting functions
These important functions (which are not arithmetic functions) are defined for non-negative real arguments, and are used in the various statements and proofs of the prime number theorem. They are summation functions (see the main section just below) of arithmetic functio... | wikipedia |
wiki_48_chunk_17 | Arithmetic function | A related function counts prime powers with weight 1 for primes, 1/2 for their squares, 1/3 for cubes, ... It is the summation function of the arithmetic function which takes the value 1/k on integers which are the k-th power of some prime number, and the value 0 on other integers. θ(x) and ψ(x), the Chebyshev function... | wikipedia |
wiki_48_chunk_18 | Arithmetic function | The Chebyshev function ψ(x) is the summation function of the von Mangoldt function just below. Λ(n) – von Mangoldt function
Λ(n), the von Mangoldt function, is 0 unless the argument n is a prime power , in which case it is the natural log of the prime p: p(n) – partition function
p(n), the partition function, is the nu... | wikipedia |
wiki_48_chunk_19 | Arithmetic function | λ(n) – Carmichael function
λ(n), the Carmichael function, is the smallest positive number such that for all a coprime to n. Equivalently, it is the least common multiple of the orders of the elements of the multiplicative group of integers modulo n. For powers of odd primes and for 2 and 4, λ(n) is equal to the Eule... | wikipedia |
wiki_48_chunk_20 | Arithmetic function | and for general n it is the least common multiple of λ of each of the prime power factors of n: h(n) – Class number
h(n), the class number function, is the order of the ideal class group of an algebraic extension of the rationals with discriminant n. The notation is ambiguous, as there are in general many extensions wi... | wikipedia |
wiki_48_chunk_21 | Arithmetic function | rk(n) – Sum of k squares
rk(n) is the number of ways n can be represented as the sum of k squares, where representations that differ only in the order of the summands or in the signs of the square roots are counted as different. D(n) – Arithmetic derivative
Using the Heaviside notation for the derivative, D(n) is a fun... | wikipedia |
wiki_48_chunk_22 | Arithmetic function | A can be regarded as a function of a real variable. Given a positive integer m, A is constant along open intervals m < x < m + 1, and has a jump discontinuity at each integer for which a(m) ≠ 0. Since such functions are often represented by series and integrals, to achieve pointwise convergence it is usual to define th... | wikipedia |
wiki_48_chunk_23 | Arithmetic function | Individual values of arithmetic functions may fluctuate wildly – as in most of the above examples. Summation functions "smooth out" these fluctuations. In some cases it may be possible to find asymptotic behaviour for the summation function for large x. A classical example of this phenomenon is given by the divisor sum... | wikipedia |
wiki_48_chunk_24 | Arithmetic function | An average order of an arithmetic function is some simpler or better-understood function which has the same summation function asymptotically, and hence takes the same values "on average". We say that g is an average order of f if as x tends to infinity. The example above shows that d(n) has the average order log(... | wikipedia |
wiki_48_chunk_25 | Arithmetic function | Fa(s) is called a generating function of a(n). The simplest such series, corresponding to the constant function a(n) = 1 for all n, is ς(s) the Riemann zeta function. The generating function of the Möbius function is the inverse of the zeta function: Consider two arithmetic functions a and b and their respective genera... | wikipedia |
wiki_48_chunk_26 | Arithmetic function | This function c is called the Dirichlet convolution of a and b, and is denoted by . A particularly important case is convolution with the constant function a(n) = 1 for all n, corresponding to multiplying the generating function by the zeta function: Multiplying by the inverse of the zeta function gives the Möbius inve... | wikipedia |
wiki_48_chunk_27 | Arithmetic function | Relations among the functions
There are a great many formulas connecting arithmetical functions with each other and with the functions of analysis, especially powers, roots, and the exponential and log functions. The page divisor sum identities contains many more generalized and related examples of identities involving... | wikipedia |
wiki_48_chunk_28 | Arithmetic function | where the Kronecker symbol has the values There is a formula for r3 in the section on class numbers below. where . where Define the function as That is, if n is odd, is the sum of the kth powers of the divisors of n, that is, and if n is even it is the sum of the kth powers of the even divisors of n minus the sum ... | wikipedia |
wiki_48_chunk_29 | Arithmetic function | Divisor sum convolutions
Here "convolution" does not mean "Dirichlet convolution" but instead refers to the formula for the coefficients of the product of two power series: The sequence is called the convolution or the Cauchy product of the sequences an and bn.
These formulas may be proved analytically (see Eisenstein... | wikipedia |
wiki_48_chunk_30 | Arithmetic function | Since σk(n) (for natural number k) and τ(n) are integers, the above formulas can be used to prove congruences for the functions. See Ramanujan tau function for some examples. Extend the domain of the partition function by setting This recurrence can be used to compute p(n). Class number related
Peter Gustav Lejeune Dir... | wikipedia |
wiki_48_chunk_31 | Arithmetic function | An integer D is called a fundamental discriminant if it is the discriminant of a quadratic number field. This is equivalent to D ≠ 1 and either a) D is squarefree and D ≡ 1 (mod 4) or b) D ≡ 0 (mod 4), D/4 is squarefree, and D/4 ≡ 2 or 3 (mod 4). Extend the Jacobi symbol to accept even numbers in the "denominator" by... | wikipedia |
wiki_48_chunk_32 | Arithmetic function | There is also a formula relating r3 and h. Again, let D be a fundamental discriminant, D < −4. Then Prime-count related
Let be the nth harmonic number. Then is true for every natural number n if and only if the Riemann hypothesis is true. The Riemann hypothesis is also equivalent to the statement that, for all ... | wikipedia |
wiki_48_chunk_33 | Arithmetic function | B. Sury N. Rao where a1, a2, ..., as are integers, gcd(a1, a2, ..., as, n) = 1. László Fejes Tóth where m1 and m2 are odd, m = lcm(m1, m2). In fact, if f is any arithmetical function where * stands for Dirichlet convolution. Miscellaneous
Let m and n be distinct, odd, and positive. Then the Jacobi symbol satisfies the ... | wikipedia |
wiki_48_chunk_34 | Arithmetic function | Let D(n) be the arithmetic derivative. Then the logarithmic derivative Let λ(n) be Liouville's function. Then and Let λ(n) be Carmichael's function. Then Further, See Multiplicative group of integers modulo n and Primitive root modulo n. Note that Compare this with where τ(n) is Ramanujan's function. First 100 values o... | wikipedia |
wiki_48_chunk_35 | Arithmetic function | External links
Matthew Holden, Michael Orrison, Michael Varble Yet another Generalization of Euler's Totient Function
Huard, Ou, Spearman, and Williams. Elementary Evaluation of Certain Convolution Sums Involving Divisor Functions
Dineva, Rosica, The Euler Totient, the Möbius, and the Divisor Functions
László T... | wikipedia |
wiki_49_chunk_0 | Baseball statistics | Baseball statistics play an important role in evaluating the progress of a player or team. Since the flow of a baseball game has natural breaks to it, and normally players act individually rather than performing in clusters, the sport lends itself to easy record-keeping and statistics. Statistics have been kept for pro... | wikipedia |
wiki_49_chunk_1 | Baseball statistics | Many statistics are also available from outside Major League Baseball, from leagues such as the National Association of Professional Base Ball Players and the Negro leagues, although the consistency of whether these records were kept, of the standards with respect to which they were calculated, and of their accuracy ha... | wikipedia |
wiki_49_chunk_2 | Baseball statistics | Traditionally, statistics such as batting average (the number of hits divided by the number of at bats) and earned run average (the average number of earned runs allowed by a pitcher per nine innings) have dominated attention in the statistical world of baseball. However, the recent advent of sabermetrics has created s... | wikipedia |
wiki_49_chunk_3 | Baseball statistics | Comprehensive, historical baseball statistics were difficult for the average fan to access until 1951, when researcher Hy Turkin published The Complete Encyclopedia of Baseball. In 1969, Macmillan Publishing printed its first Baseball Encyclopedia, using a computer to compile statistics for the first time. Known as "Bi... | wikipedia |
wiki_49_chunk_4 | Baseball statistics | Use
Throughout modern baseball, a few core statistics have been traditionally referenced – batting average, RBI, and home runs. To this day, a player who leads the league in all of these three statistics earns the "Triple Crown". For pitchers, wins, ERA, and strikeouts are the most often-cited statistics, and a pitcher... | wikipedia |
wiki_49_chunk_5 | Baseball statistics | Some sabermetric statistics have entered the mainstream baseball world that measure a batter's overall performance including on-base plus slugging, commonly referred to as OPS. OPS adds the hitter's on-base percentage (number of times reached base by any means divided by total plate appearances) to their slugging perce... | wikipedia |
wiki_49_chunk_6 | Baseball statistics | OPS is also useful when determining a pitcher's level of success. "Opponent on-base plus slugging" (OOPS) is becoming a popular tool to evaluate a pitcher's actual performance. When analyzing a pitcher's statistics, some useful categories include K/9IP (strikeouts per nine innings), K/BB (strikeouts per walk), HR/9 (h... | wikipedia |
wiki_49_chunk_7 | Baseball statistics | However, since 2001, more emphasis has been placed on defense-independent pitching statistics, including defense-independent ERA (dERA), in an attempt to evaluate a pitcher's performance regardless of the strength of the defensive players behind them. | wikipedia |
wiki_49_chunk_8 | Baseball statistics | All of the above statistics may be used in certain game situations. For example, a certain hitter's ability to hit left-handed pitchers might incline a manager to increase their opportunities to face left-handed pitchers. Other hitters may have a history of success against a given pitcher (or vice versa), and the manag... | wikipedia |
wiki_49_chunk_9 | Baseball statistics | Commonly used statistics
Most of these terms also apply to softball. Commonly used statistics with their abbreviations are explained here. The explanations below are for quick reference and do not fully or completely define the statistic; for the strict definition, see the linked article for each statistic. | wikipedia |
wiki_49_chunk_10 | Baseball statistics | Batting statistics
1B – Single: hits on which the batter reaches first base safely without the contribution of a fielding error
2B – Double: hits on which the batter reaches second base safely without the contribution of a fielding error
3B – Triple: hits on which the batter reaches third base safely without the con... | wikipedia |
wiki_49_chunk_11 | Baseball statistics | Baserunning statistics
SB – Stolen base: number of bases advanced by the runner while the ball is in the possession of the defense
CS – Caught stealing: times tagged out while attempting to steal a base
SBA or ATT – Stolen base attempts: total number of times the player has attempted to steal a base (SB+CS)
SB% – S... | wikipedia |
wiki_49_chunk_12 | Baseball statistics | Pitching statistics
BB – Base on balls (also called a "walk"): times pitching four balls, allowing the batter to take first base
BB/9 – Bases on balls per 9 innings pitched: base on balls multiplied by nine, divided by innings pitched
BF – Total batters faced: opponent team's total plate appearances
BK – Balk: numb... | wikipedia |
wiki_49_chunk_13 | Baseball statistics | Fielding statistics
A – Assists: number of outs recorded on a play where a fielder touched the ball, except if such touching is the putout
CI – Catcher's Interference (e.g., catcher makes contact with bat)
DP – Double plays: one for each double play during which the fielder recorded a putout or an assist.
E – Error... | wikipedia |
wiki_49_chunk_14 | Baseball statistics | Overall player value
VORP – Value over replacement player: a statistic that calculates a player's overall value in comparison to a "replacement-level" player. There are separate formulas for players and pitchers
Win shares: a complex metric that gauges a player's overall contribution to his team's wins
WAR – Wins a... | wikipedia |
wiki_49_chunk_15 | Baseball statistics | General statistics
G – Games played: number of games where the player played, in whole or in part
GS – Games started: number of games a player starts
GB – Games behind: number of games a team is behind the division leader
Pythagorean expectation: estimates a team's expected winning percentage based on runs scored a... | wikipedia |
wiki_49_chunk_16 | Baseball statistics | It is difficult to determine quantitatively what is considered to be a "good" value in a certain statistical category, and qualitative assessments may lead to arguments. Using full-season statistics available at the Official Site of Major League Baseball for the 2004 through 2015 seasons, the following tables show top ... | wikipedia |
wiki_49_chunk_17 | Baseball statistics | Baseball awards
Cy Young Award winners
Glossary of baseball
Hank Aaron Award winners (best offensive performer)
List of MLB awards
MLB Most Valuable Player Award winners
MLB Rookie of the Year Award winners
Official Baseball Rules (OBR)
List of pitches
Rawlings Gold Glove Award winners
Retrosheet
Sabermetrics
... | wikipedia |
wiki_49_chunk_18 | Baseball statistics | Bibliography
Albert, Jim, and Jay M. Bennett. Curve Ball: Baseball, Statistics, and the Role of Chance in the Game. New York: Copernicus Books, 2001. . A book on new statistics for baseball. MLB Record Book by: MLB.com
Alan Schwarz, The Numbers Game: Baseball's Lifelong Fascination with Statistics (New York: St. Marti... | wikipedia |
wiki_50_chunk_0 | Binary-coded decimal | In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for a sign or other indications (e.g. error or overflow). | wikipedia |
wiki_50_chunk_1 | Binary-coded decimal | In byte-oriented systems (i.e. most modern computers), the term unpacked BCD usually implies a full byte for each digit (often including a sign), whereas packed BCD typically encodes two digits within a single byte by taking advantage of the fact that four bits are enough to represent the range 0 to 9. The precise 4-bi... | wikipedia |
wiki_50_chunk_2 | Binary-coded decimal | The ten states representing a BCD digit are sometimes called tetrades (for the nibble typically needed to hold them is also known as a tetrade) while the unused, don't care-states are named , pseudo-decimals or pseudo-decimal digits. BCD's main virtue, in comparison to binary positional systems, is its more accurate re... | wikipedia |
wiki_50_chunk_3 | Binary-coded decimal | BCD was used in many early decimal computers, and is implemented in the instruction set of machines such as the IBM System/360 series and its descendants, Digital Equipment Corporation's VAX, the Burroughs B1700, and the Motorola 68000-series processors. BCD per se is not as widely used as in the past, and is unavailab... | wikipedia |
wiki_50_chunk_4 | Binary-coded decimal | Background
BCD takes advantage of the fact that any one decimal numeral can be represented by a four-bit pattern. The most obvious way of encoding digits is Natural BCD (NBCD), where each decimal digit is represented by its corresponding four-bit binary value, as shown in the following table. This is also called "8421"... | wikipedia |
wiki_50_chunk_5 | Binary-coded decimal | This scheme can also be referred to as Simple Binary-Coded Decimal (SBCD) or BCD 8421, and is the most common encoding. Others include the so-called "4221" and "7421" encoding – named after the weighting used for the bits – and "Excess-3". For example, the BCD digit 6, in 8421 notation, is in 4221 (two encodings are ... | wikipedia |
wiki_50_chunk_6 | Binary-coded decimal | The following table represents decimal digits from 0 to 9 in various BCD encoding systems. In the headers, the "8421" indicates the weight of each bit. In the fifth column ("BCD 84−2−1"), two of the weights are negative. Both ASCII and EBCDIC character codes for the digits, which are examples of zoned BCD, are also sho... | wikipedia |
wiki_50_chunk_7 | Binary-coded decimal | As most computers deal with data in 8-bit bytes, it is possible to use one of the following methods to encode a BCD number:
Unpacked: Each decimal digit is encoded into one byte, with four bits representing the number and the remaining bits having no significance.
Packed: Two decimal digits are encoded into a single ... | wikipedia |
wiki_50_chunk_8 | Binary-coded decimal | As an example, encoding the decimal number 91 using unpacked BCD results in the following binary pattern of two bytes:
Decimal: 9 1
Binary : 0000 1001 0000 0001 In packed BCD, the same number would fit into a single byte:
Decimal: 9 1
Binary: 1001 0001 Hence the numerical range for one unpacked... | wikipedia |
wiki_50_chunk_9 | Binary-coded decimal | To represent numbers larger than the range of a single byte any number of contiguous bytes may be used. For example, to represent the decimal number 12345 in packed BCD, using big-endian format, a program would encode as follows:
Decimal: 0 1 2 3 4 5
Binary : 0000 0001 0010 0011 0100 0101 | wikipedia |
wiki_50_chunk_10 | Binary-coded decimal | Here, the most significant nibble of the most significant byte has been encoded as zero, so the number is stored as 012345 (but formatting routines might replace or remove leading zeros). Packed BCD is more efficient in storage usage than unpacked BCD; encoding the same number (with the leading zero) in unpacked format... | wikipedia |
wiki_50_chunk_11 | Binary-coded decimal | In packed BCD (or simply packed decimal), each of the two nibbles of each byte represent a decimal digit. Packed BCD has been in use since at least the 1960s and is implemented in all IBM mainframe hardware since then. Most implementations are big endian, i.e. with the more significant digit in the upper half of each b... | wikipedia |
wiki_50_chunk_12 | Binary-coded decimal | Standard sign values are 1100 (hex C) for positive (+) and 1101 (D) for negative (−). This convention comes from the zone field for EBCDIC characters and the signed overpunch representation. Other allowed signs are 1010 (A) and 1110 (E) for positive and 1011 (B) for negative. IBM System/360 processors will use the 1010... | wikipedia |
wiki_50_chunk_13 | Binary-coded decimal | No matter how many bytes wide a word is, there is always an even number of nibbles because each byte has two of them. Therefore, a word of n bytes can contain up to (2n)−1 decimal digits, which is always an odd number of digits. A decimal number with d digits requires (d+1) bytes of storage space. | wikipedia |
wiki_50_chunk_14 | Binary-coded decimal | For example, a 4-byte (32-bit) word can hold seven decimal digits plus a sign and can represent values ranging from ±9,999,999. Thus the number −1,234,567 is 7 digits wide and is encoded as:
0001 0010 0011 0100 0101 0110 0111 1101
1 2 3 4 5 6 7 − Like character strings, the first byte of the pack... | wikipedia |
wiki_50_chunk_15 | Binary-coded decimal | In contrast, a 4-byte binary two's complement integer can represent values from −2,147,483,648 to +2,147,483,647. | wikipedia |
wiki_50_chunk_16 | Binary-coded decimal | While packed BCD does not make optimal use of storage (using about 20% more memory than binary notation to store the same numbers), conversion to ASCII, EBCDIC, or the various encodings of Unicode is made trivial, as no arithmetic operations are required. The extra storage requirements are usually offset by the need fo... | wikipedia |
wiki_50_chunk_17 | Binary-coded decimal | Packed BCD is supported in the COBOL programming language as the "COMPUTATIONAL-3" (an IBM extension adopted by many other compiler vendors) or "PACKED-DECIMAL" (part of the 1985 COBOL standard) data type. It is supported in PL/I as "FIXED DECIMAL". Beside the IBM System/360 and later compatible mainframes, packed BCD ... | wikipedia |
wiki_50_chunk_18 | Binary-coded decimal | Ten's complement representations for negative numbers offer an alternative approach to encoding the sign of packed (and other) BCD numbers. In this case, positive numbers always have a most significant digit between 0 and 4 (inclusive), while negative numbers are represented by the 10's complement of the corresponding ... | wikipedia |
wiki_50_chunk_19 | Binary-coded decimal | Fixed-point packed decimal
Fixed-point decimal numbers are supported by some programming languages (such as COBOL and PL/I). These languages allow the programmer to specify an implicit decimal point in front of one of the digits. For example, a packed decimal value encoded with the bytes 12 34 56 7C represents the fixe... | wikipedia |
wiki_50_chunk_20 | Binary-coded decimal | The decimal point is not actually stored in memory, as the packed BCD storage format does not provide for it. Its location is simply known to the compiler, and the generated code acts accordingly for the various arithmetic operations. | wikipedia |
wiki_50_chunk_21 | Binary-coded decimal | Higher-density encodings
If a decimal digit requires four bits, then three decimal digits require 12 bits. However, since 210 (1,024) is greater than 103 (1,000), if three decimal digits are encoded together, only 10 bits are needed. Two such encodings are Chen–Ho encoding and densely packed decimal (DPD). The latter h... | wikipedia |
wiki_50_chunk_22 | Binary-coded decimal | Zoned decimal
Some implementations, for example IBM mainframe systems, support zoned decimal numeric representations. Each decimal digit is stored in one byte, with the lower four bits encoding the digit in BCD form. The upper four bits, called the "zone" bits, are usually set to a fixed value so that the byte holds a ... | wikipedia |
wiki_50_chunk_23 | Binary-coded decimal | For signed zoned decimal values, the rightmost (least significant) zone nibble holds the sign digit, which is the same set of values that are used for signed packed decimal numbers (see above). Thus a zoned decimal value encoded as the hex bytes F1 F2 D3 represents the signed decimal value −123:
F1 F2 D3
1 2 −3 EBCD... | wikipedia |
wiki_50_chunk_24 | Binary-coded decimal | Fixed-point zoned decimal
Some languages (such as COBOL and PL/I) directly support fixed-point zoned decimal values, assigning an implicit decimal point at some location between the decimal digits of a number. For example, given a six-byte signed zoned decimal value with an implied decimal point to the right of the fou... | wikipedia |
wiki_50_chunk_25 | Binary-coded decimal | IBM used the terms Binary-Coded Decimal Interchange Code (BCDIC, sometimes just called BCD), for 6-bit alphanumeric codes that represented numbers, upper-case letters and special characters. Some variation of BCDIC alphamerics is used in most early IBM computers, including the IBM 1620 (introduced in 1959), IBM 1400 se... | wikipedia |
wiki_50_chunk_26 | Binary-coded decimal | The IBM 1400 series are character-addressable machines, each location being six bits labeled B, A, 8, 4, 2 and 1, plus an odd parity check bit (C) and a word mark bit (M). For encoding digits 1 through 9, B and A are zero and the digit value represented by standard 4-bit BCD in bits 8 through 1. For most other characte... | wikipedia |
wiki_50_chunk_27 | Binary-coded decimal | The memory of the IBM 1620 is organized into 6-bit addressable digits, the usual 8, 4, 2, 1 plus F, used as a flag bit and C, an odd parity check bit. BCD alphamerics are encoded using digit pairs, with the "zone" in the even-addressed digit and the "digit" in the odd-addressed digit, the "zone" being related to the 12... | wikipedia |
wiki_50_chunk_28 | Binary-coded decimal | In the Decimal Architecture IBM 7070, IBM 7072, and IBM 7074 alphamerics are encoded using digit pairs (using two-out-of-five code in the digits, not BCD) of the 10-digit word, with the "zone" in the left digit and the "digit" in the right digit. Input/Output translation hardware converted between the internal digit pa... | wikipedia |
wiki_50_chunk_29 | Binary-coded decimal | With the introduction of System/360, IBM expanded 6-bit BCD alphamerics to 8-bit EBCDIC, allowing the addition of many more characters (e.g., lowercase letters). A variable length Packed BCD numeric data type is also implemented, providing machine instructions that perform arithmetic directly on packed decimal data. On... | wikipedia |
wiki_50_chunk_30 | Binary-coded decimal | Today, BCD data is still heavily used in IBM processors and databases, such as IBM DB2, mainframes, and Power6. In these products, the BCD is usually zoned BCD (as in EBCDIC or ASCII), Packed BCD (two decimal digits per byte), or "pure" BCD encoding (one decimal digit stored as BCD in the low four bits of each byte). A... | wikipedia |
wiki_50_chunk_31 | Binary-coded decimal | Other computers
The Digital Equipment Corporation VAX-11 series includes instructions that can perform arithmetic directly on packed BCD data and convert between packed BCD data and other integer representations. The VAX's packed BCD format is compatible with that on IBM System/360 and IBM's later compatible processor... | wikipedia |
wiki_50_chunk_32 | Binary-coded decimal | The Intel x86 architecture supports a unique 18-digit (ten-byte) BCD format that can be loaded into and stored from the floating point registers, from where computations can be performed. The Motorola 68000 series had BCD instructions. | wikipedia |
wiki_50_chunk_33 | Binary-coded decimal | In more recent computers such capabilities are almost always implemented in software rather than the CPU's instruction set, but BCD numeric data are still extremely common in commercial and financial applications. There are tricks for implementing packed BCD and zoned decimal add–or–subtract operations using short but ... | wikipedia |
wiki_50_chunk_34 | Binary-coded decimal | t1 = a + 0x06666666;
t2 = t1 ^ b; // sum without carry propagation
t1 = t1 + b; // provisional sum
t2 = t1 ^ t2; // all the binary carry bits
t2 = ~t2 & 0x11111110; // just the BCD carry bits
t2 = (t2 >> 2) | (t2 >> 3); // correction
... | wikipedia |
wiki_50_chunk_35 | Binary-coded decimal | BCD is very common in electronic systems where a numeric value is to be displayed, especially in systems consisting solely of digital logic, and not containing a microprocessor. By employing BCD, the manipulation of numerical data for display can be greatly simplified by treating each digit as a separate single sub-cir... | wikipedia |
wiki_50_chunk_36 | Binary-coded decimal | The same argument applies when hardware of this type uses an embedded microcontroller or other small processor. Often, representing numbers internally in BCD format results in smaller code, since a conversion from or to binary representation can be expensive on such limited processors. For these applications, some smal... | wikipedia |
wiki_50_chunk_37 | Binary-coded decimal | Addition
It is possible to perform addition by first adding in binary, and then converting to BCD afterwards. Conversion of the simple sum of two digits can be done by adding 6 (that is, 16 − 10) when the five-bit result of adding a pair of digits has a value greater than 9. The reason for adding 6 is that there are 1... | wikipedia |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.