b. Concatenation is an associative operation, so that the concatenation of three or more strings, for example abc, abcd, etc., is well-defined. The concatenation of two or more numbers is...">

Concatenation (original) (raw)

Algebra Applied Mathematics Calculus and Analysis Discrete Mathematics Foundations of Mathematics Geometry History and Terminology Number Theory Probability and Statistics Recreational Mathematics Topology

Alphabetical Index New in MathWorld


The concatenation of two strings a and b is the string ab formed by joining a and b. Thus the concatenation of the strings "book" and "case" is the string "bookcase". The concatenation of two stringsa and b is often denoted ab, a∥b, or, in the Wolfram Language, a<>b. Concatenation is an associative operation, so that the concatenation of three or more strings, for example abc, abcd, etc., is well-defined.

The concatenation of two or more numbers is the number formed by concatenating their numerals. For example, the concatenation of 1, 234, and 5678 is 12345678. The value of the result depends on the numeric base, which is typically understood from context.

The formula for the concatenation of numbers p and q in base b is

 p∥q=pb^(l(q))+q,

where

 l(q)=|_log_bq_|+1

is the number length of q in base b and |_x_| is the floor function.