back to front page

integer constant multiplication formulas

With these algorithms, you can multiply an integer variable by an integer constant using only additions, subtractions and left bit shifts.

The "operations" column shows the number of operations required. The first number counts a shift by multiple bits as one operation, the second number does not.

The formulas are presented in a C-style language. x is initially the number to multiply, finally the product. t and u are temporary variables. Note that << (bit shift left) has lower precedence than + and -.

I found the formulas with these Python programs: one-liners, multi-liners.

multiplier operations formulas
2x 1/1 x = x << 1
3x 2/2 x = (x << 1) + x
4x 1/2 x = x << 2
5x 2/3 x = (x << 2) + x
6x 3/3 x = (x << 1) + x << 1
7x 2/4 x = (x << 3) - x
8x 1/3 x = x << 3
9x 2/4 x = (x << 3) + x
10x 3/4 x = (x << 2) + x << 1
11x 4/5 x = ((x << 2) + x << 1) + x
12x 3/4 x = (x << 1) + x << 2
13x 4/5 x = ((x << 1) + x << 2) + x
14x 3/5 x = (x << 3) - x << 1
15x 2/5 x = (x << 4) - x
16x 1/4 x = x << 4
17x 2/5 x = (x << 4) + x
18x 3/5 x = (x << 3) + x << 1
19x 4/6 x = ((x << 3) + x << 1) + x
20x 3/5 x = (x << 2) + x << 2
21x 4/6 x = ((x << 2) + x << 2) + x
22x 4/6 t = x << 3 // 8x
x = t - x // 7x
x = (x << 1) + t // 2x + t
5/6 x = ((x << 2) + x << 1) + x << 1
23x 4/6 x = ((x << 1) + x << 3) - x
24x 3/5 x = (x << 1) + x << 3
25x 4/6 x = ((x << 1) + x << 3) + x
26x 4/6 t = x << 3 // 8x
x = (t + x << 1) + t // 3t + 2x
5/6 x = ((x << 1) + x << 2) + x << 1
27x 4/6 x = (x << 1) + x // 3x
x = (x << 3) + x // 9x
4/7 x = ((x << 3) - x << 2) - x
28x 3/6 x = (x << 3) - x << 2
29x 4/7 x = ((x << 4) - x << 1) - x
30x 3/6 x = (x << 4) - x << 1
31x 2/6 x = (x << 5) - x
32x 1/5 x = x << 5
33x 2/6 x = (x << 5) + x
34x 3/6 x = (x << 4) + x << 1
35x 4/7 x = ((x << 4) + x << 1) + x
36x 3/6 x = (x << 3) + x << 2
37x 4/7 x = ((x << 3) + x << 2) + x
38x 5/7 x = ((x << 3) + x << 1) + x << 1
39x 4/7 x = ((x << 2) + x << 3) - x
40x 3/6 x = (x << 2) + x << 3
41x 4/7 x = ((x << 2) + x << 3) + x
42x 5/7 x = ((x << 2) + x << 2) + x << 1
43x 5/7 t = x << 3 // 8x
x = x + t // 9x
x = (x + t << 1) + x // 3x + 2t
6/8 x = (((x << 2) + x << 2) + x << 1) + x
44x 4/7 t = x << 3 // 8x
x = (t + x << 2) + t // 5t + 4x
5/7 x = ((x << 2) + x << 1) + x << 2
45x 4/7 x = (x << 1) + x // 3x
x = (x << 4) - x // 15x
6/8 x = (((x << 2) + x << 1) + x << 2) + x
46x 4/7 t = x << 4 // 16x
x = t - x // 15x
x = (x << 1) + t // 2x + t
5/7 x = ((x << 1) + x << 3) - x << 1
47x 4/7 x = ((x << 1) + x << 4) - x
48x 3/6 x = (x << 1) + x << 4
49x 4/7 x = ((x << 1) + x << 4) + x
50x 4/7 t = x << 4 // 16x
x = (t + x << 1) + t // 3t + 2x
5/7 x = ((x << 1) + x << 3) + x << 1
51x 4/7 x = (x << 1) + x // 3x
x = (x << 4) + x // 17x
6/8 x = (((x << 1) + x << 3) + x << 1) + x
52x 5/7 x = ((x << 1) + x << 2) + x << 2
53x 5/8 t = x << 3 // 8x
x = x + t // 9x
x = (x << 2) + x + t // 5x + t
6/8 x = (((x << 1) + x << 2) + x << 2) + x
54x 5/7 x = (x << 1) + x // 3x
x = (x << 3) + x << 1 // 18x
5/8 x = ((x << 3) - x << 2) - x << 1
55x 4/8 x = ((x << 3) - x << 3) - x
56x 3/7 x = (x << 3) - x << 3
57x 4/8 x = ((x << 3) - x << 3) + x
58x 5/8 x = ((x << 4) - x << 1) - x << 1
59x 4/8 x = ((x << 4) - x << 2) - x
60x 3/7 x = (x << 4) - x << 2
61x 4/8 x = ((x << 5) - x << 1) - x
62x 3/7 x = (x << 5) - x << 1
63x 2/7 x = (x << 6) - x
64x 1/6 x = x << 6
65x 2/7 x = (x << 6) + x
66x 3/7 x = (x << 5) + x << 1
67x 4/8 x = ((x << 5) + x << 1) + x
68x 3/7 x = (x << 4) + x << 2
69x 4/8 x = ((x << 4) + x << 2) + x
70x 5/8 x = ((x << 4) + x << 1) + x << 1
71x 4/8 x = ((x << 3) + x << 3) - x
72x 3/7 x = (x << 3) + x << 3
73x 4/8 x = ((x << 3) + x << 3) + x
74x 5/8 x = ((x << 3) + x << 2) + x << 1
75x 4/8 x = (x << 2) + x // 5x
x = (x << 4) - x // 15x
6/9 x = (((x << 3) + x << 2) + x << 1) + x
76x 4/8 t = x << 4 // 16x
x = (t - x << 2) + t // 5t - 4x
5/8 x = ((x << 3) + x << 1) + x << 2
77x 5/8 t = x << 4 // 16x
x = t - x // 15x
x = (x + t << 1) + x // 3x + 2t
6/9 x = (((x << 3) + x << 1) + x << 2) + x
78x 5/8 x = ((x << 2) + x << 3) - x << 1
79x 4/8 x = ((x << 2) + x << 4) - x
80x 3/7 x = (x << 2) + x << 4
81x 4/8 x = ((x << 2) + x << 4) + x
82x 5/8 x = ((x << 2) + x << 3) + x << 1
83x 5/8 t = x << 4 // 16x
x = x + t // 17x
x = (x + t << 1) + x // 3x + 2t
6/9 x = (((x << 2) + x << 3) + x << 1) + x
84x 4/8 t = x << 4 // 16x
x = (t + x << 2) + t // 5t + 4x
5/8 x = ((x << 2) + x << 2) + x << 2
85x 4/8 x = (x << 2) + x // 5x
x = (x << 4) + x // 17x
6/9 x = (((x << 2) + x << 2) + x << 2) + x
86x 6/8 x = x << 1 // 2x
t = x << 3 // 8x
x = x + t // 9x
x = (x + t << 1) + x // 3x + 2t
5/9 t = (x << 2) + x // 5x
x = (t << 4) + t + x // 17t + x
7/9 x = (((x << 2) + x << 2) + x << 1) + x << 1
87x 6/9 x = (((x << 2) + x << 1) + x << 3) - x
88x 5/8 x = ((x << 2) + x << 1) + x << 3
89x 5/9 t = x << 3 // 8x
x = x + t // 9x
x = (x << 3) + x + t // 9x + t
6/9 x = (((x << 2) + x << 1) + x << 3) + x
90x 5/8 x = (x << 1) + x // 3x
x = (x << 4) - x << 1 // 30x
7/9 x = (((x << 2) + x << 1) + x << 2) + x << 1
91x 5/9 t = x << 4 // 16x
x = t - x // 15x
x = (x << 2) + x + t // 5x + t
6/9 x = (((x << 1) + x << 3) - x << 2) - x
92x 5/8 x = ((x << 1) + x << 3) - x << 2
93x 4/8 x = (x << 1) + x // 3x
x = (x << 5) - x // 31x
6/9 x = (((x << 1) + x << 4) - x << 1) - x
94x 4/8 t = x << 5 // 32x
x = t - x // 31x
x = (x << 1) + t // 2x + t
5/8 x = ((x << 1) + x << 4) - x << 1
95x 4/8 x = ((x << 1) + x << 5) - x
96x 3/7 x = (x << 1) + x << 5
97x 4/8 x = ((x << 1) + x << 5) + x
98x 4/8 t = x << 5 // 32x
x = (t + x << 1) + t // 3t + 2x
5/8 x = ((x << 1) + x << 4) + x << 1
99x 4/8 x = (x << 1) + x // 3x
x = (x << 5) + x // 33x
6/9 x = (((x << 1) + x << 4) + x << 1) + x
100x 5/8 x = ((x << 1) + x << 3) + x << 2
101x 5/9 t = x << 4 // 16x
x = x + t // 17x
x = (x << 2) + x + t // 5x + t
6/9 x = (((x << 1) + x << 3) + x << 2) + x
102x 5/8 x = (x << 1) + x // 3x
x = (x << 4) + x << 1 // 34x
7/9 x = (((x << 1) + x << 3) + x << 1) + x << 1
103x 6/9 x = (((x << 1) + x << 2) + x << 3) - x
104x 5/8 x = ((x << 1) + x << 2) + x << 3
105x 4/9 x = (x << 3) - x // 7x
x = (x << 4) - x // 15x
6/9 x = (((x << 1) + x << 2) + x << 3) + x
106x 5/10 t = (x << 3) - x // 7x
x = (t << 4) - t + x // 15t + x
6/9 t = x << 2 // 4x
u = t << 3 // 32x
x = (u + t + x << 1) + u // 3u + 2t + 2x
7/9 x = (((x << 1) + x << 2) + x << 2) + x << 1
107x 6/9 t = (x << 1) + x // 3x
x = ((t << 3) + t << 2) - x // 36t - x
6/10 x = (((x << 3) - x << 2) - x << 2) - x
108x 5/8 x = (x << 1) + x // 3x
x = (x << 3) + x << 2 // 36x
5/9 x = ((x << 3) - x << 2) - x << 2
109x 5/9 t = x << 4 // 16x
x = t - x // 15x
x = (x + t << 2) - x // 3x + 4t
6/10 x = (((x << 3) - x << 3) - x << 1) - x
110x 5/9 x = ((x << 3) - x << 3) - x << 1
111x 4/9 x = ((x << 3) - x << 4) - x
112x 3/8 x = (x << 3) - x << 4
113x 4/9 x = ((x << 3) - x << 4) + x
114x 5/9 x = ((x << 3) - x << 3) + x << 1
115x 5/9 t = x << 4 // 16x
x = x + t // 17x
x = (x + t << 2) - x // 3x + 4t
6/10 x = (((x << 4) - x << 1) - x << 2) - x
116x 5/9 x = ((x << 4) - x << 1) - x << 2
117x 6/9 x = (x << 1) + x // 3x
x = ((x << 2) + x << 3) - x // 39x
6/10 x = (((x << 4) - x << 2) - x << 1) - x
118x 5/9 x = ((x << 4) - x << 2) - x << 1
119x 4/9 x = ((x << 4) - x << 3) - x
120x 3/8 x = (x << 4) - x << 3
121x 4/9 x = ((x << 4) - x << 3) + x
122x 5/9 x = ((x << 5) - x << 1) - x << 1
123x 4/9 x = ((x << 5) - x << 2) - x
124x 3/8 x = (x << 5) - x << 2
125x 4/9 x = ((x << 6) - x << 1) - x
126x 3/8 x = (x << 6) - x << 1
127x 2/8 x = (x << 7) - x
128x 1/7 x = x << 7
129x 2/8 x = (x << 7) + x
130x 3/8 x = (x << 6) + x << 1
131x 4/9 x = ((x << 6) + x << 1) + x
132x 3/8 x = (x << 5) + x << 2
133x 4/9 x = ((x << 5) + x << 2) + x
134x 5/9 x = ((x << 5) + x << 1) + x << 1
135x 4/9 x = ((x << 4) + x << 3) - x
136x 3/8 x = (x << 4) + x << 3
137x 4/9 x = ((x << 4) + x << 3) + x
138x 5/9 x = ((x << 4) + x << 2) + x << 1
139x 5/9 t = x << 4 // 16x
x = t - x // 15x
x = (x + t << 2) + x // 5x + 4t
6/10 x = (((x << 4) + x << 2) + x << 1) + x
140x 5/9 x = ((x << 4) + x << 1) + x << 2
141x 6/9 x = (x << 1) + x // 3x
x = ((x << 1) + x << 4) - x // 47x
6/10 x = (((x << 4) + x << 1) + x << 2) + x
142x 5/9 x = ((x << 3) + x << 3) - x << 1
143x 4/9 x = ((x << 3) + x << 4) - x
144x 3/8 x = (x << 3) + x << 4
145x 4/9 x = ((x << 3) + x << 4) + x
146x 5/9 x = ((x << 3) + x << 3) + x << 1
147x 6/9 x = (x << 1) + x // 3x
x = ((x << 1) + x << 4) + x // 49x
6/10 x = (((x << 3) + x << 3) + x << 1) + x
148x 5/9 x = ((x << 3) + x << 2) + x << 2
149x 5/9 t = x << 4 // 16x
x = x + t // 17x
x = (x + t << 2) + x // 5x + 4t
6/10 x = (((x << 3) + x << 2) + x << 2) + x
150x 5/9 x = (x << 2) + x // 5x
x = (x << 4) - x << 1 // 30x
7/10 x = (((x << 3) + x << 2) + x << 1) + x << 1
151x 5/10 t = x << 4 // 16x
x = (t + x << 3) + t - x // 9t + 7x
6/10 x = (((x << 3) + x << 1) + x << 3) - x
152x 4/9 t = x << 4 // 16x
x = (t + x << 3) + t // 9t + 8x
5/9 x = ((x << 3) + x << 1) + x << 3
153x 4/9 x = (x << 3) + x // 9x
x = (x << 4) + x // 17x
6/10 x = (((x << 3) + x << 1) + x << 3) + x
154x 6/9 x = x << 1 // 2x
t = x << 4 // 16x
x = t - x // 15x
x = (x + t << 1) + x // 3x + 2t
5/10 t = (x << 3) + x // 9x
x = (t << 4) + t + x // 17t + x
7/10 x = (((x << 3) + x << 1) + x << 2) + x << 1
155x 4/9 x = (x << 2) + x // 5x
x = (x << 5) - x // 31x
6/10 x = (((x << 2) + x << 3) - x << 2) - x
156x 4/9 t = x << 5 // 32x
x = (t - x << 2) + t // 5t - 4x
5/9 x = ((x << 2) + x << 3) - x << 2
157x 5/9 t = x << 5 // 32x
x = t - x // 31x
x = (x + t << 1) + x // 3x + 2t
6/10 x = (((x << 2) + x << 4) - x << 1) - x
158x 5/9 x = ((x << 2) + x << 4) - x << 1
159x 4/9 x = ((x << 2) + x << 5) - x
160x 3/8 x = (x << 2) + x << 5
161x 4/9 x = ((x << 2) + x << 5) + x
162x 5/9 x = ((x << 2) + x << 4) + x << 1
163x 5/9 t = x << 5 // 32x
x = x + t // 33x
x = (x + t << 1) + x // 3x + 2t
6/10 x = (((x << 2) + x << 4) + x << 1) + x
164x 4/9 t = x << 5 // 32x
x = (t + x << 2) + t // 5t + 4x
5/9 x = ((x << 2) + x << 3) + x << 2
165x 4/9 x = (x << 2) + x // 5x
x = (x << 5) + x // 33x
6/10 x = (((x << 2) + x << 3) + x << 2) + x
166x 6/9 x = x << 1 // 2x
t = x << 4 // 16x
x = x + t // 17x
x = (x + t << 1) + x // 3x + 2t
5/10 t = (x << 2) + x // 5x
x = (t << 5) + t + x // 33t + x
7/10 x = (((x << 2) + x << 3) + x << 1) + x << 1
167x 6/10 x = (((x << 2) + x << 2) + x << 3) - x
168x 5/9 x = ((x << 2) + x << 2) + x << 3
169x 5/10 t = x << 4 // 16x
x = x + t // 17x
x = (x << 3) + x + t // 9x + t
6/10 x = (((x << 2) + x << 2) + x << 3) + x
170x 5/9 x = (x << 2) + x // 5x
x = (x << 4) + x << 1 // 34x
7/10 x = (((x << 2) + x << 2) + x << 2) + x << 1
171x 6/10 x = (x << 1) + x // 3x
x = ((x << 3) - x << 3) + x // 57x
8/11 x = ((((x << 2) + x << 2) + x << 2) + x << 1) + x
172x 6/9 x = x << 2 // 4x
t = x << 3 // 32x
x = x + t // 36x
x = (x + t << 1) + x // 3x + 2t
7/10 x = (((x << 2) + x << 2) + x << 1) + x << 2
173x 6/10 t = (x << 2) + x // 5x
x = ((t << 2) + x << 3) + t // 33t + 8x
8/11 x = ((((x << 2) + x << 2) + x << 1) + x << 2) + x
174x 6/10 t = x << 4 // 16x
x = ((t << 2) + t - x << 1) + t // 11t - 2x
7/10 x = (((x << 2) + x << 1) + x << 3) - x << 1
175x 6/10 x = (((x << 2) + x << 1) + x << 4) - x
176x 5/9 x = ((x << 2) + x << 1) + x << 4
177x 6/10 x = (((x << 2) + x << 1) + x << 4) + x
178x 6/10 t = (x << 4) - x << 2 // 60x
x = (t - x << 1) + t // 3t - 2x
7/10 x = (((x << 2) + x << 1) + x << 3) + x << 1
179x 6/10 t = (x << 1) + x // 3x
x = ((t << 4) - t << 2) - x // 60t - x
8/11 x = ((((x << 2) + x << 1) + x << 3) + x << 1) + x
180x 5/9 x = (x << 1) + x // 3x
x = (x << 4) - x << 2 // 60x
7/10 x = (((x << 2) + x << 1) + x << 2) + x << 2
181x 6/10 t = (x << 1) + x // 3x
x = ((t << 4) - t << 2) + x // 60t + x
8/11 x = ((((x << 2) + x << 1) + x << 2) + x << 2) + x
182x 6/10 t = (x << 4) - x << 2 // 60x
x = (t + x << 1) + t // 3t + 2x
7/10 x = (((x << 1) + x << 3) - x << 2) - x << 1
183x 6/10 x = (((x << 1) + x << 3) - x << 3) - x
184x 5/9 x = ((x << 1) + x << 3) - x << 3
185x 6/10 x = (((x << 1) + x << 3) - x << 3) + x
186x 5/9 x = (x << 1) + x // 3x
x = (x << 5) - x << 1 // 62x
7/10 x = (((x << 1) + x << 4) - x << 1) - x << 1
187x 5/10 t = x << 5 // 32x
x = t - x // 31x
x = (x << 2) + x + t // 5x + t
6/10 x = (((x << 1) + x << 4) - x << 2) - x
188x 5/9 x = ((x << 1) + x << 4) - x << 2
189x 4/9 x = (x << 1) + x // 3x
x = (x << 6) - x // 63x
6/10 x = (((x << 1) + x << 5) - x << 1) - x
190x 4/9 t = x << 6 // 64x
x = t - x // 63x
x = (x << 1) + t // 2x + t
5/9 x = ((x << 1) + x << 5) - x << 1
191x 4/9 x = ((x << 1) + x << 6) - x
192x 3/8 x = (x << 1) + x << 6
193x 4/9 x = ((x << 1) + x << 6) + x
194x 4/9 t = x << 6 // 64x
x = (t + x << 1) + t // 3t + 2x
5/9 x = ((x << 1) + x << 5) + x << 1
195x 4/9 x = (x << 1) + x // 3x
x = (x << 6) + x // 65x
6/10 x = (((x << 1) + x << 5) + x << 1) + x
196x 5/9 x = ((x << 1) + x << 4) + x << 2
197x 5/10 t = x << 5 // 32x
x = x + t // 33x
x = (x << 2) + x + t // 5x + t
6/10 x = (((x << 1) + x << 4) + x << 2) + x
198x 5/9 x = (x << 1) + x // 3x
x = (x << 5) + x << 1 // 66x
7/10 x = (((x << 1) + x << 4) + x << 1) + x << 1
199x 6/10 x = (((x << 1) + x << 3) + x << 3) - x
200x 5/9 x = ((x << 1) + x << 3) + x << 3
201x 6/10 x = (((x << 1) + x << 3) + x << 3) + x
202x 6/10 t = (x << 4) + x << 2 // 68x
x = (t - x << 1) + t // 3t - 2x
7/10 x = (((x << 1) + x << 3) + x << 2) + x << 1
203x 6/10 t = (x << 1) + x // 3x
x = ((t << 4) + t << 2) - x // 68t - x
6/11 x = (x << 3) - x // 7x
x = ((x << 4) - x << 1) - x // 29x
8/11 x = ((((x << 1) + x << 3) + x << 2) + x << 1) + x
204x 5/9 x = (x << 1) + x // 3x
x = (x << 4) + x << 2 // 68x
7/10 x = (((x << 1) + x << 3) + x << 1) + x << 2
205x 6/10 x = (x << 2) + x // 5x
x = ((x << 2) + x << 3) + x // 41x
8/11 x = ((((x << 1) + x << 3) + x << 1) + x << 2) + x
206x 6/10 t = (x << 4) + x << 2 // 68x
x = (t + x << 1) + t // 3t + 2x
7/10 x = (((x << 1) + x << 2) + x << 3) - x << 1
207x 6/10 x = (((x << 1) + x << 2) + x << 4) - x
208x 5/9 x = ((x << 1) + x << 2) + x << 4
209x 6/10 x = (((x << 1) + x << 2) + x << 4) + x
210x 5/10 x = (x << 3) - x // 7x
x = (x << 4) - x << 1 // 30x
7/10 x = (((x << 1) + x << 2) + x << 3) + x << 1
211x 6/10 t = (x << 1) + x // 3x
x = ((t << 2) + x << 4) + t // 65t + 16x
8/11 x = ((((x << 1) + x << 2) + x << 3) + x << 1) + x
212x 6/10 t = x << 4 // 16x
x = ((t << 1) + t + x << 2) + t // 13t + 4x
7/10 x = (((x << 1) + x << 2) + x << 2) + x << 2
213x 6/10 x = (x << 1) + x // 3x
x = ((x << 3) + x << 3) - x // 71x
8/11 x = ((((x << 1) + x << 2) + x << 2) + x << 2) + x
214x 6/10 t = (x << 3) + x << 3 // 72x
x = (t - x << 1) + t // 3t - 2x
7/11 x = (((x << 3) - x << 2) - x << 2) - x << 1
215x 6/10 t = (x << 3) + x // 9x
x = ((t << 1) + t << 3) - x // 24t - x
6/11 x = (((x << 3) - x << 2) - x << 3) - x
216x 5/9 x = (x << 3) + x // 9x
x = (x << 1) + x << 3 // 24x
5/10 x = ((x << 3) - x << 2) - x << 3
217x 4/10 x = (x << 3) - x // 7x
x = (x << 5) - x // 31x
6/11 x = (((x << 3) - x << 2) - x << 3) + x
218x 5/11 x = (x << 3) - x // 7x
x = (t << 5) - t + x // 31t + x
6/10 t = x << 3 // 8x
t = (t << 3) + t // 72x
x = (t + x << 1) + t // 3t + 2x
7/11 x = (((x << 3) - x << 3) - x << 1) - x << 1
219x 6/10 x = (x << 1) + x // 3x
x = ((x << 3) + x << 3) + x // 73x
6/11 x = (((x << 3) - x << 3) - x << 2) - x
220x 5/10 x = ((x << 3) - x << 3) - x << 2
221x 5/10 t = x << 5 // 32x
x = t - x // 31x
x = (x + t << 2) - x // 3x + 4t
6/11 x = (((x << 3) - x << 4) - x << 1) - x
222x 5/10 x = ((x << 3) - x << 4) - x << 1
223x 4/10 x = ((x << 3) - x << 5) - x
224x 3/9 x = (x << 3) - x << 5
225x 4/10 x = ((x << 3) - x << 5) + x
226x 5/10 x = ((x << 3) - x << 4) + x << 1
227x 5/10 t = x << 5 // 32x
x = x + t // 33x
x = (x + t << 2) - x // 3x + 4t
6/11 x = (((x << 3) - x << 4) + x << 1) + x
228x 5/10 x = ((x << 3) - x << 3) + x << 2
229x 6/10 t = x << 5 // 32x
x = x + t // 33x
x = ((x << 1) + t << 1) + x // 5x + 2t
6/11 x = (((x << 3) - x << 3) + x << 2) + x
230x 5/11 t = (x << 3) - x // 7x
x = (t << 5) + t - x // 33t - x
6/10 t = x << 1 // 2x
x = t << 4 // 32x
t = t + x // 34x
x = (t + x << 2) - t // 3t + 4x
7/11 x = (((x << 4) - x << 1) - x << 2) - x << 1
231x 4/10 x = (x << 3) - x // 7x
x = (x << 5) + x // 33x
6/11 x = (((x << 4) - x << 1) - x << 3) - x
232x 4/10 t = x << 5 // 32x
x = (t + x << 3) - t // 7t + 8x
5/10 x = ((x << 4) - x << 1) - x << 3
233x 5/10 t = x << 4 // 16x
x = t - x // 15x
x = (x + t << 3) - x // 7x + 8t
6/11 x = (((x << 4) - x << 1) - x << 3) + x
234x 6/10 t = x << 4 // 16x
x = x + t << 1 // 34x
x = (x + t << 2) + x // 5x + t
7/11 x = (((x << 4) - x << 2) - x << 1) - x << 1
235x 6/10 x = (x << 2) + x // 5x
x = ((x << 1) + x << 4) - x // 47x
6/11 x = (((x << 4) - x << 2) - x << 2) - x
236x 5/10 x = ((x << 4) - x << 2) - x << 2
237x 6/10 x = (x << 1) + x // 3x
x = ((x << 2) + x << 4) - x // 79x
6/11 x = (((x << 4) - x << 3) - x << 1) - x
238x 5/10 x = ((x << 4) - x << 3) - x << 1
239x 4/10 x = ((x << 4) - x << 4) - x
240x 3/9 x = (x << 4) - x << 4
241x 4/10 x = ((x << 4) - x << 4) + x
242x 5/10 x = ((x << 4) - x << 3) + x << 1
243x 6/10 x = (x << 1) + x // 3x
x = ((x << 2) + x << 4) + x // 81x
6/11 x = (((x << 5) - x << 1) - x << 2) - x
244x 5/10 x = ((x << 5) - x << 1) - x << 2
245x 6/10 x = (x << 2) + x // 5x
x = ((x << 1) + x << 4) + x // 49x
6/11 x = (((x << 5) - x << 2) - x << 1) - x
246x 5/10 x = ((x << 5) - x << 2) - x << 1
247x 4/10 x = ((x << 5) - x << 3) - x
248x 3/9 x = (x << 5) - x << 3
249x 4/10 x = ((x << 5) - x << 3) + x
250x 5/10 x = ((x << 6) - x << 1) - x << 1
251x 4/10 x = ((x << 6) - x << 2) - x
252x 3/9 x = (x << 6) - x << 2
253x 4/10 x = ((x << 7) - x << 1) - x
254x 3/9 x = (x << 7) - x << 1
255x 2/9 x = (x << 8) - x
256x 1/8 x = x << 8

Number of operations above: