text:
Convert from base 10 to base 2 without built-in base conversions
Background:

You have been given an assignment to convert base 10 numbers to base 2 without using any premade base conversion functions. You can't use any imported libraries either.

Problem:
Convert an input string from base 10 (decimal) to base 2 (binary). You may not use any premade base conversion code/functions/methods, or imported libraries. Since this is code-golf, the shortest answer in bytes will win.
Input will be anything from -32768 to 32767 (include sign byte handling in your code)

Q: what does "sign byte handling" mean - shall I output "-xxxx" for a negative number? Then some of us are wrong, incl. me, as I output "11...11" for -1 (aka as unsigned)

Sign byte handling - the MSB of signed variables controls if they are negative

sure, but do I have to >print< them as sign '-' followed by magnitude?

@blabla999 - No you don't

the MSB of signed variables controls if they are negative - that sounds like sign bit, however as the range -32768..32767 suggests, you want 2's complement. So which do you want?..

The range suggests i want you to be able to do 16-bit signed numbers, and yes, 2's compliment is essentially my definition of sign bit.

GolfScript - 17 bytes
~{.1&\2/}16*;]-1%

Not too much more verbose than the built-in ~2base.

I don't know golfscript but a few sample runs lead me to conclude that you should remove the ~

@ace Because the initial input is a string "37", for example, the operation "37" & 1 (in infix) is a set-wise operation. The ~ at the front converts the input to an integer.

I did my test here http://golfscript.apphb.com/?c=I1RoaXMgaXMgYSBzYW1wbGUgcHJvZ3JhbSB0byBkZXRlcm1pbmUgdGhlIEdyZWF0ZXN0IENvbW1vbiBEaXZpc29yIG9mIHR3byBudW1iZXJzCgojVGhlIGFyZ3VtZW50czoKMTAKCiNUaGUgcHJvZ3JhbToKfnsuMSZcMi99MTYqO10tMSU%3D does this mean this interpreter is incorrect? (Sorry I really know nothing about golfscript)

The interpreter is correct; because you've pushed the integer value 10 onto the stack, it is not necessary to evaluate it. However, when read from stdin, the input will be a string (test here). The problem description also explicitly states that the input is a string.

JavaScript, 46
for(x=prompt(o='');x;x>>>=1)o=(x&1)+o;alert(o)

Lol, I didn't even know that a 4-character operator (>>>=) existed! +1 (Also, if you run it in the console, you can save the last 9 characters.)

It's not 4-characters, it's two operators: the >>> is the 0-filling bitwise right shift, followed by an assignment. Try: x=8; x>>>=1; x; and x=8; x>>>1; x; -- in the first case, the value of x has changed; in the second, it has not.

@GrahamCharles >>>= is a single operator.

Well, look at that! Thanks, @primo... you learn something every day!

Save 1 character by using +=: for(x=prompt(o='');x;x>>>=1)o+=(x&1);alert(o)

@ComFreek That would reverse the order of the digits

@copy Oh, you're right, my bad. Have a +1 ;)

bitwise always amazing

Brainf*ck, 98 77
Obviously this isn't for the purpose of winning but what would a competition be if it didnt have a brainfk solution
++++[>++++<-]>>,<[->>++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]++++++[->++++++++<]>.[-]>[-<<<+>>>]<<<<]

Since brainfk can only handle 8bit integers and no negatives I guess it doesn't fully abide by the rules but hey I was never in it to win it.
This actually does work for 16-bit input if your interpreter supports
I even got it to output in ascii values
Here is the annotated code:
++[>++++<-]                       preload 8 onto cell 1
>>,<                                input into cell 2
[-                                  iterate over cell 1
    >>++<                               put 2 in cell 3
    [->-[>+>>]>[+[-<+>]>+>>]<<<<<]      division algorithm: converts {n d} into {0 d_minus_n%d n%d n/d}
    >[-]++++++[->++++++++<]>           clears cell 4 and puts 48(ascii of 0) into cell 5
    .[-]                                output n%2 and clear it (the bit)
    >[-<<<+>>>]                         bring n/2 into cell 2 (to be used for division in next iteration)
<<<<]                               end iterate

Shorter algorithm (77):
+>,>-<[>>[->]++[-<+]-<-]++++++++[->++++++<]>+[->+>+>+>+>+>+>+>+<<<<<<<<]>[.>]

This one can only handle 8bit integers.
The algorithm works by using a binary counter which is actually very short (one increment is >[->]++[-<+]-<- which then lays out the bits. The issue is that it is difficult to print out all of the bits
That last algorithm can be adapted to fit any number of bits at the expense of bytes. To be able to deal with N bit integers, it requires 53+3*N bytes to encode.
examples:
(1 bit) +>,>-<[>>[->]++[-<+]-<-]++++++++[->++++++<]>+[->+<]>[.>]
(2 bit) +>,>-<[>>[->]++[-<+]-<-]++++++++[->++++++<]>+[->+>+<<]>[.>]
(3 bit) +>,>-<[>>[->]++[-<+]-<-]++++++++[->++++++<]>+[->+>+>+<<<]>[.>]
etc

Mandatory APL answer - 21 22
"01"[1+2|⌊⎕÷2⋆⊖0,⍳15]

Examples:
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 0
0000000000000000
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 13
0000000000001101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 9999
0010011100001111
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: -3
1111111111111101
      "01"[1+2|⌊⎕÷2⋆⊖0,⍳15]
⎕: 32767
0111111111111111

You can reduce with almost 50% by using ⎕IO←0, and returning an array of bits instead of a string: 2|⌊⎕÷2*⊖⍳16.

Turing Machine Code, 272 bytes
As usual, I'm using the rule table syntax defined here. You can test it on that site or, alternatively, using this java implementation.
A lot of the code is copied from my decimal-to-hex converter here.
0 * * l B
B * * l C
C * 0 r D
D * * r E
E * * r A
A _ * l 1
A * * r *
1 0 9 l 1
1 1 0 l 2
1 2 1 l 2
1 3 2 l 2
1 4 3 l 2
1 5 4 l 2
1 6 5 l 2
1 7 6 l 2
1 8 7 l 2
1 9 8 l 2
1 _ * r Y
Y * * * X
X * _ r X
X _ _ * halt
2 * * l 2
2 _ _ l 3
3 * 1 r 4
3 1 0 l 3
4 * * r 4
4 _ _ r A

Counts down from the input in base 10 while counting up from 0 in base 2. On decrementing zero, it erases the input block and terminates.

Dyalog APL, 11 bytes
2|⌊⎕÷2*⌽⍳16

2| The division remainder when halved of
⌊ the rounded down value of
⎕ the input
÷ divided by each of
2* two to the power of each of
⍳16 {0, 1, 2, ..., 15}
Requires ⎕IO←0 which is default on many systems.
TryAPL online!

Javascript 59
o='';i=parseInt(prompt());do{o=(i&1)+o}while(i>>=1)alert(o)

You can use +x instead of parseInt(x)

Perl, 44
This is my first Perl program ever, so please forgive me if this can be easily golfed down further. Edit: Thank you @primo for taking 7 chars away from my answer.
$x=<>;do{@s=($x&1,@s)}while($x>>=1);print@s

$x=<>;do{push@s,$x&1}while($x>>=1);print reverse@s

The logic is essentially the same as my previous C solution.
Also, uses 64 bits.

You can save the reverse by constructing the array backwards: @s=($x&1,@s).

Now that the contest is over, the best I found was 34: $\=$_%2 .$\while$_=$_>>1||<>;print. Or, if command line options count one byte each, 27: 1while$\=$_%2 .$\,$_>>=1}{ using -p.

Javascript - 56 48 and 36 28 characters

Does not works with negative numbers.

Thanks to @Blender for shaving 8 characters.
This form takes input and shows output, 48 characters:
x=prompt();for(a="";x;x=~~(x/2))a=x%2+a;alert(a)

If just an instruction that puts in a variable a the binary form of a variable x is needed (and you don't bother in destroying the x value as a side-effect), here it is with 28 characters:
for(a="";x;x=~~(x/2))a=x%2+a

You can replace Math.floor with ~~, as the range for the numbers is small.

@Blender Thanks, I knew that there existed some way, just could not find it.

@Victor I don't know javascript so I might be wrong but at the end when you say a=x%2+a could this be shortened to a+=x%2 ? It works in all languages I know.

@AlbertRenshaw No, This would be the same as a=a+x%2, but that + is for string concatenation. I.e, your suggestion results in the digits in the backwards order.

C, 55 chars
Prints an extra leading zero (for the sake of 2 bytes).
Recursion within printf reverses the print order, so the algorithm extracts bits right-to-left but prints left-to-right.
EDIT: Saved a char by using putchar instead of printf.
f(x){(x*=x<0?-printf("-"):1)&&f(x/2);putchar(48+x%2);}

Python - 61 60 characters
x=input();print"".join("01"[x>>i&1]for i in range(15,-1,-1))

You can get rid of the space between print and "".

@Blender I was just about to suggest the same thing :)

@Blender Ha true, didn't even notice. Done!

if you call it from the command-line you could leave aside print as it automatically returns the result

Excel, 91 90 81 74
Trailing parens already discounted.
Compatibility note: CONCAT() was available only after later versions of 2016. It replaced CONCATENATE(). Tested in Excel online.
Formulae

A1 - Input
B1 - =A1+4^8*(A1<0) (13) - Convert to 16-bit unsigned equivalent.
B2 - =1+INT(LOG(B1,2)) (15) - Number of binary digits + 1

Code (46):
Convert B1 to binary.
=IF(A1=0,0,CONCAT(--ISODD(B1/2^(B2-SEQUENCE(B2)))))

Works in the full 16-bit range.

I would normally recommend using implicit conversion in th if statement to get something like
=IF(A1,CONCAT(--ISODD(B1/2^(B2-ROW(OFFSET(B1,,,B2))))),
but as omitting trailing parens is valid
you can do better with
=A1+4^8*(A1<0
=1+INT(LOG(B1,2
=IF(A1=0,,CONCAT(--ISODD(B1/2^(B2-ROW(OFFSET(B1,,,B2
which would be 82 bytes, if I am counting correctly

Oh, right, I meant to subtract the trailing parens. Guess I forgot.

I even stacked the parens at the end for that reason! Unfortunately, with the implicit conversion, I got FALSE as the string, so I would have had to add an extra 2 characters anyway. Otherwise, I could have just omitted the 0.

C, 81
char b[17];i=15;main(x){scanf("%d",&x);while(i+1)b[i--]=(x&1)+48,x>>=1;puts(b);}

The output has strictly 16 bits (including padding zeros)

Bash, 44
f=b+=n/2**e%2*10**e,2**e++/n?f=b:f;echo $[f]

Pass an input value to the script through the environment variable n. The decimal representation of the binary result cannot exceed LONG_MAX.
This should also be compatible with ksh93 and zsh if b and e are initialized to 0 and proper arithmetic expansion is used.

I don't believe this is valid since it assumes that n is already defined, making it a snippet. That could be fixed by taking input as a command-line argument and setting n to that in your script.

@quartata Variables in a math context in shell are implicitly zero. For the purpose of golf it makes more sense to do n=127 sh -c '...' than sh -c 'n=$1 ...' _ 127. There's no reason to prefer one over the other in this case as they're both perfectly typical way to pass values.

Apps Script + Google Sheets, 147 144 121 bytes
Script
function j(decNumb){var str='';do{str=String(decNumb%2)+str;decNumb=decNumb/2|0;}while(decNumb>=1);return parseInt(str);}

Sheet
=j(b1)

Modified version of this script by ZygD.

Can you remove any spaces?

Haskell, 66 bytes
c 0=0
c n=c(div n 2)*10+mod n 2
b('-':r)='-':b r
b r=show.c.read$r

Call with b "-1023", add main=interact b for a complete program or
try it on Ideon.
c performs the conversion for positive integers.
b r=show.c.read$r converts a string to a number, applies c and converts back to string.
b('-':r)='-':b r strips a possible leading - and re-appends it to the result.

PowerShell, 59 87 82 70 bytes
+28 bytes for supporting negative numbers.
-12 bytes thanks to @ASCII-only
param($d)$m=$d-lt0;while($d){$n="01"[$d%2]+$n;$d=($d-$d%2)/2}'-'*$m+$n

Try it online!
Adapted from this code. Takes input through a commandline parameter -d.

What about numbers with sign?

73?

so close, yet so far. also close

oh wait 70

APL(NARS), 17 chars, 34 bytes
{2∣⌊⍵÷2*(⍺-1)..0}

It is a copy and modify of Adam answer https://codegolf.stackexchange.com/a/90107
in the way one can add the parameter for the bits lenght,
and ⎕IO for this function (here is ⎕IO=1) should have no importance...
  f←{2∣⌊⍵÷2*(⍺-1)..0}
  16 f 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
  32 f 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
  32 f ¯1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  16 f ¯1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
  64 f ¯12345678
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 1 1 1 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0

it seeme easy handle the number of bits in this way (I cheked that last result should be right)

Smalltalk (Smalltalk/X), 63/78
the first version creates an intermediate string (78):
t:=Number readFrom:Stdin.
((15to:1by:-1)collect:[:i|$0+(t>>i&1)]as:String)print

actually, there is no need to create the string; just output the chars (63):
t:=Number readFrom:Stdin.
15to:1by:-1 do:[:i|($0+(t>>i&1))print]

mhmh - is there a shorter way to read to a number?

Python 3.x: 65 characters
b=lambda n:n<2 and'01'[n]or b(n//2)+b(n%2);print(b(int(input())))

C# - 104
string p(int d){var r="";long i=1;while(r.Length<=64){var g=d&i;r=(g!=0)? "1"+r:"0"+r;i=i<<1;}return r;}

This method will convert decimal to binary up to 64 bits.
When executed the above method in Linqpad -
    rr = p(-32768);
    rr.Dump();
Output: 01111111111111111111111111111111111111111111111111000000000000000

The spec calls for "an input string". It looks like this method accepts an int.

Java 10, 80 71 57 bytes
n->{var r="";for(n=n<0?-n:n;n>1;n/=2)r=n%2+r;return n+r;}

-9 bytes due to a rule in the comments.. Negative base-10 inputs may return the positive/absolute base-2 value as output apparently.
Explanation:
Try it online.
n->{                   // Method with integer parameter and String return-type
  var r="";            //  Result-String, starting empty
  for(n=n<0?-n:n;      //  Transform the input to its absolute value
      n>1;             //  Loop as long as `n` is still >= 2:
      n/=2)            //    After every iteration: integer-divide `n` by 2
    r=n%2+r;           //   Prepend `n` modulo-2 to the result
  return n             //  Return the last `n`
         +r;           //  appended with the result

Small Basic, 133 bytes
A script that inputs from and outputs to the TextWindow console.
n=TextWindow.Read()
While n>0
c=c+1
x[c]=Math.Remainder(n,2)
n=Math.Floor(n/2)
EndWhile
For i=0To c-1
TextWindow.Write(x[c-i])
EndFor

Try it at SmallBasic.com Requires Silverlight and thus must be run in IE.
I/O is taken/given from the black console.
-22 bytes thanks to @Neil

Can you not use For i=0To c-1?

@Neil - I absolutely can. Great catch!

C (gcc), 50 43 bytes
-7 bytes thanks to ceilingcat.
f(n){printf("-%d"+(~n?n&&f(n/2),1:0),n&1);}

Try it online!

@ceilingcat Cheers!

Kotlin, 82 bytes
{s:String->{var i=s.toInt()
var r=""
(0..15).map{r="${i and 1}$r"
i=i shr 1}
r}()}

Try it online!

MATL, 15 17 bytes
t0<?16Ww+]`2&\t]x

Try it on MATL Online
TIO
(+2 bytes removing leading 0 for negative numbers, sign bit should be the first bit.)
Output on MATL Online should be read bottom-up (MSB is at the bottom).
The main part is pretty simple: `2&\t = while the value is greater than 0, divide by 2 and accumulate the remainders.
Handling negative numbers and giving them 2's complement representation was the tricky part. In the end I went with the "subtract from \$ 2^N \$" method of getting a number's two's complement. Since we're only required to handle values upto -32768, for negative numbers the code creates \$ 2^{16} = 65536 \$ with 16W, adds the input to that (eg. 65536 + (-42)), which gives something MATLAB sees as a positive number but represents the input's signed binary representation in 16-bit form.

PowerShell, 43 bytes
param($n)15..0|%{$r+='01'[($n-shr$_)%2]}
$r

Try it online!

><>,  34  33 bytes
|!/?=0:,2-}:%2:+***"  @"(0:
n{\~{

Try it online!

///, 124 bytes
/~/\/\///9/8*~8/7*~7/6*~6/5*~5/4*~4/3*~3/2*~2/1*~1/0*~*0/9*~0~/*/>Oⅼ~ⅼ>/ⅼ~ⅼO/Oⅼ~Oⅼⅼ/ⅼ\O~Oⅼ/_ⅼ~_~/>O/>~>~

Try it online!
Could be considered cheating, Outputs ⅼ and O instead of 1 and 0, due to the mechanics of ///.
Uses examples from the wiki.

Perl 5, 26 bytes
Produces an additional leading 0 which can be avoided with two additional bytes (appending }{)
$\=($_&1).$\;redo if$_>>=1

Try it online!

Clojure 129 bytes#
Golfed version:
(defn p[n](loop[m 32768](if(> m 0)(do(if(= 0(bit-and m n))(print"0")(print"1"))(recur(unsigned-bit-shift-right m 1)))(println))))

Ungolfed:
(defn print-as-binary [n]
  (loop [mask  32768]
    (if (> mask 0)
      (do
        (if (= 0 (bit-and mask n))
          (print "0")
          (print "1"))
        (recur (unsigned-bit-shift-right mask 1)))
      (println))))

PostgreSQL, 184 bytes
WITH RECURSIVE t(a,b,c)AS(SELECT abs($1),0,0 UNION ALL SELECT a/2,a%2,1from t where a>0)select case when $1<0then '-'else ''end||string_agg(b::text,''order by a)from t where c>0OR $1=0

137 bytes if only handling positive numbers
WITH RECURSIVE t(a,b,c)AS(SELECT $1,0,0 UNION ALL SELECT a/2,a%2,1from t where a>0)select string_agg(b::text,''order by a)from t where c>0

Input is given as an integer query parameter (using the extended query protocol or by wrapping in a function) and output is given as a string.


text:
Add without addition (or any of the 4 basic arithmetic operators)
Problem:
Your goal is to add two input numbers without using any of the following math operators: +,-,*,/.
Additionally, you can't use any built-in functions that are designed to replace those math operators.
Scoring:
Smallest code (in number of bytes) wins.
Update

Most of the programs i've seen either concatenate two arrays containing their numbers, or make first number of a character, append second number characters, then count them all.
Shortest array counter: APL with 8 chars, by Tobia
Shortest array concatenation: Golfscript with 4 chars, by Doorknob
Shortest logarithmic solution: TI-89 Basic with 19 chars, by Quincunx
Integration solution: Mathematica with 45 chars, by Michael Stern
Coolest, in my opinion: bitwise operators in javascript, by dave

Will it have floats?

@IsmaelMiguel - Nope. No floats.

Will it have negative numbers? (Currently, all the answers assume that the numbers will be positive, so you probably shouldn't change that)

@Doorknob the "make two lists, concatenate them, return the length of the resulting list" approach, which many are using, requires positive integers, but other solutions are possible that allow non-integer inputs, negative numbers, or both.

I'd like to suggest that the title be changed to Add without addition, multiplication, subtraction, or division! or something similar (maybe Add without +*-/) to reflect that we cannot use those operators as well.

a=lambda x,y:'%s%s'%(x,y)

Related: Adding without using a + or - sign

What about the mathematical solutions? You forgot to list those! This integrates, and this plays with logarithms

Why did you accept one of the longer solutions? Is it because it accepts negative numbers while the shortest solutions (this and this) don't? If so, my answer supports negative numbers (it also supports floating point) and is shorter than this one. You tagged this question as [tag:code-golf], thus you are obliged to accept the shortest solution.

I chose that solution because it dealt with negative numbers and it didn't use array concatenation, like the 4 char Golfscript

Do Brainf**k's + and - count?

Define "number". Any integer? Non-negative integers? Do they have to be base-10?

Do FMAs count as replacements for + and *?

Smalltalk, 21 13
All of the following only work on positive integers. See the other Smalltalk answer for a serious one.
version1
shifting to a large integer and asking it for its high bit index (bad, ST indexing is 1-based, so I need an additional right shift):
(((1<<a)<<b)>>1)highBit

version2
similar, and even a bit shorter (due to Smalltalk precedence rules, and no right shift needed):
1<<a<<b log:2

version3
another variation of the "collection-concatenating-asking size" theme,
given two numbers a and b,
((Array new:a),(Array new:b)) size

using Intervals as collection, we get a more memory friendly version ;-) in 21 chars:
((1to:a),(1to:b))size

not recommended for heavy number crunching, though.
version4
For your amusement, if you want to trade time for memory, try:
Time secondsToRun:[
   Delay waitForSeconds:a.
   Delay waitForSeconds:b.
]

which is usually accurate enough (but no  guarantee ;-)))
version5
write to a file and ask it for its size
(
    [
        't' asFilename
            writingFileDo:[:s |
                a timesRepeat:[ 'x' printOn:s ].
                b timesRepeat:[ 'x' printOn:s ]];
            fileSize
    ] ensure:[
        't' asFilename delete
    ]
) print

Javascript (25)
while(y)x^=y,y=(y&x^y)<<1

This adds two variables x and y, using only bitwise operations, and stores the result in x.
This works with negative numbers, too.

Good one, works in a whole bunch of other languages too.

Wouldn't while(y){...} be shorter?

You are correct, changed the do while to while

@dave, if you're switching to a while, you can save two more chars with while(y)x^=y,y=(y&x^y)<<1!

I was going to add the PHP version, but I just found out it's already been posted. +1 to you. The PHP version: while($y){$x^=$y;$y=($y&$x^$y)<<1;} - 36

More readable version of the code: Add two numbers without using arithmetic operators.

Slightly smaller: while(x^=y,y=(y&x^y)<<1)!

@toothbrush in that case you need a ; at the end, otherwise the statement is not complete (OP's doesn't)

@Tobia Not if it's the last statement!

@toothbrush then why does it give a syntax error if I type it into Chrome's javascript console without the ;, but it works with the ;?

@Tobia It doesn't give me a syntax error in Firefox's JavaScript console. I didn't try it in Google Chrome.

Or as a ECMAScript 6 (recursive) function: f=(x,y)=>y?f(x^y,(x&y)<<1):x It's slightly longer at 28 characters but easier to re-use.

i almost want to downvote - this is a pretty explicit way of writing a + b = a + b (bit by bit) + the 1's to carry, shifted up - in other words it is literally how you do addition in primary school - the xor is doing (by definition) bitwise addition, which breaks the rules imho. On the other hand i just realised i can do addition by remembering only two numbers at a time.

@user3125280, The problem isn't "do addition without doing addition" (which is a bit nonsensical), but rather "do addition without basic math operators"

@BrianS obviously - and there's no need to be rude is there? - but think about it in base 10 for example. In 123 + 456, the x^=y is the same as x = (1+4 mod 10)(2+5 mod 10)(3+6 mod 10) = 579. It is just something to consider - xor is a basic math operation (addition), and it is called bitwise (meaning digitwise) because it operates, well, bitwise, rather than numberwise - not because it is something completely different to addition .

@user3125280, I'm sorry, but any rudeness you interpreted from my comment was not intended. I do think you'll have a hard time finding very many people who agree that XOR should be grouped with PLUS in the category of "basic arithmetic," though. Even beyond finding people who agree, the OP explicitly calls out what operators are not permitted, and XOR is not one of them. Ergo, this is a valid answer.

@BrianS having reread the question, I do agree with you - but xor is and always was addition modulo 2 though not really 'basic arithmetic'. Many programmers see the bitwise operations as somewhat mystic, non arithmetic devices (hence the attention this answer has drawn) but I don't consider this the case. Obviously xor is certainly not what people call addition. Also + without + isn't completely nonsensical -  if h f(g(a),g(b)) = h(g(a)) + h(g(b)), for example as in h = length, f = concat, g makes a list or h = log, f = log (E^x)^y, g=E^x, but that's not the point I was making.

@Exactly, he says which operators are permitted so any others, such as increment, decrement are also permitted.

for(;y;y=(y&x^y)<<1)x^=y is 1 byte shorter :)

C - 38 bytes
main(){return printf("%*c%*c",3,0,4);}

I do cheat a bit here, the OP said to not use any math operators.
The * in the printf() format means that the field width used to print the character is taken from an argument of printf(), in this case, 3 and 4. The return value of printf() is the number of characters printed. So it's printing one ' ' with a field-width of 3, and one with a field-width of 4, makes 3 + 4 characters in total.
The return value is the added numbers in the printf() call.

You should make 3 and 4 parameters, and the function doesn't need to be main. Also, if you don't care what you print, you can replace one ' ' with 0 and omit the second.

Python - 49 bytes
Assuming input by placement in variables x and y.
from math import*
print log(log((e**e**x)**e**y))

This 61 byte solution is a full program:
from math import*
print log(log((e**e**input())**e**input()))

Considering that you did not ban exponentiation, I had to post this. When you simplify the expression using properties of logarithms, you simply get print input() + input().
This supports both negative and floating point numbers.
Note: I followed gnibbler's advice and split this answer into three. This is the Mathematica solution, and this is the TI-89 Basic solution.

I was trying to do something similar to that with javascript, but forgot what was the formula since it was some years from last time I saw it and was searching the internet to find it.

@Victor I created the formula on my own. I remember math very clearly.

Your Mathematica is very close, you just need to capitalize the built-in symbols. Log[Log[(E^E^x)^(E^y)]] works (23 characters, or 22 if you use @ notation for the outer function wrapping).

"If I am allowed to assume input by placement in variables x and y.." I think you can - others do so as well.

@MichaelStern: You can save two more characters by skipping the parentheses around E^y. Using Log[Log[(E^E^x)^E^y]] seems to work fine.

@MichaelStern What is this @ notation?

@Quincunx @ is Mathematica shorthand for the Apply command. Thus you can multiply two numbers in 18 characters with Apply[Times, {2, 3}], or in 12 characters with Times[{2, 3}] or, using @ notation, in 11 characters with Times@{2, 3} (or of course, in this trivial example, in three characters with 2*3).

@MichaelStern Does that mean that the Mathematica solution can become Log@Log[(E^E^x)^E^y]?

@Quincunx yes, Log@Log[(E^E^x)^E^y] for 20 characters.

JavaScript [25 bytes]
~eval([1,~x,~y].join(''))

Your answer looks bad (and downvote-attracting), but it is actually a nice answer. Please delete this one to get rid of the downvotes and repost this with some text explaining it. I will upvote your new answer.

Now it looks really good, I like it. Certainly is worth more upvotes.

GolfScript, 6 4 characters/bytes
Input in the form of 10, 5 (=> 15).
~,+,

The + is array concatenation, not addition.
How it works is that , is used to create an array of the length that the number is (0,1,...,n-2,n-1). This is done for both numbers, then the arrays are concatenated. , is used again for a different purpose, to find the length of the resulting array.
Now, here's the trick. I really like this one because it abuses the input format. It looks like it's just inputting an array, but really, since the input is being executed as GolfScript code, the first , is already done for me! (The old 6-character version was ~,\,+, with input format 10 5, which I shaved 2 chars off by eliminating the \, (swap-array)).
Old version (12):
Creates a function f.
{n*\n*+,}:f;

The * and + are string repetition and concatenation respectively, not arithmetic functions.
Explanation: n creates a one-character string (a newline). This is then repeated a times, then the same thing is done with b. The strings are concatenated, and then , is used for string length.

Does it work for negative numbers too?

@MichaelStern No, but that was never mentioned in the question. Hmm, I've added a comment. Most (in fact, all) of the other answers also assume positives.

See my Mathematica solution. In the right language, solutions for negative numbers are possible.

@MichaelStern LOL @ "right language" on this site of all places…

Mathematica, 21 bytes
There are a number of ways to do this in Mathematica. One, use the Accumulate function and toss everything but the final number in the output. As with my other solution below, I assume the input numbers are in the variables a and b. 21 bytes.
Last@Accumulate@{a, b}

More fun, though it is 45 characters, use the numbers to define a line and integrate under it.
Integrate[Fit[{{0, a}, {2, b}}, {x, 1}, x], {x, 0, 2}]

As a bonus, both solutions work for all complex numbers, not just positive integers as seems to be the case for some other solutions here.

I love the integration! (although, strictly speaking this adds up something). +1

The 1st solution is invalid. Quoting the author of the challenge: "Additionally, you can't use any built-in functions that are designed to replace those math operators.". I had given this solution: function _(){return array_sum(func_get_args());}. I had to take it down 'cause I couldn't find a short way to "fix" it.

@Ismael Miguel Accumulate[] is not designed to replace Plus. It happens to give the sum of a list of numbers among its outputs, and I take advantage of that.

But it does make the sum of all the elements in that list, right? If it does, in my opinion, it's as invalid as using array_sum() in php, which does the same exact thing.

@Ismael Miguel There exists a Mathematica function that sums an array, called Total[]. I agree it would be against the rules as specified to use that function, but I did not do so. The output of Accumulate[{a,b}] is not a+b.

C, 29 27 Bytes
Using pointer arithmetic:
f(x,y)char*x;{return&x[y];}

x is defined as a pointer, but the caller should pass an integer.
An anonymous user suggested the following - also 27 bytes, but parameters are integers:
f(x,y){return&x[(char*)y];}

The first form probably breaks badly if passing two ints on the now-common systems where int has 32 bits, and pointers have 64 bits. The second avoids that problem.

@hvd, Both work, at least on Linux 64bit. Integer parameters are extended to machine register size anyway.

Ah, fair enough, agreed that that'll likely be the common case. Will comment again if I can find a concrete example that doesn't work, though. :)

Brainf*ck, 9 36

,>,[-<+>]

++[->,[->>[>]+[<]<]<]>>>[<[->+<]>>]<

This works without using simple addition; it goes through and lays a trail of 1's and then counts them up
Note: The + and - are merely single increments and nothing can be done in brainf*ck without them. They aren't really addition/subtraction so I believe this still counts.

-1. This is simple addition. If you did something that is not addition, multiplication, etc, then it counts, but as is, this does not count.

@Quincunx I fixed it; i did it by goign through and leaving a trail of ones and then sweeping through and 'picking up' that trail

Reversed. Nice job.

J (6)
You didn't say we couldn't use the succ function:
>:@[&0

Usage:
   9>:@[&0(8)
17

It just does 9 repetitions of >: on 8.
The list concatenation approach works, too: #@,&(#&0). And - I know it's against the rules - I can't let this answer go without the most J-ish solution: *&.^ (multiplication under exponentiation).

Postscript, 41
We define function with expression 41 bytes long as:
/a{0 moveto 0 rmoveto currentpoint pop}def

Then we call it e.g. as:
gs -q -dBATCH -c '/a{0 moveto 0 rmoveto currentpoint pop}def' -c '10 15 a ='

Which gives
25.0

It easily handles negatives and floats, unlike most competitors:-)

bash, 20 chars
(seq 10;seq 4)|wc -l

Dash, 18 bytes
time -f%e sleep $@

Requires GNU time 1.7 or higher. Output is to STDERR.
Try it online!
Note that this will not work in Bash, since its builtin time command differs from GNU time.
At the cost of one additional byte, \time can be used instead of time to force Bash to use the external command.

what happens if one of the inputs is negative?

It fails. Just like all the other answers.

Drats! I hoped it gave the result before the question was asked.

Yeah.  I also was in high hopes that by inserting random sleep -3 I could speed up my programs.  What a let-down.

What a pity! I had the same solution without knowing the question and thought, I could search for the fitting question. Partly this solution is wasted, because it allows even addition of floats in the shell - there it is a real handy replacement for the feature blown bc. Of course it works, just a bit longer, in bash with the full path (/usr/bin/time on my system.)

@userunknown \time should work as well in Bash.

A great speedup :) (in typing).

Smalltalk (now seriously), 123 118 105(*)
Sorry for answering twice, but consider this a serious answer, while the other one was more like humor. The following is actually executed right at this very moment in all of our machines (in hardware, though). Strange that it came to no one else's mind...
By combining two half-adders, and doing all bits of the words in parallel, we get (inputs a,b; output in s) readable version:
  s := a bitXor: b.
  c := (a & b)<<1.

  [c ~= 0] whileTrue:[
     cn := s & c.
     s := s bitXor: c.
     c := cn<<1.
     c := c & 16rFFFFFFFF.
     s := s & 16rFFFFFFFF.
  ].
  s

The loop is for carry propagation.
The masks ensure that signed integers are handled (without them, only unsigned numbers are possibe).
They also define the word length, the above being for 32bit operation. If you prefer 68bit addition, change to 16rFFFFFFFFFFFFFFFFF.
golf version (123 chars) (avoids the long mask by reusing in m):
[:a :b||s c n m|s:=a bitXor:b.c:=(a&b)<<1.[c~=0]whileTrue:[n:=s&c.s:=s bitXor:c.c:=n<<1.c:=c&m:=16rFFFFFFFF.s:=s&m].s]

(*) By using -1 instead of 16rFFFFFFFF, we can golf better, but the code no longer works for arbitrary precision numbers, only for machine-word sized smallIntegers (the representation for largeIntegers is not defined in the Ansi standard):
[:a :b||s c n|s:=a bitXor:b.c:=(a&b)<<1.[c~=0]whileTrue:[n:=s&c.s:=s bitXor:c.c:=n<<1.c:=c&-1.s:=s&-1].s]

this brings the code size down to 105 chars.

This is code-golf, so golf your answer.

no chance to win, but I'll do it for you ;-)

Nice to see a Smalltalk answer!

APL, 8 and 12
Nothing new here, the array counting version:
{≢∊⍳¨⍺⍵}

and the log ○ log version:
{⍟⍟(**⍺)**⍵}

I just thought they looked cool in APL!
{≢     }       count
  ∊            all the elements in
   ⍳¨          the (two) sequences of naturals from 1 up to
     ⍺⍵        both arguments

{⍟⍟        }   the double logarithm of
   (**⍺)       the double exponential of ⍺
        *      raised to
         *⍵    the exponential of ⍵

To be fair, everything looks cool in APL.

You could make the first one a tacit prefix function for 5: ≢∘∊⍳¨

@Adám Yes, but I don't like tacit functions and I find them difficult to read.

@Tobia Maybe you don't like them because you find them difficult to read? I'm running a workshop on that… Have you seen my lesson on it?

@Adám cool, thank you! Will check it out.

@Adám Did check it out. My main gripe remains: trains are not legible. With traditional style, you can understand an expression incrementally as you read it, both left to right: ≢∊⍳... means "number of elements in the sequences..." and right to left: ...⍳¨⍺⍵ means "first generate sequences from ⎕IO to ⍺ and ⍵, then..." But with trains, you cannot begin to understand the expr until you have finished understanding every symbol in it and created the entire syntax tree in your mind, because a single mistake in the rightmost corner could (and does) shift the meaning for the entire train

sed, 359 bytes (without the fancy formatting)
Sorry for the late answer, and probably the longest answer here by far.  But I wanted to see if this is possible with sed:
                       s/([^ ]+) ([^ ]+)/\1:0::\2:/
                       :d /^([^:]+):\1::([^:]+):/tx
                       s/(:[^:]*)9([_:])/\1_\2/g;td
s/(:[^:]*)8(_*:)/\19\2/g;s/(:[^:]*)7(_*:)/\18\2/g;s/(:[^:]*)6(_*:)/\17\2/g
s/(:[^:]*)5(_*:)/\16\2/g;s/(:[^:]*)4(_*:)/\15\2/g;s/(:[^:]*)3(_*:)/\14\2/g
s/(:[^:]*)2(_*:)/\13\2/g;s/(:[^:]*)1(_*:)/\12\2/g;s/(:[^:]*)0(_*:)/\11\2/g
                       s/:(_+:)/:1\1/g; y/_/0/; # #
                       bd;  :x  s/.*::([^:]+):/\1/;
                       # # # # # # #  # # # # # # #

This is similar to https://codegolf.stackexchange.com/a/38087/11259, which simply increments numbers in a string.  But instead it does the increment operations in a loop.
Input is taken from STDIN in the form "x y".  That is first transformed to "x:0::y:".  Then we increment all numbers that come after ":" characters, until we get "x:x::(x+y):".  Then we finally return (x+y).
Output
$ printf "%s\n" "0 0" "0 1" "1 0" "9 999" "999 9" "12345 67890" "123 1000000000000000000000"  | sed -rf add.sed
0
1
1
1008
1008
80235
1000000000000000000123
$

Note that this only works for the natural numbers.  However (in theory at least) it works for arbitrarily large integers.  Because we are doing x increment operations on y, ordering can make a big difference to speed: x < y will be faster than x > y.

Javascript (67)
There is probably much better
a=Array;p=Number;r=prompt;alert(a(p(r())).concat(a(p(r()))).length)

You shouldn't give a definitive answer without knowing if it needs floats or not. And it wont handle NaN's. But its quite a nice code!

I think all the joins are unnecessary.  The Array constructor makes an array of undefineds, which can be counted: a=Array;p=parseInt;r=prompt;alert(a(p(r())).concat(a(p(r()))).length)

@BenReich, you're right, thanks

@Michael Also, the Number constructor saves 2 characters over parseInt

@Michael Also, if you remove the alert, the output would still go to the console, but that makes the answer a little bit less fun.  You could also reuse the prompt variable instead of alert, (the constructor alerts the argument with the prompt).  Anyway, nice answer!

@Michael, Agree with the others, nice approach! One note, you can use |0 instead of using the Number constructor to save a few bytes: r=prompt;alert(Array(r()|0).concat(Array(r()|0)).length)

Ruby, 18 chars
a.times{b=b.next}

And two more verbose variants, 29 chars
[*1..a].concat([*1..b]).size

Another version, 32 chars
(''.rjust(a)<<''.rjust(b)).size

Ruby 39
f=->a,b{[*1..a].concat([*1..b]).length}

C# - on the fly code generation
Yeah, there is actually an addition in there, but not the + operator and not even a framework function which does adding, instead we generate a method on the fly that does the adding.
public static int Add(int i1, int i2)
{
    var dm = new DynamicMethod("add", typeof(int), new[] { typeof(int), typeof(int) });
    var ilg = dm.GetILGenerator();
    ilg.Emit(OpCodes.Ldarg_0);
    ilg.Emit(OpCodes.Ldarg_1);
    ilg.Emit(OpCodes.Add);
    ilg.Emit(OpCodes.Ret);
    var del = (Func<int, int, int>)dm.CreateDelegate(typeof(Func<int, int, int>));
    return del(i1, i2);
}

K, 2 bytes
#&

Usage example:
  #&7 212
219

Apply the "where" operator (monadic &) to the numbers in an input list (possibly taking liberty with the input format). This will produce a list containing the first number of zeroes followed by the second number of ones:
  &3 2
0 0 0 1 1

Normally this operator is used as a "gather" to produce a list of the indices of the nonzero elements of a boolean list, but the generalized form comes in handy occasionally.
Then simply take the count of that list (monadic #).
If my interpretation of the input requirements is unacceptable, the following slightly longer solution does the same trick:
{#&x,y}

Python -- 22 characters
len(range(x)+range(y))

I think that counts as addition?

it's concatenation

I get TypeError: unsupported operand type(s) for +: 'range' and 'range' on Python 3. However, this works on Python 2 and Python 1, so if you change the title to Python 2 or Python <=2 it should be fine.

TI-BASIC, 10
Adds X and Y
ln(ln(e^(e^(X))^e^(Y

You sure know how to copy solutions: http://codegolf.stackexchange.com/a/21033/9498

First, this doesn't work because it uses log( instead of ln(. Second, it is actually ten bytes if written in the form ln(ln(e^(e^(X))^e^(Y.

R 36
function(x,y)length(rep(1:2,c(x,y)))

where rep builds a vector of x ones followed by y twos.

You can make a program that does the same a bit shorter: length(rep(1:2,scan()))

Thanks to Michael Stern for teaching me Mathematica notation.
Mathematica - 21 20 bytes
Log@Log[(E^E^x)^E^y]

This uses the same approach as this solution, but it is in Mathematica to make it shorter. This works for negative and floating point numbers as well as integers in x and y.
Simplifying the expression using log rules yields x+y, but this is valid since it uses exponentiation, not one of the 4 basic operators.

Are you sure it works for complex numbers?

TI Basic 89 - 19 bytes
Run this in your TI-89 (Home screen or programming app):
ln(ln((e^e^x)^e^y))

This uses log rules to compute x+y, just like in this solution. As a bonus, it works for decimal and integer numbers. It works for all real numbers. If the logarithm rules are still valid with complex exponents, then this works for complex numbers too. However, my calculator spits out junk when I try to insert complex exponents.

Isn't ln 1 byte in TI Basic? Also, you can drop the closing parentheses, bringing this down to 15 bytes.

C# - string arithmetics
We convert both numbers to strings, do the addition with string cutting (with carry and everything, you know), then parse back to integer. Tested with i1, i2 in 0..200, works like a charm. Find an addition in this one!
public static int Add(int i1, int i2)
{
    var s1 = new string(i1.ToString().Reverse().ToArray());
    var s2 = new string(i2.ToString().Reverse().ToArray());
    var nums = "01234567890123456789";
    var c = '0';
    var ret = new StringBuilder();
    while (s1.Length > 0 || s2.Length > 0 || c != '0')
    {
        var c1 = s1.Length > 0 ? s1[0] : '0';
        var c2 = s2.Length > 0 ? s2[0] : '0';
        var s = nums;
        s = s.Substring(int.Parse(c1.ToString()));
        s = s.Substring(int.Parse(c2.ToString()));
        s = s.Substring(int.Parse(c.ToString()));
        ret.Append(s[0]);
        if (s1.Length > 0)
            s1 = s1.Substring(1);
        if (s2.Length > 0)
            s2 = s2.Substring(1);
        c = s.Length <= 10 ? '1' : '0';
    }
    return int.Parse(new string(ret.ToString().ToCharArray().Reverse().ToArray()));
}

C (79)
void main(){int a,b;scanf("%d%d",&a,&b);printf("%d",printf("%*c%*c",a,0,b,0));}

APL: 2
1⊥

This converts the numbers from base 1, so (n*1^1)+(m*1^2) which is exactly n+m.
Can be tried on TryApl.org

Pyth, 29 bytes
AQW!qG0=k.&GH=HxGH=k.<k1=Gk)H

Try it online!
My first submission here!
This compiles to:
assign('Q',eval_input())     # Q
assign('[G,H]',Q)            #A
while Pnot(equal(G,0)):      #  W!qG0
  assign('k',bitand(G,H))    #       =k.&GH
  assign('H',index(G,H))     #             =HxGH  (index in this case is XOR)
  assign('k',leftshift(k,1)) #                  =k.<k1
  assign('G',k)              #                        =Gk)
imp_print(H)                 #                            H

Welcome to the site!

PowerShell, 22 bytes
($args|%{,1*$_}).Count

Try it online!
Where * is an repeat element operator.

Python 3, 38 bytes
f=lambda a,b:b and f(a^b,(a&b)<<1)or a

Try it online!
Uses bitwise operations recursively to work out the sum.
Works with some negative numbers (works as long as both are positive, or their sum is less than zero).

Vyxal, 8 6 bytes
ẋ??ẋJL

Try it Online!
I can't get base-1 to work.
-2 thx to lyxal

6 bytes

Perl, 23
Since the question does not specify input types and formats, we assume that the input will be natural numbers in the unary number system.
chop($s=<>);print $s.<>

For example, if we are to sum 2 (in base 10) and 3 (in base 10), we input 11 and 111 and we  get 11111.

Python 16 (Using Cheat)
print sum((a,b))

Python 36 (Using Tricks)
print len("%%0%dd%%0%dd"%(5,7)%(0,0))

Perl 28
print length('0'x$a.'0'x$b);

you could save a few bytes with: print length 1x<>.1x<> you might even want to use -E and say to save two more :)

Javascript - 43, 39, 13 and 4 characters

The second number must be integer and non-negative.
The first number can be negative or not an integer.

If the code must take the input and show output, here it is, in 43 characters:
a=prompt,x=a(),y=a();while(y--)x++;alert(x)

But if the code need not take input and output, and just a function that does the sum in needed, then we can do in 39 characters:
function s(x,y){while(y--)x++;return x}

But if you just need an instruction to add two variables x and y (and don't bother in destroying the original value of both), here it is in 13 characters:
while(y--)x++

And, as suggested by @Ismael Miguel (althought he was not exactly suggesting this), by really abusing the rules underspecification, we can note that only +, -, * and / operators were forbidden, but += was not, so it is allowed (it is not a built-in function either, since it is not even a function). This way, we can express the instruction with just 4 characters (and it will always work with negatives and non-integers too for both values):
y+=x

Those use the + and - operators. y-- is the same as y=y-1 and x++ is the same as x=x+1.

@IsmaelMiguel No, the increment and the decrement are not the same as the adding and subtracting operators. Just because x++ happens to do the same as x=x+1 it does not makes it be a form of the + operator. Ditto for --.

Just read what you said... Then i could just do (function(a,b){return a+=b;})(1,2); cause this is the same as the increment and decrement operator with a defined step.

@IsmaelMiguel See this: http://www.ecma-international.org/ecma-262/5.1/#sec-11.3.1 [[... ++ is evaluated as follows ... using the same rules as for the + operator]], this implies that ++ is not the same operator as +. And although you are trying to prove by contradiction, it happens that += is not the same as + either, and thus is allowed (regardless of it being a increment with defined step or not). Reread the question, it just forbid the +,-,*,/ operators, and += and ++ are not within those.

And by the way, in mathematics addition is normally defined in terms of the successor function/operation, and not the other way around.

I also think, this is slightly unfair, and I would see += as "syntactic sugar" for the + function. Also, when arguing with succ/pred, then I'd go for peano numbers.

I love it when people are bitching about the rules and are searching for greyzones. It's a sign of missing honor, even when it's just to show the author to correct them, you could simply say him to correct them, instead of writing stupid answers.

PHP
This function works recursively for positive interger values for x and y.
function plus($x,$y) {
    return $x?ceil(plus(--$x,$y).".1"):$y;
}

The result of
echo plus(3,4);

is
7

you are using the - operator.

JavaScript [32 bytes]
Array(a).concat(Array(b)).length

This code adds two non-negative variables a and b. Test in any browser console.

Or more interactive in 54 bytes: p=prompt,alert(Array(+p()).concat(Array(+p())).length).

K, 11
{#,/!:'x,y}

Creates two vectors of length x and y (the two inputs), raze into a single list and then get the length.

You can avoid the need to raze if you use "where"- check out my K solution!

x86 machine code (32 bit): 3 bytes
here provided in hexadecimal form for ease of reading:
8d 04 18

(no, it's not add eax,ebx)

Assembly (x86),
Taking a shot at this, not sure if it breaks rule 2 set by the question.
First, assume input 1 was loaded into %eax, and input 2 was loaded into %ecx
leal    (%eax, %ecx), %eax

EDIT: apparently the scale defaults to one, so I'll just take that off there.

Well, it looks like we had the same idea =)

@MatteoItalia it's only 2 bytes in x86-16: 8D 00 -> LEA AX, [BX][SI] with input as BX and SI, output is AX.

Maxima, 12
[a,b].[1,1];

I just made use of the dot operator to multiply matrices. In this case I get the inner product of the vectors (a,b) and (1,1) which is of course a+b.

Excel - 31
(presuming numbers in cells A1 and A2)
=LEN(REPT("X",A1)&REPT("X",A2))

The digital equivalent of counting on fingers. :)

Prolog (SWI), 49 bytes
s(0,Y,Y).
s(X,Y,S):-succ(W,X),s(W,Y,R),succ(R,S).

Defines a predicate s that takes in the two numbers and unifies the result with its third argument (which is the standard way of "returning" a value in Prolog). On Linux, put the code in a file and pass it to swipl -qs; then enter queries at the prompt. Sample run:
dlosc@dlosc:~/golf$ swipl -qs addWithoutAdding.prolog
?- s(3,5,X).
X = 8 .

?- s(14,42,X).
X = 56 .

This actually seems like a fairly Prolog-ish way to do addition--the language does have arithmetic operations, but they've always felt bolted-on to me.

If the first argument is 0, unify the result with the second argument.
Otherwise, let W be the predecessor of X (the succ predicate can go either direction), let R be the result of adding W and Y, and let S be the successor of R.

Because of how succ works, only nonnegative integers are supported.

Python 3, 46 Bytes
def s(a,b):
 for i in range(b):a=-~a
 return a

Ruby, 41 20 bytes
->a,b{(-a...b).size}

Try it online!

SmileBASIC, 55 bytes
INPUT A,B
SPSET.,0SPROT.,A
SPANIM.,12,1,B
WAIT?SPROT(0)

Doesn't use any mathematical or string functions
Explained:
INPUT A,B 'input
SPSET 0,0 'create sprite 0 with definition 0
SPROT 0,A 'set the angle of sprite 0 to A degrees
SPANIM 0,"R+",1,B 'rotate sprite 0 by B degrees relative to its current rotation
WAIT 'wait 1 frame so sprite can update
PRINT SPROT(0) 'output the angle of sprite 0

Octave, 62 39 37 bytes
@(a,b)fix(toc(tic,pause(a),pause(b)))

Unsigned integers only.
Try it online!
-2 thanks to @MarcinKonowalczyk

37! ^_^ Also, using different method, 36! I really, really like the rounding of the timer though!

Jelly - 2,4 bytes
‘¡

If we're allowed to increment, then this increments x y times.
,RFL

,R create a nested list [[1,2,...,x],[1,2...,y]].
FL flatten the list and count the elements to get your number.

PowerShell, 31 bytes
param($a,$b)(,1*$a+,1*$b).Count

Try it online!
The + and * are not arithmetic signs, but array concatenation and element repetition operators respectively. Big thanks to @mazzy for handling 0.

Keg -hr, 10 bytes
(2|(¿|0))!

Try it online!
Places a whole bunch of 0's onto the stack, and then prints the length of the stack. It then uses the hr flag to print the top of the stack raw.

MarioLANG, 31 bytes
;
)
;
>[!(
"=#:
  -
) (
!+<
#="

Try it online!
Note: + and - are INCREMENT and DECREMENT respectively, NOT addition and subtraction.

Python 48 47 Bytes
print(len({*range(x)}|{(j,)for j in range(y)})

Does not use +, even as concat. 41 40 without print.
Removed space before for thanks to user8397947.

Welcome to the site.  You don't need the sapce between ) and for.

Excel, 29 bytes
=LEN(CONCAT(REPT("x",A1:A2)))

Creates two strings of "x" repeated A1 and A2 times; concatenates the two strings and returns the length of the concatenated string.  No built-in sum or sum-like functions.

Javascript/JScript 78 76 bytes:
I know this is a long answer, but here is another approach:
function(a,b,c,d,l){c=[],d=[];c[l='length']=a+!!a,d[l]=b+!!b;return(c+d)[l]}
How this works:
It creates 2 arrays with size a+!!a and b+!!b.
I know it has the + in there, but it is 'adding' a Number with a Boolean value.
Basically, it isn't an arithmetic operator anymore!
In the return, it will convert both arrays to string and concatenate them.
To run this, just wrap it in (), add (n1,n2) to the end and you will have the result.
Notice:
It CANNOT handle negative numbers, NaN, Infinity and other non-numeric inputs.

I liked it. Your answer is no less abusing than mine, since a+!!a is an increment form and you are actually using the + operator, just abusing its semantics of automatic coercing of boolean to number to argue that it is not an arithmetic operator anymore.

Save 6 chars: Instead of _(a,b,c,d,l), use just _(a,b).

I can save 6 chars and have a hole in the function. I prefer to do it "right". And i just noticed now that i can cut 2 chars. And yes, you are right, I'm using the + operator, but it isn't arithmetic. And yes, I'm "abusing" the semantics and internal type casting and all those "goodies" of scripting languages.

“Basically, it isn't an arithmetic operator anymore!” Yeah, it is. Almost unarguably.

Not really. It's Number+Boolean. Try writing this in a math test: '0=a*False'.

int Ad(int a,int b){while(b){int c=a & b;a=a ^ b;b=c<<1;}return a;}

This is [tag:code-golf], you are supposed to make the code as short as possible, try removing the whitespace, for instance.

Objective-C - Base 1 & Base 10
Actually a fun little project... converted everything to base-1 then just made it a string and took the length. In base one everything is zeros so 5 would be 00000 and 3 would be 000 so I just made two strings of the input in base-one, appended the strings, then printed the length of the string (which converts base 1 to base 10)
Assuming positive integers for inputs *(Note: calculation takes as many seconds as the sum of the integers inputted)

Golf version (644 characters):
int i1=#;int i2=#;NSString *h;BOOL f1;BOOL f2;[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(a1) userInfo:nil repeats:i1];[NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(a2) userInfo:nil repeats:i2];[NSTimer scheduledTimerWithTimeInterval:i1 target:self selector:@selector(s1) userInfo:nil repeats:0];[NSTimer scheduledTimerWithTimeInterval:i2 target:self selector:@selector(s2) userInfo:nil repeats:0];-(void)a1{h=[h stringByAppendingString:@"0"];}-(void)a1{h=[h stringByAppendingString:@"0"];}-(void)s1{f1=1;[self p];}-(void)s2{f2=1;[self p];}-(void)p{if((f1)&&(f2)){NSLog(@"%i",h.length);}}

Understandable version (1210 characters):
int input1 = #;//these can be any positive integer
int input2 = #;//these can be any positive integer
NSString *holder = @"";
BOOL finishedAddingFirst = NO;
BOOL finishedAddingSecond = NO;

[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(addFirst) userInfo:nil repeats:input1];
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(addSecond) userInfo:nil repeats:input2];
[NSTimer scheduledTimerWithTimeInterval:input1 target:self selector:@selector(stopAddingFirst) userInfo:nil repeats:0];
[NSTimer scheduledTimerWithTimeInterval:input2 target:self selector:@selector(stopAddingSecond) userInfo:nil repeats:0];

-(void)addFirst {
    holder = [holder stringByAppendingString:@"0"];
}
-(void)addSecond {
    holder = [holder stringByAppendingString:@"0"];
}

-(void)stopAddingFirst {
    finishedAddingFirst = YES;
    [self printFinalAnswer];
}
-(void)stopAddingSecond {
    finishedAddingSecond = YES;
    [self printFinalAnswer];
}

-(void) printFinalAnswer {
    if ((finishedAddingFirst) && (finishedAddingSecond)) {
        NSLog(@"Base-One Sum: %@", holder);
        int output = (int)[holder length];
        NSLog(@"Base-Ten Sum: %i", output);
    }
}

I took this route as well. Converting to base one was pretty fun, but I used * instead of numbers and at the end I counted the number of * to get my number. Just concentrated the strings, and bam!

AutoHotkey - 54 Bytes
This accepts two command line parameters and outputs the result as an error message.
For each command line parameter, it runs a loop with that number and in each iteration, it concatenates one character to a string, then it outputs the length of the string.
It outputs it as an error message because the command to throw an error message is shorter than the commands that show a message box or send something to standard output.
a=a
loop,%1%
b.=a
loop,%2%
b.=a
throw % StrLen(b)

F# - 36
(String('a',a)+String('b',b)).Length

The + here is not addition, but string concatenation.

Batch - 71 bytes
For every iteration of a for loop, which will count to each inputted number, this outputs a . to a file named f. It then uses find to count the number of appearances of ..
@(for %%a in (%1 %2)do @for /l %%b in (1,1,%%a)do.)>f 2>e&@find/c"." f

-
h:\MyDocuments\uprof>test.bat 2 4

---------- F: 6

Old Method - 157 bytes
@setLocal enableDelayedExpansion&for /L %%a in (1,1,%1)do @set o=!o!.
@for /L %%b in (1,1,%2)do @set o=!o!.
@set/p"=%o%"<nul>f&for %%c in (f)do @echo %%~zc

This will take two values as input, count up to them, creating a variable that is the length of the two values added, then output that to a file (using set /p trick instead of echo to avoid a carriage return, which would add an extra two bytes), then gets the size of the file in bytes, which will be the sum of the two input values.
H:\uprof>test.bat 2 3
5

H:\uprof>test.bat 25 112
137

Go [43 bytes]
len(append(make([]int,a),make([]int,b)...))

Perl, 38 chars
for(0..1){push @a,0for(1..<>)}print~~@a

Ruby 49 47
a=gets;b="";gets.to_i.times{b+=".succ"};eval(a+b)

a=gets;b=gets;a.to_i.times{b+=".succ"};eval(b)

C, 14 bytes
while(x--)y++;

Avoids +, -, * and /.
Note that ++ and -- compile to machine code for INCR and DECR, so there is no addition or subtraction.

Not novel: http://codegolf.stackexchange.com/a/21029/3755

@victor I did not copy your answer. Actually my answer is in C. It is 1 byte longer than yours.

JAVA, 79 bytes
int Add(int x, int y){while (y != 0){int carry=x&y;x=x^y;y=carry<<1;}return x;}

Python (36)
I think I'll switch to this for daily use , it's very efficient.
c=range(a);c.extend(range(b));len(c)

Python, 118
This uses a binary approach. I didn't really try to golf it as much as I tried to make it interesting; I've already built binary addition in Minecraft in an 8x3x5 space per bit (!!!) and wanted to compare.
r,c="",0
if b>a:a,b=b,a
while a:
 a,b,e,d=a>>1,b>>1,a%2,b%2
 r=str(e^d^c)+r;c=(c&d)|(c&e)|(d&e)
r=int(str(c)+r,2)

Thanks to @Sp3000 for shaving off about 50 chars and getting it to actually work in the chat ;D

Python 3, 27 bytes
len("".join(["."*x,"."*y]))

where x is input 1 and y is input 2
(Okay, okay fine it's really 49 bytes including "true code":
len("".join(["."*int(input()),"."*int(input())]))

Note that * is for string duplication, although that might be a "standard operator"

Dart - 30
s(a,b)=>a>0?s((a&b)<<1,a^b):b;

After writing this, I realized it was equivalent to the JavaScript solution already posted above - and because Dart has bignums, not just int32, it doesn't work for negative numbers. So, not a big win :(
Termination can be proven by seeing that the number of bits in a and b together reduces for each iteration until a becomes zero.

X86 (2)
rep movb  two bytes f3 A4,
adds ecx to esi (and to edi)  result in esi
but has side-effects if ds:esi != es:edi

Microscript, 9 bytes
A variant of the array concatenation solution (although this one uses a stack.)
ics]ics]#
Technically not a valid competing entry, however; as the language is too new.
Requires that both inputs be nonnegative.

A seven-byte version using a new command added shortly after I originally posted this:
i$si$s#

Python 2, Python 3, 41 bytes
i,j=input(),input()
while j>0:i=-~i;j=~-j

If using the - number operator is allowed.

Python 2, Python 3, 40 bytes
i,j=input(),input()
while j>0:i=-~i;j-=1

If using the - number and literal -= number operators is allowed.

Works on positive integers. Takes a and b and prints a+b.

Java, 85 bytes
import java.math.*;class a{BigInteger A(BigInteger b,BigInteger B){return b.add(B);}}

BigInteger isn't located in java.lang, java.util, java.io (is it even possible for a numeric type to be related to I/O?) or their subpackages, so its add method doesn't count as a language feature. Problem?

PHP, 91 78 51 bytes
bit logic and shifting ... what else?
function p($x,$y){return$y?p($x^$y,($x&$y)<<1):$x;}

also works for negative integers

Haskell, 25 bytes
n+m=length$[1..m]++[1..n]

We can no longer use the old +? No problem, we can just define a new one. This approach doesn't work with negative numbers, I have yet to figure out something else for them.

R, 80 bytes
Went for a recursive function doing bit operations.
f=function(a,b){d=bitwXor(a,b);e=bitwShiftL(bitwAnd(a,b),1);ifelse(!e,d,f(d,e))}

Ungolfed:
f=function(a,b){
    d=bitwXor(a,b)            # xors a and b.(tells us bits that are 1 in end)
    f=bitwAnd(a,b)            # tells us which bits need to carry over 1
    e=bitwShiftL(e,1)         # carries those bits over
    if (e==0) d else f(d,e)   # if carried nothing, return xored bits.
}                             # otherwise, recursively call fn on xored and
                              # carried bits.

It would have been shorter -- but R really does not intend for bit operations.

Turing Machine Code, 1184 bytes
A golfed version of a machine I posted to my googology wiki user blog a while ago. Supports signed ints. Try it online!
0 _ * l B
0 - * r AAA
0 * * r *
B 0 9 l *
B 9 8 r C
B 8 7 r C
B 7 6 r C
B 6 5 r C
B 5 4 r C
B 4 3 r C
B 3 2 r C
B 2 1 r C
B 1 0 r C
B _ * r AA
B * * * AA
C _ * r D
C * * r *
D _ * l E
D - * r 8
D * * r *
E 0 1 l F
E 1 2 l F
E 2 3 l F
E 3 4 l F
E 4 5 l F
E 5 6 l F
E 6 7 l F
E 7 8 l F
E 8 9 l F
E 9 0 l *
E _ * r S1
E M * r S1
F _ * l B
F * * l *
AA _ * r BB
AA * _ r *
BB M - * halt
BB * * * halt
S1 0 1 r S0
S0 0 0 r S0
S0 _ 0 * F
AAA 0 9 l *
AAA 9 8 r BBB
AAA 8 7 r BBB
AAA 7 6 r BBB
AAA 6 5 r BBB
AAA 5 4 r BBB
AAA 4 3 r BBB
AAA 3 2 r BBB
AAA 2 1 r BBB
AAA 1 0 r BBB
AAA _ * r BB
AAA * * * BB
BBB _ * r CCC
BBB * * r *
CCC _ * l DDD
CCC - * * ZZZ
CCC * * r *
DDD 9 8 l EEE
DDD 8 7 l EEE
DDD 7 6 l EEE
DDD 6 5 l EEE
DDD 5 4 l EEE
DDD 4 3 l EEE
DDD 3 2 l EEE
DDD 2 1 l EEE
DDD 1 0 l EEE
DDD 0 9 l *
DDD _ * r FFF
EEE _ * l *
EEE * * * AAA
FFF _ * * GGG
FFF * _ r *
GGG _ * l *
GGG * * * HHH
HHH 0 1 * halt
HHH 1 2 * halt
HHH 2 3 * halt
HHH 3 4 * halt
HHH 4 5 * halt
HHH 5 6 * halt
HHH 6 7 * halt
HHH 7 8 * halt
HHH 8 9 * halt
HHH 9 0 l *
8 _ * l 9
8 * * r *
9 9 8 l F
9 8 7 l F
9 7 6 l F
9 6 5 l F
9 5 4 l F
9 4 3 l F
9 3 2 l F
9 2 1 l F
9 1 0 l F
9 0 9 l *
9 * * * FFF
ZZZ * M r E

can't you use shorter state names :|

Julia, 29 bytes
a$b=next(countfrom(a,b),a)[2]

Julia has iterators that can count up by an arbitrary amount at a time. It's usually used to create arithmetic sequences, but it can be definitely pressed into service as a ersatz adder.

Java 8, 42 bytes
(x,y)->{for(int c;y!=0;c=x&y,x^=y,y=c<<1);return x;};

Try it online!
Based on https://www.geeksforgeeks.org/add-two-numbers-without-using-arithmetic-operators/

Python 2 & 3, 39 30 bytes (function)
lambda x,y:eval("-~"*x+str(y))

Try it online!
The -, * and + are negation, string repetition and string concatenation respectively, not mathematical operators.
Explanation
-~y effectively increments y, so doing -~-~...-~-~y x times increments y x times.

These two are just for fun c:
Python 2, 54  45 bytes (program)
x,y=input(),str(input());print eval("-~"*x+y)

Python 3, 55 46 bytes (program)
x,y=int(input()),input();print(eval("-~"*x+y))

while i was writing that i realized it doesn't work for negative numbers, is that a problem?

@A_ oh i was thinking about doing that but i ruled it out pretty quickly because i thought the - counted as a mathematical operator; ill edit it

The unary - is a negation operator, and I don't think that counts as a math operator.

W, 6 5 bytes
1.MJk

Explanation
  M   % Map the (implicit) input with ...
1.    % generate a list with this length
   J  % Join the array (NOT using the error-proof apply addition.)
    k % Find the length of the array

APL (Dyalog Classic), 3 bytes
Good ol' base 1...
1⊥⎕

Try it online!
Explanation
  ⎕ Take an input
1⊥  Convert from base-1

APL (Dyalog Classic), 4 bytes
≢⎕/1

Try it online!

05AB1E, 2 bytes
Nothing really new. All three are programs are already done in other languages, and simply ported to 05AB1E. Just like all other answers, it assumes positive integers are used.
Convert the (implicit) input-pair from base-1 to an integer:
1β

Try it online.
Loop the first (implicit) input amount of times, and increment that second (implicit) input by 1 each iteration:
F>

Try it online.
(3 bytes) Convert both values in the (implicit) input-pair to a list in the range [1,value]; flatten the list; and take the total length:
L˜g

Try it online.

Excel, 15
This should fit the bill, but it's boring.
=SUMPRODUCT(1:1

Inputs go anywhere in row 1.
Assuming just SUM()/SUMIF() is cheating. I'd say it's not, technically, as it's more capable than the + operator (for one thing 1+"" gives an error), but I'm guessing people won't like that.
Other solutions
Regular formula, 15

=SUBTOTAL(9,1:1. This is shorter than the AGGREGATE() way.

Matrix Multiplication, 19

Inputs are A1, B2
Set cell A2 to 1
=MMULT(A1:B1,B1:B2

Octave, 36 bytes
@(a,b)size(conv2(eye(a),eye(b)),1)+1

Try it online!

Pascal, 9 B
In Extended Pascal (ISO standard 10206) the built‑in succ and pred functions accept a second argument.
To calculate the sum of two integral values write:
succ(x,y)

“But!” you will say:

Additionally, you can't use any built-in functions that are designed to replace those math operators.

succ and pred are not designed to replace +/-.
You can write
program sucks;
type
    enumeration = (a, b, c);
var
    x: enumeration value a;
begin
    x := succ(x, 2);
    { x is now c }
end.

but
    x := x + 2;

is illegal.
Therefore, succ is not a substitute for +, neither is pred a replacement for −.
Moreover, succ and pred will refuse operating on real values.

Japt, 2 bytes
Takes input as an array and simply converts it from base-1.
ì1

Try it

C (gcc), 34 bytes
f(a,b){a=a&b?f(a^b,(a&b)<<1):a^b;}

Try it online!
A probably cheating 13-byte version (from @dave's Java submission):
f(a,b){a+=b;}

Try it online!

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Cubify This! A lesson in grayscale... er... color... er... whatever
Being a big fan of the Rubik's cube and of cool art, I've been working on combining the two together to do some really cool stuff. Basically solving miniature Rubik's cubes to form rudimentary pixels in the formation of Rubik's cube art. Examples of such art can be seen via this link: http://google.com/search?q=rubik%27s+cube+art
Now, the purpose of this Code Golf is to create code that accepts an image as input, and then converts it in the following manner:
The image is initially reduced to web-safe grayscale colors. The reason behind this is because we need to isolate the web-safe grayscale palette (i.e. 000000, 333333, 666666, 999999, CCCCCC, and FFFFFF). An algorithm on the colorimetric method of converting to grayscale is available at: http://en.wikipedia.org/wiki/Grayscale#Colorimetric_.28luminance-preserving.29_conversion_to_grayscale, should you wish to use that as inspiration.
One would then render out the grayscale to the appropriate colors. To break it down quickly:
000000 will refer to Rubik's blue, 333333 will refer to Rubik's red, 666666 will refer to Rubik's green, 999999 will refer to Rubik's orange, CCCCCC will refer to Rubik's yellow, and FFFFFF will refer to Rubik's white.
I would rather that your resulting code can render from the photo's palette straight to Rubik's colors. The two-stage method from converting to web-safe grayscale and then to the corresponding Rubik's palette is just to give you an idea on the logic behind the process, but if it is easier for you to do this, by all means do so.
The actual RGB values for the Rubik's palette must correspond to the following:

Red: #C41E3A
Green: #009E60
Blue: #0051BA
Orange: #FF5800
Yellow: #FFD500
White: #FFFFFF

To give you an example, I have cropped Abraham Lincoln's head from the following picture: , and rendered the algorithm to produce the following:

The grid is there so that you can see how each individual miniature Rubik's cube would have to be configured to make up the image. The true size of the resulting image is 45 pixels by 45 pixels, meaning (45/3) * (45/3) = 15 * 15 = 225 miniature Rubik's cubes would be used to make this image. I am not expecting you to present the resulting image with a grid as I have.
So this is what's required:

The image to be processed by this algorithm must be x pixels wide by y pixels high, such that x and y are multiples of 3. This is to aid with the ease of rendering as part of a Rubik's cube mosaic. If your image is quite large, reducing it to something around the 45 x 45 to 75 x 75 or thereabouts in dimensions prior to processing is advised. Bear in mind, this resizing component is OPTIONAL.
The image needs to be converted to the sextacolored Rubik's cube palette to create the mosaic.
The resulting image needs to be a valid graphic file after processing. To prove your code works, run it against an image of one of the presidents of the United States of America, or a well known Hollywood celebrity. I have already used Abraham Lincoln in my example, so this president can no longer be used. Ensure that you provide the language you have used, the byte count as well as the president/celebrity used to test your code, including before and after shots...
Each entry must have a unique president/celebrity as their test case. I will not accept duplicates. This will ensure that duplicate results are not used to test different code entries. It's all very well to say that your code works, it's another thing to prove it.

5. Shortest code wins.
I'm changing this to a popularity contest... I'd rather see who can do this without having to compete on byte count... So I'll award this along with a bounty after the 28th of February, 2014.

I think it would be better if you'd add the Rubik RGB values to the post instead of relying on a link.

Does "image to be processed must be x pixels wide by y pixels high" mean that resizing is part of code or that image is pre-processed to required size?

Are there any impossible states of a Rubik's Cube if you only constrain one face?

An extra addition would be to make all the cubes solvable

@SztupY Done, I didn't think you were the type of coder who would be too busy to click on an extra link though...?

@VadimR You need to take the entire sentence into context... The image needs to have dimensions which are multiples of 3... Resizing is optional...

@NickT Could you elaborate on that? I'm trying to understand the relevance...

@TheDoctor There have been a few questions on CodeGolf.SE that deal with the solving of cubes... But the rule of thumb with Rubik cube art is that by general rules all 3x3 configurations displayed when you cubify an image are solvable. But we'll leave that for another question altogether... ;)

@WallyWest You would LOVE my app MineCam, it does this, but rather than making squares, it uses mine craft blocks, and it also does it 15 times per second with the real time iPhone camera, thus converting the whole world around you into a mine craft universe. https://itunes.apple.com/us/app/minecam/id675845303?mt=8 (If only it could also generate a seed for said world hahahaha)

@AlbertRenshaw I may not be a big fan of Minecraft, but that sounds pretty cool... Just downloaded it ;)

@WallyWest: it's not about lazyness. The problem should give you all information you need to get started, even if the rest of the internet is down. In a year or two, that link might be taken down and noone will update the link. If you provide enough information about how to create web-safe grayscale colors (which is not necessary to solve the problem) you could've just easily added a small mapping table, like #000000 => #0051BA, etc.

@SztupY I never mentioned laziness... but you've made a valid point...

@AlbertRenshaw by chance is there a new version of the app?

Imagemagick (108)
Version: ImageMagick 6.8.7-7 Q16 x86_64 2013-11-27
The following call:
$ convert -resize 75x75 -fx "q=p.intensity;q<1/6?#0051BA:q<2/6?#C41E3A:q<3/6?#009e60:q<4/6?#ff5800:q<5/6?#FFD500:#FFF" input output

where input and output have to be modified for the input and output filename.
I only counted the chars between -resize and #FFF", if you think this is invalid feel free to comment.
I used Lenna as image (she appeared in a Playboy, and anyone doing that should count as a Hollywood celebrity, right?)
Input:

Output:
$ convert -resize 75x75 -fx "q=p.intensity;q<1/6?#0051BA:q<2/6?#C41E3A:q<3/6?#009e60:q<4/6?#ff5800:q<5/6?#FFD500:#FFF" Lenna.png LennaRubik.png

Output enlarged:

Notes: according to the imagemagick docs you cannot have more than one conditional operator in a statement, but the call still seems to work fine, so probably this was fixed and the docs were just not updated.
Running identify on the result image (to show the colors are indeed fine):
$ identify -verbose LennaRubik.png
  (...)
  Colors: 6
  Histogram:
       338: (  0, 81,186) #0051BA srgb(0,81,186)
      1652: (  0,158, 96) #009E60 srgb(0,158,96)
      1187: (196, 30, 58) #C41E3A srgb(196,30,58)
      1674: (255, 88,  0) #FF5800 srgb(255,88,0)
       706: (255,213,  0) #FFD500 srgb(255,213,0)
        68: (255,255,255) #FFFFFF white
  (...)

If you think Lenna doesn't count as a proper celebrity, here is Bruce Willis:

+1 I think that your answer is almost unbeatable (or even unbeatable at all). I will just suggest that you take some unquestionably Hollywood celebrity or american president photo and add to this (don't need to remove Lenna, keep both). Otherwise some boring people might complain and downvote just because that.

@Victor: I think Mathematica, Matlab or Octave might easily beat this, as the conditions inside the fx part can be compressed even further in a language that has better expressivity. And those languages also have native image support (so no chars are lost by needing to import imagemagick/gd/etc.)

@SztupY I know of Lenna very well... I'll count that... Nice work with Bruce Willis too...

Lenna is cute(r). Up.

+1 for using the right tool for the job. To my understanding, the right way to use imagemagick is to call the image first, than the options, than the output file.

x<y?1:(x<z?2:3)) is still a single expression

Mathematica
We'll work with a square region from a U.S. stamp featuring Greta Garbo.
It will be referred to as j.

f[i_,rs_,m_:True]:=
Module[{(*rs=rastersize-4*)r={0.77,0.12,0.23},gr={0,0.62,0.38},b={0,0.32,0.73},o={1,0.35,0},y={1,0.84,0},w={1,1,1},
c1={r,gr,b,o,y,w},grayGreta,garboColors},
grayGreta=(*Reverse@*)ImageData[ColorQuantize[Rasterize[i,(*ImageResolution \[Rule]15*)RasterSize->rs+1,ImageSize->rs],6]];
garboColors=Union@Flatten[grayGreta,1];
ArrayPlot[grayGreta/.Thread[garboColors-> RGBColor@@@c1],
Mesh->If[m==True,{rs-1,rs-1},None],MeshStyle->Black]]

The function f takes 3 parameters:

i which refers to the image
rs, the raster size
m, a boolean variable that states whether Mesh lines should be used. (The default setting is True).

Using raster sizes of 15, 30, 45, and 75:
GraphicsGrid[{{f[j, 15], f[j, 30]}, {f[j, 45], f[j, 75]}}, ImageSize -> 800]

I can't imagine anyone making a Rubrik's cube with so many pieces!  Interesting exercise nonetheless.

Playing around with colors
This is from an earlier entry. The code is slightly different.  Graphics is used instead of ArrayPlot.  Also, we use the full stamp even though it is not square.
There are 6!=720 permutations of the Rubrik cube colors.
The following displays the center image of the upper row (set 6 images below).
When the grayscale values are arranged from darkest to lightest, the colors are {r,gr,b,o,y,w}.  Other variations nonetheless work.
i is the original image in grayscale.
Graphics[Raster[(g=Reverse@ImageData[ColorQuantize[Rasterize[i,RasterSize->75],6]])
/.Thread[Union@Flatten[g,1]-> {{7,1,2},{0,6,4},{0,3,7},{10,4,0},{10,8,0},{10,10,10}}/10]]]

i is the original grayscale image of the full Greta Garbo stamp.
Rasterize[garbo,RasterSize->75 rasterizes the image into a 75 by 75 array.
ColorQuantize[<>, 6] reduces the grayscale values to a set of 6.
ImageData retrieves the data array from the image; it comes upside-down.
Reverse flips the data array, hence the picture, right-side up.
garboColors are the 6 grayscale values in the quantized image.
Graphics[Raster displays the final image.
rubrikColors are RGB values of the 6 Rubrik cube colors.
Various color permutations of Red, Green, Blue, Orange, Yellow, and White are given.
r={0.77,0.12,0.23};gr={0,0.62,0.38};b={0,0.32,0.73};o={1,0.35,0};y={1,0.84,0};w={1,1,1};
c1={r,gr,b,o,y,w};
c2={r,b,gr,o,y,w};
c3={b,r,gr,o,y,w};
c4={gr,b,r,o,y,w};
c5={b,r,gr,y,o,w};

And the code:
grayGreta=Reverse@ImageData[ColorQuantize[Rasterize[i,RasterSize->75],6]];
garboColors=Union@Flatten[grayGreta,1];
Grid[{{i,
Graphics[Raster[grayGreta/.Thread[garboColors-> c1]]],
Graphics[Raster[grayGreta/.Thread[garboColors-> c2]]]},
{Graphics[Raster[grayGreta/.Thread[garboColors-> c3]]],
Graphics[Raster[grayGreta/.Thread[garboColors-> c4]]],
Graphics[Raster[grayGreta/.Thread[garboColors-> c5]]]}}]

Garbos Galore
Here are 72 (of the 720) images of Greta Garbo that use the 6 Rubrik cube colors.  Some images work better than others, don't you think?
GraphicsGrid@Partition[(Graphics[Raster[grayGreta /. Thread[garboColors -> #]]] &
/@ Take[Permutations[{r, gr, b, o, y, w}, {6}], 72]), 12]

Greta, oh Greta... This turned out better than I expected. @DavidCarraher, nice work here...

@WallyWest. Thanks.  It was a very interesting challenge.

I was so sure Mathematica would beat imagemagick, can't this be golfed even further? Are all those functions requred?

@SztupY Half the code is dedicated to getting the colors right. Reverse could be eliminated, leaving the picture upside down, but I don't see any other opportunities. Mathematica is expressive but uses big words. Someone adept at images could probably reduce the code size a bit but I doubt they could beat your imagemagick code.

You might save a few chars using more Infix (~). This will also nicely obfuscate the code. Plus, you can substitute 10 with a variable.

Is there a typo (i -> g)?

There were indeed some inconsistencies across the code.  I hope they are now gone. i hold the original image. gr stands for Rubrik's green.  g refers to the rasterized and quantized image data for the grayscale image.

Smalltalk (Smalltalk/X), 289 139*
input: i; output: r
r:=i magnifiedTo:75@75.
r colorMapProcessing:[:c||b|b:=c brightness.Color rgbValue:(#(16r0051BA 16rC41E3A 16r009e60 16rff5800 16rFFD500 16rFFFFFF)at:(b*6)ceiling)]

input:

output:

enlarged:

(for all youngsters: this is NOT Madonna ;-)
[*] I have not counted the magnification to 75x75 (the first line) - could have used an already resized as input. Hope that is ok with you.

I adore Marilyn Monroe... Great choice... Resizing was an optional feature...

Postscript, and TRUE Rubik colors! ;-)
Well, this solution is a bit of off-topic here, as it's restricted to somewhat highly specialized sphere. But after much frustration with e.g. "weird numbers question" (being unable to produce something practically working) I decided to publish something and so pulled this out of my pile of half-finished scribbles and made it presentable.
The solution exploits the fact, that 1st revision of this question defines required colors by link to a site, which clearly states, that Pantone(R) colors are to be used, and RGB colors are approximations only. Then I thought, why would I do approximations, when I can do genuine color? -:)
10 dict begin
/Size 75 def
/Names  [(PMS 012C) (PMS 021C) (PMS 347C)   (PMS 200C)    (PMS 293C)   ] def
/Colors [[0 .16 1 0][0 .65 1 0][1 0 .39 .38][0 .9 .72 .28][1 .56 0 .27]] def
<</PageSize [Size dup]>> setpagedevice
Size dup scale
true setoverprint
(%stdin) (r) file 100 string readline pop
(r) file <</CloseSource true>>/DCTDecode filter
0 1000000 string
dup <</CloseTarget true>>/NullEncode filter
{
    3 index 3 string readstring
    {
        4 -1 roll 1 add 4 1 roll
        {} forall
        0.11 mul exch 0.59 mul add exch 0.3 mul add cvi
        1 index exch write
    } {pop exit} ifelse
} loop
closefile
0 3 -1 roll getinterval
exch closefile
/data exch def
/n data length sqrt cvi def
1 1 Names length {
    /N exch def
    {
        dup N Names length 1 add div gt
            {N 1 add Names length 1 add div gt
                {1} {0} ifelse}
            {pop 1}
        ifelse
    } settransfer
    [/Separation Names N 1 sub get /DeviceCMYK {
        Colors N 1 sub get
        { 1 index mul exch } forall pop
    }] setcolorspace
    <<
        /ImageType        1
        /Width            n
        /Height           n
        /ImageMatrix      [n 0 0 n neg 0 n]
        /BitsPerComponent 8
        /Decode           [0 1]
        /DataSource       data
    >> image
} for
showpage
end

This code is to be saved as e.g. rubik.ps and then fed to Ghostscript with usual incantation:
gs -q -sDEVICE=psdcmyk -o out.psd rubik.ps

It then waits you on the next line, for input of JPG file name e.g.
kelly.jpg

and, if all goes well, saves the output to out.psd file.
Input must be square RGB JPEG (any size), output is PSD with spot color channels. You'll need Photoshop to view the file. Changing GS device from psdcmyk to anything else will produce nothing usable. JPEG as input - because postscript interpreter can decode data stream from it directly. Square shape - because the program relies on sqrt of string length to find width (and height) of the image.
First lines define output image size (can be changed from default 75) and the color palette (colors and their number can be changed too). Anything else is not hard-coded, I think.
What's going on? Stream of RGB triplets is converted on the fly to the string of grayscale values (with simple formula), usual 8-bit contone image dictionary is built and used to paint 5 identical images on top of each other in 5 Separation color spaces. The trick is to apply transfer functions before each invocation of image operator. E.g. for yellow paint this function returns 0 for input values in 0.167 .. 0.333 range only, and 1 otherwise.
Input:

Screenshot of output 75x75 open in Photoshop, enlarged 800%:

And Photoshop channels palette:

+1 for using Grace Kelly... you have my complete respect...

Brainfuck
++++[->+[,.----------]<]>>>>---->->++++++++++>>------------>+++>+++>--
--->++++++[->+++++<]---->+[-<+++++++<+++<+++++<+++<+++<++++++<++++++<+
<++>>>>>>>>>]<[<]<<,+[,<++++++>[>++++++[->+++++++<]>+[<<[->]>[<]>-]<<<
->]+<[-[-[-[-[[-].>>>>>>>>.<.<<<<<<-<]>[->>>>>[.<]<<]<]>[-.>>>[>]<<<.<
.[<]<<]<]>[--.+>>>[>]<<.[<].<<]<]>[--.+>>>[>]<.[<].<<]<]>[--...+],,+]

This requires a BF interpreter/compiler that has -1 as EOF and that has higher than 8 bit cells IF one of the red pixels are 255. Or else it will stop premature since it won't be able to differ between EOF and value 0xFF. With jitbf you have whatever the machine has as integer size and can do this to force -1 as EOF:
jitbf --eof -1 rubiks.bf < angelina.pnm > angelina-rubix.pnm

The image file format rendered is the full RGB PNM file (P6), raw as option in Gimp.
It uses the green channel only (which is one of many ways to convert a color image to greyscale). It reduces the value by 43 without reduceing the value below zero to find out which rubiks color to use and have a switch that prints out the correct RBG color that corresponds.
Image of Angelina Jolie from Hackers (1995) scaled down to 75x75 and processed with the application:

Same, only I used the original size:

And since I'm psychic here's a president as well:

Off topic, but todays xkcd also has references to Hackers (1995)

This one also does: http://xkcd.com/1247/

C#
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;

class Program
{
    static void Main(string[] args)
    {
        unchecked
        {
            var t = new[] { 0xFFC41E3A, 0xFF009E60, 0xFF0051BA, 0xFFFF5800, 0xFFFFD500, 0xFFFFFFFF }.Select(v => Color.FromArgb((int)v)).ToArray();
            var o = new Bitmap(Bitmap.FromFile(args[1]));
            var m = double.Parse(args[0]);
            var r = Math.Min(m / o.Width, m / o.Height);
            var w = (int)(o.Width * r);
            var h = (int)(o.Height * r);

            o = new Bitmap(o, w - (w % 3), h - (h % 3));
            for (int y = 0; y < o.Height; y++)
                for (int x = 0; x < o.Width; x++)
                    o.SetPixel(x, y, N(o.GetPixel(x, y), t));
            o.Save(args[2], ImageFormat.Png);
        }
    }

    static Color N(Color c, Color[] t)
    {
        return t.OrderBy(v => Math.Abs(W(v) - W(c))).First();
    }

    static double W(Color c)
    {
        return .11 * c.B + .59 * c.G + .30 * c.R;
    }
}

You need to run it with 3 parameters:
foo.exe 75 d:\test.jpg d:\out.png
Where 75 is max. width/height, d:\test.jpg is input file and d:\out.png is the output file.
Output for various images in this contest:

My own celebrity:

Output:

However, other (larger than 75x75) sizes do result in better images:

And, if we stick with presidents:

Since this is no (longer?) codegolf I didn't bother to "minimize" the code too much. Also, since the instructions did not specifically mention the image had to be the same width as height (square) I didn't bother with cropping; I do, however, make sure the image is a multiple of 3 pixels wide/high. If you want square images, use square inputs  Finally; the algorithm is far from optimal.
A few more (since people upvote hot chicks / internet heroes more  )

Piet

It is presented here with a codel size of 20 for readability's sake. To counter that same aspiration, it has been half-heartedly if not golfed then at least been subject to compacting efforts.
Tested with npiet like so:
npiet -q rc.png < infile.ppm > outfile.ppm

Assumes the files are of the "plain" RGB variety (P3), i.e. with the image data as numbers in plaintext and not binary. It ignores the maximum colour value and just assumes that it is 255. In the output, every whitespace is a newline.
Looping over each pixel, the following happens:

The colours we are to choose from are pushed to stack, lightest first, so that the darkest colours end up on top.
The RGB triplet is read in and converted to greyscale. Since floating point mathematics is not built-in nor trivial to implement, integer maths is used: grey = (red * 299 + green * 587 + blue * 114) / 1000.
The greyscale value is divided by 43, to obtain a number 0..5 (colour index = ci).
This number is increased by 1, multiplied by 3 and duplicated on stack. The top value is then decreased by 3, giving us two values on top of stack: [(ci - 1) * 3] [ci * 3].
These new values are used with the roll instruction, which will - with the parameters given above - bring the desired RGB triplet to the top of the stack. (You can think of it as taking a deck of cards and cutting it so that you hold ci * 3 cards in your hand, and then taking the top card of that little stack you're holding and putting it down on the pile still on the table, then placing what you hold top of that; repeat this (ci - 1) * 3 times.)
Triplet is output in the usual way.
The unused triplets are popped from stack.
If at the end, we exit, otherwise we go back to step 1.

Input:

Output 75x75 (input was scaled before passing it to the program itself):

Output very large indeed:

Objective-C
I saw this challenge last night and had an ever so slightly confusing time with -[NSArray indexOfObject:inSortedRange:options:usingComparator:], hence the delay.
- (UIImage  *)rubiksImage:(UIImage *)inputImg
{
    //Thank you http://stackoverflow.com/a/11687434/1153630 for the greyscale code
    CGRect imageRect = CGRectMake(0, 0, inputImg.size.width, inputImg.size.height);

    int width = imageRect.size.width;
    int height = imageRect.size.height;

    uint32_t *pixels = (uint32_t*)malloc(width * height * sizeof(uint32_t));

    memset(pixels, 0, width * height * sizeof(uint32_t));

    CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
    CGContextRef context = CGBitmapContextCreate(pixels, width, height, 8, width * sizeof(uint32_t), colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaPremultipliedLast);

    CGContextDrawImage(context, imageRect, [inputImg CGImage]);

    const int RED = 1;
    const int GREEN = 2;
    const int BLUE = 3;

    for (int y = 0; y < height; y++)
    {
        for (int x = 0; x < width; x++)
        {
            uint8_t* rgbaPixel = (uint8_t*)&pixels[y * width + x];
            uint32_t grayPixel = 0.3 * rgbaPixel[RED] + 0.59 * rgbaPixel[GREEN] + 0.11 * rgbaPixel[BLUE];

            NSArray *r = [self rubixColorFromGrey:grayPixel];

            rgbaPixel[RED] = [r[2] integerValue];
            rgbaPixel[GREEN] = [r[1] integerValue];
            rgbaPixel[BLUE] = [r[0] integerValue];
        }
    }

    CGImageRef newCGImage = CGBitmapContextCreateImage(context);

    CGContextRelease(context);
    CGColorSpaceRelease(colorSpace);
    free(pixels);

    UIImage* newUIImage = [UIImage imageWithCGImage:newCGImage];

    CGImageRelease(newCGImage);

    return newUIImage;
}

- (NSArray *)rubixColorFromGrey:(uint32_t)p
{
    NSArray *colors = @[@0, @51, @102, @153, @204, @255];

    NSUInteger index = [colors indexOfObject:@(p)
                               inSortedRange:NSMakeRange(0, colors.count)
                                     options:NSBinarySearchingInsertionIndex | NSBinarySearchingFirstEqual
                             usingComparator:^(id a, id b) {
                                return [a compare:b];
                             }];
    switch (index) {
        case 0:
            return rgb(0, 81, 186);
            break;
        case 1:
            return rgb(196, 30, 58);
            break;
        case 2:
            return rgb(0, 156, 96);
            break;
        case 3:
            return rgb(255, 82, 0);
            break;
        case 4:
            return rgb(255, 213, 0);
            break;
        case 5:
            return rgb(255, 255, 255);
            break;

        default:
            break;
    }

    return colors; //go wild
}

NSArray *rgb(int r, int g, int b)
{
    return @[@(r), @(g), @(b)];
}

I ran it on my iPad like so:
UIImageView *img = [[UIImageView alloc] initWithImage:[self rubiksImage:[UIImage imageNamed:@"danny.png"]]];
[img setCenter:self.view.center];
[self.view addSubview:img];

Before

After

Before

After

Python
Format: python rubik.py <input> <max_cubes> <output>.
Coverts pixel to grayscale using suggested algorithm.
import Image, sys

def rubik(x, max_cubes = 25):

    img = x
    max_cubes *= 3

    if x.size[0] > max_cubes or x.size[1] > max_cubes:

        print "Resizing image...",

        if x.size[0] > x.size[1]:
            img = x.resize((max_cubes, int(max_cubes * float(x.size[1]) / x.size[0])), Image.ANTIALIAS)
        else:
            img = x.resize((int((max_cubes * float(x.size[0]) / x.size[1])), max_cubes), Image.ANTIALIAS)

    if x.size[0] % 3 or x.size[1] % 3:
        print "Sizes aren't multiples of 3"
        return

    print "Image resized to %i x %i pixels" % img.size

    out = Image.new('RGB', img.size)

    print "Converting image...",

    for x in xrange(out.size[0]):
        for y in xrange(out.size[1]):
            r, g, b = img.getpixel((x, y))
            if r == g == b == 255:
                out.putpixel((x,y), (255, 255, 255))
            else:
                l = 0.2126 * r + 0.7152 * g + 0.0722 * b
                l /= 255
                out.putpixel((x,y), (
                        (0x00, 0x51, 0xBA),
                        (0xC4, 0x1E, 0x3A),
                        (0x00, 0x9E, 0x60),
                        (0xFF, 0x58, 0x00),
                        (0xFF, 0xD5, 0x00)
                    )[int(5 * (l <= 0.0031308 and 12.92 * l  or 1.055 * l ** (1/2.4) - 0.055))])

    print "Image converted successfully."

    print "Stats:"
    h, v = img.size[0] / 3, img.size[1] / 3
    print "   ", h, "horiz. Rubik cubes"
    print "   ", v, "vert. Rubik cubes"
    print "   ", h * v, "total Rubik cubes"

    return out.resize((out.size[0], out.size[1]))

if __name__ == "__main__":
    rubik(Image.open(sys.argv[1]).convert("RGB"), int(sys.argv[2])).save(sys.argv[3])

Input:

(source: ilmamilio.it)
Output with max_cubes = 25:

Output with max_cubes = 75:

Output with max_cubes = 225:

Isn't white color missing? And the darkest should be blue, but, as I see now, that's the issue with some other images too.

@VAdimiR Whoops! Mapped them in the wrong order. As for white not showing up, it's because of the FP precision (1.055 - 0.055 = 0.9999999999999999). I think I'll have to hardcode white, which isn't hard, since it'd show up only at an original value of #FFFFFF anyway.

About white, my opinion was that 0..1 (lightness) range is divided into 6 parts, and anything 0.83..1.00 is mapped to white, or otherwise there'll be not much sense in making picture of 6 colors of the cube, but that's how I read it.

@Oberon Interesting choice using Pertini... He almost lived to the age of 94... And great work using Python, and I have to admit, not one of the easiest languages I've come across, so well done!

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/