1

After reading many align threads, I couldn't find the solution for my problem. I think it could be a quick fix, but I can't seem to get it to work.

I want all the 'equal' signs as well as the arrow to be aligned. This works if it is the only tabstop (first of the two blocks). In the second block, I want to split the large binary number up into two lines and want to align the second line with the first line, starting with the number. I tried to illustrate my wanted alignment with the two colored lines in the screenshot.

If I add a second column with a second '&' in the last two lines, then I have huge space between the two wanted colums, probably because the end of the first three lines get treated as the first column and define the spacing.

I basically want no extra spacing between the last 'equal' sign and the start of the binary number, but the binary number align over two lines.

Here's the part of my document and a screenshot of the compiled version:

\clearpage
\subsubsection*{Einfache Genauigkeit (32Bit)}

\begin{flalign*}
Exponent &= \textrm{Bias} + 5 = 127 + 5 = 136_{10} = 10001000_{2} \\
Mantisse &= 36 / 2^5 - 1 = 0,125_{10} = 0.001_{2} \\
Vorzeichen &= 1_{2} \\
\\
&\Rightarrow -36_{10} = 1\ 10001000\ 00100000\ 00000000\ 0000000_{2}
\end{flalign*}

\subsubsection*{Doppelte Genauigkeit (64Bit)}

\begin{flalign*}
Exponent &= \textrm{Bias} + 5 = 1023 + 5 = 1028_{10} = 100 0000 0101_{2} \\
Mantisse &= 36 / 2^5 - 1 = 0,125_{10} = 0.001_{2} \\
Vorzeichen &= 1_{2} \\
\\
\Rightarrow -36_{10} = & 1\ 10000000101\ 00100000\ 00000000\ \\
& 00000000\ 00000000\ 00000000\ 00000000\ 0000_{2}
\end{flalign*}

compiled pdf

1

1 Answer 1

2

You can nest an aligned

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}


\begin{flalign*}
\mathrm{Exponent} &= \mathrm{Bias} + 5 = 127 + 5 = 136_{10} = 10001000_{2} \\
\mathrm{Mantisse} &= 36 / 2^5 - 1 = 0,125_{10} = 0.001_{2} \\
\mathrm{Vorzeichen} &= 1_{2} \\
\\
&\Rightarrow -36_{10} = 1\ 10001000\ 00100000\ 00000000\ 0000000_{2}
\end{flalign*}

\subsubsection*{Doppelte Genauigkeit (64Bit)}

\begin{flalign*}
\mathrm{Exponent} &= \mathrm{Bias} + 5 = 1023 + 5 = 1028_{10} = 100 0000 0101_{2} \\
\mathrm{Mantisse} &= 36 / 2^5 - 1 = 0,125_{10} = 0.001_{2} \\
\mathrm{Vorzeichen} &= 1_{2} \\
\\
&\Rightarrow -36_{10} =
\begin{aligned}[t]
& 10000000101\ 00100000\ 00000000\ \\
& 00000000\ 00000000\ 00000000\ 00000000\ 0000_{2}
\end{aligned}
\end{flalign*}
\end{document}
1
  • Thank you! This was indeed an easy way, I didn't think of that.
    – R. Moser
    Oct 27, 2022 at 17:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .