# What is the name of this kind of logic diagram?

I want to read this kind of diagram, but I haven't found the name of this, or somewhere I can find a legend of symbols used, or a tutorial to learn reading this...

I've googled this for over an hour, with similar images. Nothing :/

• $\boxplus$ is modulo addition, $\oplus$ is the x-or, and $\lll$ is left rotate... If your read the papers, they mention those... Commented Jun 13, 2022 at 20:51
• Depending on whether you look at a mathematical representation or pure computer code, $\land$ is either AND or XOR (C/C++/Java etc.). Commented Jun 14, 2022 at 0:36
• @PaulUszak $\land$ and ^ are different. The former exclusively means AND. If you're using ASCII, then you'd want to use & for AND, | for OR, and ^ for XOR. If using logical symbols, you can use $\land$, $\lor$, and $\oplus$. Commented Jun 14, 2022 at 0:39
• @forest Well done. Commented Jun 14, 2022 at 0:40

These are fairly standard. $$\boxplus$$ is modular addition, $$\oplus$$ is XOR, $$\lll$$ is left rotate, and $$\ll$$ is left shift. Others you may see include $$\land$$ (logical AND) and $$\lor$$ (logical OR), as well as $$\otimes$$ (meanings differ).

For example, the second image you posted is the half round function of RC5. It is read as:

\begin{align} A &= ((A \oplus B) \lll B) + S_{2i} \\ B &= ((B \oplus A) \lll A) + S_{2i+1} \end{align}

Note that $$S_{2i}$$ and $$S_{2i+1}$$ are not labeled (they just come in at the left in your diagram and are indices into state array $$S$$), and the top left and right inputs and bottom left and right outputs are $$A$$ and $$B$$.

I ran the reference implementation for RC5-32/12/16 with a null key. In the first round:

\begin{align} A &= ((\texttt{0x9BBBD8C8} \oplus \texttt{0x1A37F7FB} \lll \texttt{0x1A37F7FB}) + \texttt{0x46F8E8C5}\\ B &= ((\texttt{0x1A37F7FB} \oplus \texttt{0x9BBBD8C8} \lll \texttt{0xE3054A3E}) + \texttt{0x460C6085} \end{align}

This results in $$\texttt{0xE3054A3E}$$ for $$A$$ and $$\texttt{0xC4590FF6}$$ for $$B$$.