algorithms

Create 2314

This is how you create the number 7.

MakeIntVar A
Inc A
Inc A
A=A*A
A=A+A
Dec A

Or

MakeIntVar A
MakeIntVar B
Inc A
Inc B
Shl A, A
Shl A, A
A=A-B

You can do all the basic operations + – * \ and you can shift right and left, and decrease or increase any variable, which you have to “MakeIntVar” first. By doing that, the variable is initialized to zero.

Now, make 2314 with the shortest possible algorithm.

Advertisements
Standard

2 thoughts on “Create 2314

  1. Pingback: Rational Feed – deluks917

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s