# Typing a circled plus sign or a boxed plus sign like a summation

How do I type a modular addition symbol or an XOR symbol the same way as a summation symbol in MathJax? It's for indicating use of the operation over a sequence of numbers.

$\bigoplus\limits_{i=0}^n x_i$

$\bigoplus\limits_{i=0}^n x_i$


$\operatorname{\boxplus}\limits_{i=0}^n x_i$

$\operatorname{\boxplus}\limits_{i=0}^n x_i$

• Nice! I did not knew \limits. I use $$\bigoplus_{i=0}^n x_i$$ for$$\bigoplus_{i=0}^n x_i$$or, when inline, $\displaystyle\bigoplus_{i=0}^n x_i$ for $\displaystyle\bigoplus_{i=0}^n x_i$ rather than $\bigoplus_{i=0}^n x_i$ for $\bigoplus_{i=0}^n x_i$.I find no way to force displaystyle for \operatorname{\boxplus}: for some reason, even $$\displaystyle\operatorname{\boxplus}\limits_{i=0}^n x_i$$ gives$$\displaystyle\operatorname{\boxplus}\limits_{i=0}^n x_i$$But I'm getting verbose these days, even in comments! – fgrieu Sep 13 '17 at 8:33

Use \operatorname*{...} if you want to be able to use limits with it (and have it change with display versus text styles automatically.

You might also want to enlarge the size of the symbol using something like \huge\boxplus. Then you may also want to center the symbol on the math axis (like other big operators), via \vcenter{...}. So something like

$$\operatorname*{\vcenter{\huge\boxplus}}_{i=0}^n x_i$$


produces $$\operatorname*{\vcenter{\huge\boxplus}}_{i=0}^n x_i$$ and that may be what you are looking for.

If you are going to use it a lot, you could use

$\DeclareMathOperator*{\bigboxplus}{\vcenter{\Large\boxplus}}$


so that then \bigboxplus can be used as you would \bigoplus. The difference would be that the size will not change between display and text styles as standard big operators do. If you want that, this is one way (where I've picked the sizes to match as closely as I can the corresponding sizes of \bigoplus).

$\DeclareMathOperator*{\bigboxplus}{\vcenter{\mathchoice{\huge\boxplus}{\Large\boxplus}{\Large\boxplus}{\Large\boxplus}}}$


to get

$$\DeclareMathOperator*{\bigboxplus}{\vcenter{\mathchoice{\huge\boxplus}{\Large\boxplus}{\Large\boxplus}{\Large\boxplus}}} \bigboxplus_{i=0}^n x_i \quad \textstyle \bigboxplus_{i=0}^n x_i \quad \scriptstyle \bigboxplus_{i=0}^n x_i \quad \scriptscriptstyle \bigboxplus_{i=0}^n x_i$$

$$\bigoplus_{i=0}^n x_i \quad \textstyle \bigoplus_{i=0}^n x_i \quad \scriptstyle \bigoplus_{i=0}^n x_i \quad \scriptscriptstyle \bigoplus_{i=0}^n x_i$$

• Anyway to get the operator aligned to the left instead of the center? Removing \vcenter makes the bounds appear to the right of the operator. – Melab Sep 25 '17 at 16:06
• I don't understand what you are asking for. The \vcenter is for vertical centering, as in $$\operatorname*{\vcenter{\huge\boxplus}}_{i=0}^n x_i\qquad\hbox{versus}\qquad \operatorname*{\huge\boxplus}_{i=0}^n x_i$$ but you seem to be talking about horizontal centering. The \vcenter does not affect the placement of the limits; that has to do with whether the operator is used in display or text (in-line) math. – Davide Cervone Sep 25 '17 at 19:30
• That is correct, and is how it is shown in the last examples in the post itself. In in-line math (single dollars), limits are shown to the right of the base: e.g., $\sum_{n=0}^\infty$. Limits only appear above and below in display mode (double dollars, or when \displaystyle is used: e.g., $\displaystyle\sum_{n=0}^\infty$. The \DeclareMathOperator* macro makes operators that work in the same way. – Davide Cervone Feb 8 '18 at 10:06