[Tex/LaTex] Remove the spaces between \times in mathmode

math-modespacing

My problem seems rather simple but I can't manage it. I want to describe bytes in this way

0000 xxxx
0010 1xxx

I tried by writing

0000 \times\times\times\times
0010 1\times\times\times

but this gave me too much spaces between the crosses (something like :

0000 x x x x
0010 1 x x x 

I removed some spaces by doing like here (Removing spaces between "words" in math mode)

0000 {\times}{\times}{\times}{\times}

but this is not enough… Do you have any idea on how to do so?

I add here a MWE, as asked by some.

\documentclass[a4paper,titlepage]{article}
\usepackage{mathtools}
\usepackage{amssymb, scalerel}

\begin{document}
I want the bytes $0000\;1{\times}{\times}{\times}$ to express an error in my algorithm.
\end{document}

Best Answer

The symbol \times has rather wide sidebearings. I propose two solutions:

  1. a reduced size symbol that occupies the same horizontal space as a digit;

  2. the \times symbol at its natural width, with reduced sidebearings

\documentclass[a4paper]{article}

\newcommand{\plh}{%
  {\ooalign{$\phantom{0}$\cr\hidewidth$\scriptstyle\times$\cr}}%
}
\newcommand{\PLH}{{\mkern-2mu\times\mkern-2mu}}

\begin{document}
I want the bytes $0000\;1\plh\plh\plh$ to express an error in my algorithm.

I want the bytes $0000\;1\PLH\PLH\PLH$ to express an error in my algorithm.
\end{document}

enter image description here