forked from wangyif2/RE-for-beginners
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shift_left.tex
executable file
·43 lines (35 loc) · 1.81 KB
/
shift_left.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
\begin{center}
\begin{tikzpicture}[scale=0.7, every node/.style={scale=0.7}]
\edef\bitsize{1cm}
\tikzstyle{byte}=[draw,minimum size=\bitsize]
\tikzstyle{every path}=[thick]
\node [draw,rectangle,minimum size=\bitsize] (a1) {7};
\node [draw,rectangle,minimum size=\bitsize] (a2) [right of=a1] {6};
\node [draw,rectangle,minimum size=\bitsize] (a3) [right of=a2] {5};
\node [draw,rectangle,minimum size=\bitsize] (a4) [right of=a3] {4};
\node [draw,rectangle,minimum size=\bitsize] (a5) [right of=a4] {3};
\node [draw,rectangle,minimum size=\bitsize] (a6) [right of=a5] {2};
\node [draw,rectangle,minimum size=\bitsize] (a7) [right of=a6] {1};
\node [draw,rectangle,minimum size=\bitsize] (a8) [right of=a7] {0};
\node (empty) [below of=a1] {};
\node [draw,rectangle,minimum size=\bitsize] (b1) [below of=empty] {7};
\node [draw,rectangle,minimum size=\bitsize] (b2) [right of=b1] {6};
\node [draw,rectangle,minimum size=\bitsize] (b3) [right of=b2] {5};
\node [draw,rectangle,minimum size=\bitsize] (b4) [right of=b3] {4};
\node [draw,rectangle,minimum size=\bitsize] (b5) [right of=b4] {3};
\node [draw,rectangle,minimum size=\bitsize] (b6) [right of=b5] {2};
\node [draw,rectangle,minimum size=\bitsize] (b7) [right of=b6] {1};
\node [draw,rectangle,minimum size=\bitsize] (b8) [right of=b7] {0};
\node [shape=rectangle,draw,minimum size=\bitsize] (d) [left=of b1] {CF};
\node [shape=rectangle,draw,minimum size=\bitsize] (c) [right=of b8] {0};
\draw [->] (c.west) -- (b8.east);
\draw [->] (a2.south) -- (b1.north);
\draw [->] (a3.south) -- (b2.north);
\draw [->] (a4.south) -- (b3.north);
\draw [->] (a5.south) -- (b4.north);
\draw [->] (a6.south) -- (b5.north);
\draw [->] (a7.south) -- (b6.north);
\draw [->] (a8.south) -- (b7.north);
\draw [->] (a1.south) -- (d.north);
\end{tikzpicture}
\end{center}