[Question]
  [
**Input:** Two decimal integers. These can be given to the code in standard input, as arguments to the program or function, or as a list.
**Output:** Their product, as a decimal integer. For example, the input `5 16` would lead to the output `80`.
**Restrictions:** No standard loopholes please. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), answer in lowest amount of bytes wins.
**Notes:** Layout stolen from my earlier challenge, [Add two numbers](https://codegolf.stackexchange.com/q/84260/46271).
**Test cases:** 
```
1 2   -> 2
4 5   -> 20
7 9   -> 63
-2 8  -> -16
8 -9  -> -72
-8 -9 -> 72
0 8   -> 0
0 -8  -> 0
8 0   -> 0
-8 0  -> 0
0 0   -> 0
```
Or as CSV:
```
a,b,c
1,2,2
4,5,20
7,9,63
-2,8,-16
8,-9,-72
-8,-9,72
0,8,0
0,-8,0
8,0,0
-8,0,0
0,0,0
```
# Leaderboard
```
var QUESTION_ID=106182,OVERRIDE_USER=8478;function answersUrl(e){return"https://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"https://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```
```
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>
```
  
[Answer]
# Brachylog V1, 05AB1E, J, K, Underload, MATL, Forth, PigeonScript, Stacked, Implicit, Jolf, Clojure, Braingolf, 8th, Common Lisp, Julia, Pyt, Appleseed, Stax, Reality, dc, Vyxal, Keg, Swift, Fig\*, Chocolate, ><>, Thunno\*: 1 byte
```
*
```
You may edit this answer to add other languages for which `*` is a valid answer.
\*Actually \$\log\_{256}(96)\approx\$ 0.823 bytes in Fig and Thunno
[Answer]
# C (GCC), 13 bytes
Doesn't work on *all* implementations, but that's OK.
```
f(a,b){a*=b;}
```
[Try it on TIO!](https://tio.run/nexus/c-gcc#@5@mkaiTpFmdqGWbZF37PzcxM09Ds7qgKDOvJE1DSTVFSSdNw1zHUlMTKAkA "C (gcc) – TIO Nexus")
[Answer]
# [Beatnik](https://esolangs.org/wiki/Beatnik), 888 bytes
```
k I
j k ZZZZX z
xw k C vp yQ KD xw z j k ZZZZX z
j k ZZZD z xw bZ ZX
k XX z qs xw vp xw xw vp xw vp vp vp k I Xj ZZD hd
xw yQ K k ZZZZX xo exx
qs yQ XA xw xw xw xw z xw bZ K
xw xw k I
j k ZZZZX z
xw k C vp yQ XA hd k I z j k ZZZZX z
j xw k A vp bZ ZX
k ZZZZX z qs xw vp xw xw vp xw vp vp vp k I Xj ZZD hd
xw yQ K k ZZZZX xo exx
qs yQ F k ZZZZK xo
vp
xw xw z qs xw bZ X xw k I z xw Xj K
qs xw bZ KA vp qs xw Xj C hd
qs z xw xw xw xw z qs
xw xw xw xw z qs k I qs k I z xw Xj ZC
qs bZ ZZZX qs xw yQ C hd xw
k I vp qs k I qs
xw Xj ZZC hd hd z Kz ZZD
k I z xw xw xw xw z qs k I qs k I Xj ZZZZF
z
xw xw z qs xw bZ X xw k I z xw Xj K
qs xw bZ KA vp qs xw Xj C hd
z qs xw
xw xw z qs xw bZ X xw k I z xw Xj K
qs xw bZ KA vp qs xw Xj C hd
z vp
xw xw z qs
xw xw z qs
k I qs
xw bZ ZZX k I z qs k I vp
xw k ZA z yQ ZA hd qs k I vp qs k I Xj ZZKD
qs xw Xj ZZK
hd qs xw Xj ZZZZ hd
k ZZZZKD vp xo xw Xj K
```
[Try it online!](https://tio.run/##tVdtU9s4EP4c/4qFfohDHIqB9noEc5fjZYYJQ3uUm2HCMYxiy7FIYqmWQoAOv51bSbaJc0kHrhxkFGt3tc@zq5W16ROZPIVEwV6fEpWy4XoIu7v1w9ODuvN@Df447JyfHneBpYpmIqM4wphEFPr3sE8UUTxlIXzhmeBMUtgdZGRCf@chJWmfSLrOs8GeAwAERjwdgGJjCmTA1@E8YRISIiHlCvqUpqCoVDTKNfgRk/4IfUd8TFi6DmvvHecdS8PRBNF3pYoYX0/2KqKMpYOqLFT3gmqREyYkgzUS3ZI0pK6deTqsRjvXYXAZpmBOhyPIMCP9/qhYhtJJKtkgpREYieDCveUsQoX@QuYycSsmBYgeSIhJHFBVLDEQOkZXP5BsEHo52Wxwe3nVgO9O7ej45BDW4rZTsyrhQTiOLv0N/LtCqV7Jgg3vxhsGvic9hW5rLHa1t93NBmBskywFv22kbhzEXNDUNQj@lbearTYaQXD618lJabuJttOEYdTuTYB0QzduNFaCw89HhlFN47Or4AbNaqzZxK9HpxaHIy4pWmqm1qAO9bbVF4J4XsDnBXfzgvs6TkSAUx2YpTW0POSUqTBxyz0SDSuvhVh/8GEHsIq/4IZASu8UTHkW6VJCPforykF4vmasZXrrZn21l5r2sVqG7RLpo0XiAtLJuI/HhKQRREyGBBGZKkGxVl7u9JfSqZry3LH0gEQRqISOPVNquGNyMnpG0CEYmKYZX472yaAdp2KinivVxGFgbsloQisolXJ@BdCvZVjWp4bgE1XFLYGUlrmvjMXfKDE2LQrmTU76SnuHmGUSx4yPQdKQp9HCTKpgdrfKtLbUK2j4i2hMicj3r0yunkKfhMOF4PJfTFSlYF9BaLOa@zxwLFA1ZSFdHrpaOHkB4NY8oBwyASShJIK06ZsjiS/8OK8FfPM/0Iz/6JCqYOaEWhG@1VZshcDsioInHSGTl5Ddfi3ZtK7@I9@3oPthIV1TRun/kNjiikSmTf@1XD@@iusb5PWn2No371fFzUkFkXFsbcYFm2GwMb8sojHBd4dZ1sGmJsFXmI6qNaLpQCU6/QSbnRY6XBrSo75EnVp@AyPEo7OoARHmhjN3vleoLq@C7763hf@bnu9t47iN35@8D56W@nbcMA@@MdhGJZpsPCJwzDMX24f2mljBUTSb9gplzYBJMhIJcRHztxJK8RGf0kwLW3VSv9oxycDUMykFwXjW9CVcpOaxDIiZgBZ1YsK0W6CeA5thxXaVbgcsJ2H6grwFWKkAVlQLNM9ExAyRattXIYI7ecoV3cEKwN2LJ2moGE@BSDkZU4nGelN1dfTpgKUpdp/AY9xlve1Y3li7rmj5Dc2JjUZoBcgN21xNzBRBEalotZbFuygaY704BUaFgdqIK@FWe1ap8OBdbtn@0dSY0DVd6bBHrG965yXdruZXVYW2v5QibxEDi9JqSaG71Jqd4sQen5xemFPG9l3F7upR57xzAodnZ5/PdvDAwJhnNL86AbNvfPydruoDQ@@Ycrca7bkjs6QJh9DQKkg0m1dBaOzfsRhPLxx8/rp/1vni6N8952ZXscz1FuPGaCWij@7nfodg72B/hyzr7zVimZvQNNKJuVcxT2EQ@FsNmJU@p0Tz0m@rH3guWnWzHFukRhvMqjRisYO/4JxBGMLzz7oWLyaOuc9aKPJhD0KuI9m9vsYl19dPQzh2bmAIPfy7gAfnboqTfbgVcP8ndA8A5w8wa5A/H6AYdf0e9C6cIVygCr5JLcKlOJYPONoPIsHFDeilSaRxNEDp@I4Dvbtz0AWKLzq5C/spkLqOnf@QM65NIgM2z9uYdbRZwTrXvR3xo1zcRbFzK5yCvwVA2Iucv40JvXadUtc13OwUNfsaDWcPc7n4Jp15gfGYfxWOe/t6sY5Us7RekaH2io@ONrVodq2Tr@oZA/w8QPdBx@yUTpdCmnW93pHz8PMB50vfwlEl/7OPzxGb9FzkbvNo7DLcxw7KMGM9U1ClshJ098ApUXHmWMNi3utpInlFHJiy4gX5p/wAOuvv82NqTubTNrQ2/wE "Bash – Try It Online")
I'm using the C interpreter because the Python interpreter on TIO annoyingly executes the address if the condition for jumping backward isn't met. An easy workaround for the Python interpreter is to pad some nops to make the address nop. I believe neither is correct:
```
                                   C       Python  My interpretation
IP after skiping N words           IP+N+1  IP+N+2  IP+N+2
IP after skiping back N words      IP-N    IP-N+1  IP-N+2
IP after not skiping N words       IP+2    IP+2    IP+2
IP after not skiping back N words  IP+2    IP+1    IP+2
```
Input should be two integers separated by a space, without trailing newlines.
This answer works in theory for all integers, if each cell can store an arbitrarily large value, not limited to 0 - 255. But it overflows if |A|+|B| > 22. And it runs very slowly if |A|+|B| > 6. So there is not many cases you can actually test and an if-else solution for those cases might be even shorter.
The idea is to compute the triangular numbers T(N) = N(N+1)/2 by decrementing the value to 0 and summing up all the intermediate values. Then we can get the answer A\*B = T(A+B) - T(A) - T(B).
But it is tricky to compute all the 3 values. It does this by firstly computing T(A+B) - A, leaving a copy of A in the stack to add back later, and using up the input B. Then recursively find the greatest triangular number smaller than that, which is T(A+B-1) except for the zero special cases. We can get back B = T(A+B) - A - T(A+B-1) and compute T(B) from there.
A number N is a triangular number iff it equals to the greatest triangular number smaller than N, plus the number of non-negative triangular numbers smaller than N. This runs in O(2^(T(A+B)-A)) and is the slowest part in the program.
```
k I                                         Push 1
j k ZZZZKAAA z                              Input and decrement by 48.
xw k AAA vp yQ (input_a_loop)               If the character was '-':
xw z j k ZZZZKAAA z                           Replace with 0 and input another.
input_a_loop:
j k ZZZAA z xw bZ (input_a_end)             Input and break if it is a space.
k ZKA z qs xw vp xw xw vp xw vp vp vp       Otherwise multiply the previous
                                              value by 10 and add.
k I Xj (input_a_loop)                       Continue the loop.
input_a_end: hd                             Discard the space.
xw yQ (check_sign) k ZZZZKAAA xo exx        If A=0, print 0 and exit.
                                            Stack: ?, A_is_positive, A
check_sign:
qs yQ (check_sign_else)                     If A is positive... or not,
xw xw xw xw z xw bZ (check_sign_end)          in either cases, push 2 copies
check_sign_else: xw xw k I                    of A and the negated flag back
check_sign_end:                               as a constant.
                                            Stack: A, A, A, A_is_negative
j k ZZZZKAAA z                              Similar for B.
xw k AAA vp yQ (input_b_loop)               If the character was '-':
hd k I z j k ZZZZKAAA z                       Decrement the flag and input another.
input_b_loop:
j xw k A vp bZ (input_b_end)                EOF is checked instead of a space.
k ZZZZKAAA z qs xw vp xw xw vp xw vp vp vp
k I Xj (input_b_loop)
input_b_end: hd
xw yQ (output_sign) k ZZZZKAAA xo exx       If B=0, print 0 and exit.
                                            Stack: A, A, A, A*B_is_negative, B
output_sign:
qs yQ (output_sign_end) k ZZZZK xo          If negative, output '-'.
output_sign_end:
vp                                          Add.        Stack: A, A, A+B
xw xw z qs                                  Insert a 0. Stack: A, A, 0, A+B.
xw bZ { xw k I z xw Xj }                    Copy and decrement while nonzero.
                                            Stack: A, A, 0, A+B, A+B-1, ..., 0
qs xw bZ { vp qs xw Xj } hd                 Add while the second value in the
                                              stack is nonzero.
                                            Stack: A, A, T(A+B)
qs z xw xw xw xw z qs                       Stack: A, C0=T(A+B)-A, C0, F0=0, C0
expand_loop:
xw xw xw xw z qs k I qs                     Stack: A, C0, C0, F0=0,
                                              ..., [P=C, P, S=0, F=1], C
dec_expand: k I z xw Xj (expand_loop)       Decrement and continue if nonzero.
                                            Stack: [P=1, P, S, F], C=0
                                            The last number 0 is assumed to
                                              be a triangular number.
test: qs bZ (extract_end)                   If F=0, break.
qs xw yQ (test_not_first) hd xw             If S=0, it's the first triangular
                                              number below previous C. Set S=C.
test_not_first: k I vp qs k I qs            S+=1 and restore F=1.
xw Xj (dec_expand)                          If C!=0, recursively expand from C-1.
hd hd z Kz (test)                           If S=P, P is a triangular number,
                                              return to the previous level.
k I z xw xw xw xw z qs k I qs               Otherwise, decrement P and try again.
k I Xj (dec_expand)
extract_end:                                Stack: A, C0, C0, T(A+B-1)
z                                           Subtract and get B.
xw xw z qs xw bZ { xw k I z xw Xj }         Computes T(B).
qs xw bZ { vp qs xw Xj } hd
                                            Stack: A, C0, T(B)
z qs xw                                     Stack: C0-T(B), A, A
xw xw z qs xw bZ { xw k I z xw Xj }         Computes T(A).
qs xw bZ { vp qs xw Xj } hd
z vp                                        Get A*B=(C0-T(B))+(A-T(A))
xw xw z qs                                  Stack: 0, X=A*B
divide: xw xw z qs                          Stack: 0, ..., Y=0, X
subtract: k I qs                            Stack: 0, ..., Y, Z=1, X
xw bZ {                                     While X!=0:
k I z qs k I vp                               X-=1, Z+=1.
xw k ZA z yQ (not_ten)                        But if Z=11:
hd qs k I vp qs k I Xj (subtract)               Y+=1, reset Z and restart the loop.
not_ten: qs xw Xj }
hd qs xw Xj (divide)                        Put Z under Y and make Y the new X,
                                              continue the loop if X!=0.
hd                                          Discard X.
print_loop:
k ZZZZKAA vp xo xw Xj (print_loop)          Add each cell by 47 and print.
```
[Answer]
# [Scratch](https://scratch.mit.edu/), 1 byte
[![enter image description here](https://i.stack.imgur.com/dNzEs.png)](https://i.stack.imgur.com/dNzEs.png)
Usage: Place numbers in both sides of `*` sign
Note: Since Scratch is a visual language I could not figure out how many bytes it consumes until @mbomb007 noted me about a method for [counting scratch bytes](https://codegolf.meta.stackexchange.com/a/5013/34718)
[Answer]
# Mathematica, 4 bytes
```
1##&
```
Example usage: `1##&[7,9]` returns `63`. Indeed, this same function multplies any number of arguments of any type together.
As Mathematica codegolfers know, this works because `##` refers to the entire sequence of arguments to a function, and concatenation in Mathematica (often) represents multiplication; so `1##` refers to (1 times) the product of all the arguments of the function. The `&` is just short for the `Function` command that defines a pure (unnamed) function.
Inside other code, the common symbol `*` does act as multiplication. So does a space, so that `7 9` is interpreted as `7*9` (indeed, the current REPL version of Mathematica actually displays such spaces as multiplication signs!). Even better, though, if Mathematica can tell where one token starts and another ends, then no bytes at all are needed for a multiplication operator: `5y` is automatically interpreted as `5*y`, and `3.14Log[9]` as `3.14*Log[9]`.
[Answer]
# [Retina](https://github.com/m-ender/retina), 38 37 31 bytes
Completely new approach, the old one is below.
```
M!`-
*\)`-¶-
.* 
$*_
_
$'$*_
_
```
[Try it online!](https://tio.run/nexus/retina#U9VwT@AC4v@@igm6XFoxmgm6h7bpcnHpaSlwqWjFc8VzqaiD6f//DRWMuEwUTLnMFSy5dI0ULLgsFHSBLDBpAOQaKOiCxAxAQgZAngEA "Retina – TIO Nexus")
### Explanation
First, we deal with the sign:
```
M!`-
```
matches all `-` in the string and returns them separated by newlines
```
*\)`-¶-
```
(with a following empty line)  
`*\)` means the result of this and the previous stages should be printed without a newline, and then the string reverted to what it was before (the input string). The remaining part removes two `-` separated by a newline.
Then we convert the first number to unary:
```
.* 
$*_
```
(there's a space at the end of the first line). We use `_` as our unary digit in this case, because the standard digit `1` can be present in the second number, and this would conflict later.
Now we get to the actual multiplication:
```
_
$'$*_
```
Each `_` is replaced by the unary representation of everything following it (still using `_` as the unary digit). Since conversion to unary ignores non-digit characters, this will repeat the unary representation of the second number for "first number" times. The second number will remain in decimal representation at the end of the string.
In the end, with a single `_` we return the number of `_` in the string, which will be the result of the multiplication.
---
Previous answer:
(warning: outputs an empty string when it should output `0`)
## [Retina](https://github.com/m-ender/retina),  45  42 41 bytes
Let's play a game! Multiply relative numbers with a language which has no arithmetic operators and limited support only for natural numbers... Sounds funny :)
```
O^`^|-
--
\d+
$*
1(?=1* (1*))?
$1
1+
$.&
```
### Explanation
The first three lines deal with the sign:
```
O^`^|-
```
This sorts `O` and then reverses `^` all strings matching the regex `^|-`. In practice this matches the empty string at the start, and the eventual minus sign before the second number, and reorders them placing the empty string in the place of the minus. After this, all `-` are at the beginning of the string, and a pair of them can be removed easily with the next two lines.
After that, we use a builtin to convert numbers to unary representation, and then comes the actual multiplication:
```
1(?=1* (1*))?
$1
```
We match any `1`, and substitute each of them with all the `1` after a following space. Each digit of the first number will be replaced by the full second number, while each digit of the second number will be replaced by the empty string.
The last part is again a builtin to convert back from unary to decimal.
[Try it online!](https://tio.run/nexus/retina#U9VwT/jvH5cQV6PLpavLxRWTos2losVlqGFva6iloGGopalpz6ViyGUIFNZT@//fUMGIy0TBlMtcwZJL10jBgstCQRfIApEA "Retina – TIO Nexus")
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 56 bytes
```
([({}<([({})<>])<>>)<>]){({}[()]<(({})<({}{})>)>)<>}{}{}
```
This must be run as a full program as it is not stack clean and the inputs must be the only elements in either stack.
[Try it online!](https://tio.run/nexus/brain-flak#@68RrVFdawMmNW3sYoHYDkxXAwWiNTRjbTTAMkACSNlpgiRrQez//3UtFHQtAQ "Brain-Flak – TIO Nexus")
---
**Explanation:** (call the inputs x and y)
Part 1:
```
([({}<([({})<>])<>>)<>])
([                    ]) # Push negative x on top of:
      ([      ])         # negative y. After...
  ({}<            >)     # pushing x and...
        ({})             # y...
            <>  <>  <>   # on the other stack (and come back)
```
At this point we have [x,y] on one stack and [-x,-y] on the other.
Part 2:
```
{({}[()]<(({})<({}{})>)>)<>}{}{}
{                          }     # Loop until x (or -x) is 0
 ({}[()]<              >)        # Decrement x
         (({})<      >)          # Hold onto y
               ({}{})            # Add y and the number under it (initially 0)
                         <>      # Switch stacks
                            {}{} # Pop x and y leaving the sum
```
[Answer]
## JavaScript (ES6), 9 bytes
ES6 has a dedicated function for 32-bit integers, faster than the more generic `*` operator.
```
Math.imul
```
Incidentally, this is just as long as:
```
a=>b=>a*b
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), ~~56~~ ~~54~~ 52 bytes
*2 bytes saved thanks to a mistake caught by Nitrodon*
```
({}(<()>)<>)({<([{}({}())])><>([{}]([{}]))<>}<{}{}>)
```
[Try it online!](https://tio.run/##SypKzMzTTctJzP7/X6O6VsNGQ9NO08ZOU6PaRiMayAciTc1YTTsbOxA3FkxoAhXU2lTXVtfaaf7/b2ikoGto9F83BQA "Brain-Flak – Try It Online")
# Stack clean version, ~~62~~ 60 bytes
```
({}(<()>)(<>))({<([{}({}())])><>([{}]([{}]))<>}<{}{}<>{}{}>)
```
[Try it online!](https://tio.run/##HYixCoAwDAV/xTFvyNDOj/yIdKiIIIqDa8i3x1Y4Du62t5@PHne/MsVDKDAIDRCnrOMMgAajzWy/AFrQw4M2bcgsddFSU/cP "Brain-Flak – Try It Online")
## Explanation
*This explanation is more of an explanation of the algorithm involved and leaves out any actual code. It assumes that you know how to read Brain-Flak proficiently. If you need help understanding either the code or the algorithm I would be happy to edit or respond if you leave a comment.*
This is a little bit of a strange one and uses some weird math that just barely works out. The first thing I did was to make a loop that would always terminate in **O(n)** steps. The normal way to do this is to put **n** and **-n** on opposite stacks and add one to each until one hits zero, however I did it in a slightly stranger way. In my method I put a counter underneath the input and each step I increment the counter add it to **n** and flip the sign of **n**.
Let's walk through an example. Say **n = 7**
```
7  -8   6  -9   5 -10   4 -11   3 -12   2 -13   1 -14   0
0   1   2   3   4   5   6   7   8   9  10  11  12  13  14
```
I won't prove it here but this will always terminate for any input and will do so in about **2n** steps. In fact it will terminate in **2n** steps if **n** is positive and **2n-1** steps if **n** is negative. You can test that out [here](https://tio.run/##SypKzMzTTctJzP7/X6O6VrNaI7q6FsjQ0NSM1aytrv3/X9ccAA "Brain-Flak – Try It Online").
Now we have about **2n** steps in our loop how do we multiply by **n**? Well here have some math magic. Here's what we do: We make an accumulator, each step of the process we add the second input (**m**) to the accumulator and flip the sign of both of them, we then push the total over all the loops that occur, this is the product.
Why on earth is that the case?
Well lets walk through an example and hopefully it will become clear. In this example we are multiplying **5** by **3**, I will show only the important values
```
total       -> 0  -5   5 -10  10 -15  15
accumulator -> 0  -5  10 -15  20 -25  30
m           -> 5  -5   5  -5   5  -5   5
```
Hopefully the mechanism is apparent here. We are stepping through all the multiples of **m** in order of their absolute values. You will then notice that the **2nth** term is always **m \* n** and the term before always **-m \* n**. This makes it so that our looping perfectly lines up with the results we want. A bit of a happy coincidence ;)
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), 1 [byte](http://meta.codegolf.stackexchange.com/a/9429/43319)
[`×` takes one number on the left, and one on the right](http://tryapl.org/?a=8%20%D7%20%AF9&run)
`×` ... or even multiple numbers [on the left](http://tryapl.org/?a=%AF8%20%D7%202%205%209%208%20%AF9%209&run) or [on the right](http://tryapl.org/?a=1%204%207%20%AF2%208%20%AF8%20%D7%209&run) or [on both sides](http://tryapl.org/?a=1%204%207%20%AF2%208%20%AF8%20%D7%202%205%209%208%20%AF9%209&run)
[`×/` multiplies all numbers in a list](http://tryapl.org/?a=%D7/%208%20%AF9&run)
[`×/¨` multiplies the pairs in a given list](http://tryapl.org/?a=%u22A2A%u2190%281%202%29%284%205%29%287%209%29%28%AF2%208%29%288%20%AF9%29%28%AF8%209%29%20%u22C4%20%D7/%A8%20A&run)
[`×/∊` mulitplies all numbers in an array](http://tryapl.org/?a=%u22A2A%u2190%281%202%29%284%205%29%287%209%29%28%AF2%208%29%288%20%AF9%29%28%AF8%209%29%20%u22C4%20%D7/%u220A%20A&run)
This applies to all arithmetic functions, arrays of all sizes and ranks, and numbers of all datatypes.
[Answer]
# R, 3 bytes
```
'*'
```
This is a function which takes exactly two arguments. Run as `'*'(a,b)`.
See also `prod` which does the same thing but can take an arbitrary number of arguments.
[Answer]
# [ArnoldC](https://lhartikk.github.io/ArnoldC/), 152 bytes
```
HEY CHRISTMAS TREE c
YOU SET US UP 0
GET TO THE CHOPPER c
HERE IS MY INVITATION a
YOU'RE FIRED b
ENOUGH TALK
TALK TO THE HAND c
YOU HAVE BEEN TERMINATED
```
[Try it online!](https://tio.run/nexus/arnoldc#bc4xDsIwDAXQPafw1qkSQy8Q6Ke2IEmVOEUdS4XEBKdnLkHAUnWxLPnpf4tWiRKHi4qDYYx04ChJnU2kEaDJjCFTglJOlHuqmy11Xalm2UDzCu1MV3YNpIxiQ98jFsSIIEnkRhI/iFqV4L9/VOVylIi2FMKH3DGpPZ/MZ/yD2Pr2V8V2AO0BT4roxFtFuyyvx7Oep/l@ewM "ArnoldC – TIO Nexus")
[Answer]
## [Hexagony](https://github.com/m-ender/hexagony), 9 bytes
```
?{?/*!@'/
```
[Try it online!](https://tio.run/nexus/hexagony#@29fba@vpeigrv//v4WCriUA "Hexagony – TIO Nexus")
This is actually fairly straightforward. Here is the unfolded version:
```
  ? { ?
 / * ! @
' / . . .
 . . . .
  . . .
```
The `/` just redirect the control flow to the second line to save bytes on the third. That reduces the code to this linear program:
```
?{?'*!@
```
This linear code on its own would actually be a valid solution if the input was limited to strictly positive numbers, but due to the possibility of non-positive results, this isn't guaranteed to terminate.
The program makes use of three memory edges in a Y-shape:
```
A   B
 \ /
  |
  C
```
The memory pointer starts on edge `A` pointing towards the centre.
```
?   Read first input into edge A.
{   Move forward to edge B.
?   Read second input into edge B.
'   Move backward to edge C.
*   Multiply edges A and B and store the result in C.
!   Print the result.
@   Terminate the program.
```
I ran a brute force search for 7-byte solutions (i.e. those that fit into side-length 2), and if I didn't make a mistake (or there's a busy-beaver-y solution that takes a long time to complete, which I doubt) then a 7-byte solution doesn't exist. There might be an 8-byte solution (e.g. by reusing the `?` or using only one redirection command instead of two `/`), but that's beyond what my brute force search can do, and I haven't found one by hand yet.
[Answer]
# [Piet](http://www.dangermouse.net/esoteric/piet.html), [16 bytes](http://meta.codegolf.stackexchange.com/questions/10991/how-to-determine-the-length-of-a-piet-program)
```
5bpiaibpikibptai
```
[Online interpreter available here.](http://zobier.net/piet/)
## Explanation
To run, paste the code above in the text box on the right side of the linked page. Below is a graphical representation of this code with codel size 31. The grid is for readability and may interfere with traditional Piet interpreters.  
The code runs linearly from left to right, going along the top of the image until the first green block, where program flow moves to the middle row of codels. The white lone white codel is necessary for program flow. It could be replaced with a codel of any color other than green or dark blue, but I have chosen white for readability.
[![Code Visualization](https://i.stack.imgur.com/IWm75.png)](https://i.stack.imgur.com/IWm75.png)
```
Instruction    Δ Hue    Δ Lightness    Stack
-----------    -----    -----------    -----
In (Number)    4        2              m
In (Number)    4        2              n, m
Multiply       1        2              m*n
Out (Number)   5        1              [Empty]
[Exit]         [N/A]    [N/A]          [Empty]
```
If you think that text is not the best way to represent a Piet program or have an issue with the byte size of Piet programs in general, please let your opinion be known in [the discussion on meta](http://meta.codegolf.stackexchange.com/questions/10991/how-to-determine-the-length-of-a-piet-program).
[Answer]
# [BitCycle](https://github.com/dloscutoff/esolangs/tree/master/BitCycle) `-U`, 68 bytes
```
  >    > v
 ?+ >  +
Bv ?^ v ~
 \  v<CB~\v
 Cv  ^  <\/
^ <@=!   <
0A^
```
[Try it online!](https://tio.run/##FYs7CoAwEAX7PcWzlqCVNvEXz2AXUhgsBFHBsGCTo7smzcAwzLoH//pjEwF6IIMJQ5mlJMMYHBiRYAHWs4k25ZkBB2hbkYMeuyJ9murJiYhqRTXfdYf9Oh9Ryw8)
Multiplying two numbers is not a trivial problem in BitCycle, especially when signs need to be handled! This is my second attempt; the first one (essentially same algorithm, different layout) was 81 bytes, so it's quite possible this one could be shortened too.
The program takes the two numbers as command-line arguments and outputs to stdout. The `-U` flag is to convert the decimal numbers to [signed unary](https://codegolf.stackexchange.com/q/150775/16766), since BitCycle knows only of 0's and 1's.
## Explanation
This explanation assumes you understand the basics of BitCycle (see [Esolangs](https://esolangs.org/wiki/BitCycle) or the GitHub readme). I'll base my explanation on this ungolfed version, seen here computing `-2` times `3`:
[![Signed multiplication in BitCycle](https://i.stack.imgur.com/xS1ZA.gif)](https://i.stack.imgur.com/xS1ZA.gif)
### Overview
Signed unary numbers consist of the sign (`0` for nonpositive, empty for positive) followed by the magnitude (a number of `1`s equal to the number's absolute value). To multiply two of them, we need to XOR the signs (output a `0` if exactly one of them is `0`, or nothing if both or neither are) and then multiply the magnitudes (and output that many `1`s). We'll achieve the multiplication by repeated addition.
### Sign bits
Starting from the two sources `?`, we split off the signs from the magnitudes using `+`. `0`s (sign bits) turn left and are directed along the top row, while `1`s (magnitudes) turn right and end up in the two `B` collectors.
The section that handles the signs looks like this:
```
  v
  \  v
> \  /
! <
```
If both numbers are nonpositive, two `0` bits come in from the top `v`. The first one reflects off the top `\`, is sent southward, and reflects off the `/`. Meanwhile, the second bit passes through the deactivated top `\` and reflects off the bottom `\`. The two bits pass each other, go straight through the now-deactivated splitters on the bottom row, and go off the playfield.
If only one of the numbers is nonpositive, one `0` comes in from the top. It bounces around all three splitters and ends up going northward again, until it hits the `v` and is once more sent south. This time, it passes through the deactivated splitters and reaches the `<`, which sends it into the sink `!`.
### Loops to store the magnitudes
The magnitude of the first number goes into the `B` collector in this section:
```
B v
  \
  C v
^   <
0 A ^
```
Before the `B` collector opens, the `A` collector releases the single `0` that was placed in it, which then goes onto the end of the queue in `B`. We'll use it as a flag value to terminate the loop when all the `1` bits in `B` are gone.
Each time the `B` collectors open, the `\` splitter peels off the first bit from the queue and sends it to the processing logic in the middle. The rest of the bits go into `C`, and when the `C` collectors open, they are sent back into `B`.
The magnitude of the second number goes into the `B` collector in this section:
```
v   ~
C B ~
    <
```
When the `B` collectors open, the bits go into the bottom dupneg `~`. The original `1` bits turn right and are sent west into the processing logic in the middle. The negated copies (`0`s) turn left and immediately hit another dupneg. Here the `0`s turn right and go off the playfield, while the (now doubly) negated `1`s turn left and are sent into `C`. When `C` opens, they go back into `B`.
### Repeated addition
The central processing logic is this part:
```
   v
   v
@  =  !
```
Bits from both loops (one from the western side, and everything from the eastern side) are sent south into the switch `=`. The timing has to be set up so that the bit from the western loop gets there first. If it is a `1`, the switch changes to `}`, sending the following bits eastward into the sink `!` to be output. Once all the `1`s are gone, we get the `0`, which changes the switch to `{`. This sends the following bits into the `@`, which terminates the program. In short, we output the (unary) magnitude of the second number as many times as there are `1`s in the (unary) magnitude of the first number.
[Answer]
# [Python 3](https://docs.python.org/3/), 11 bytes
```
int.__mul__
```
[Try it online!](https://tio.run/nexus/python3#S7ON@Z@ZV6IXH59bmhMf/7@gCMjTSNNILUvM0cjMKygt0dDU1EHhaWr@NzTABFxGxiAIAA "Python 3 – TIO Nexus")
Also works for integers under `2**32` in Python 2.
[Answer]
# TI-Basic, 2 bytes
Very straightforward.
```
prod(Ans
```
[Answer]
# MATLAB, ~~5~~ 4 bytes
```
@dot
```
[`dot`](https://www.mathworks.com/help/matlab/ref/dot.html) takes the [dot product](https://en.wikipedia.org/wiki/Dot_product) of two vectors of equal length. If we feed it with two scalars, it will simply multiply the two numbers.
[`prod`](https://www.mathworks.com/help/matlab/ref/prod.html) takes the product of the values in all rows of each column of a matrix. If the matrix is one-dimensional (i.e. a vector), then it acts along the non-singleton dimension, taking the product of all elements in the vector.
`dot` is one byte shorter than `prod` which is one byte shorter than the even more obvious builtin [`times`](https://www.mathworks.com/help/matlab/ref/times.html).
Call it as such:
```
@dot
ans(3,4)
ans = 
   12
```
[Answer]
# Java 8, ~~10~~ 9 bytes
```
a->b->a*b
```
[Try it here.](https://tio.run/nexus/java-openjdk#bYwxD4IwEIV3fsWNrdFGFhe0o4mDEyNhOCqSmtIWODDE8NsrGJx0epf33ft07V1L8MABRU/aiHtvFWlnxXk9kkgZ7Dq4oravCMD3hdEKOkKaY3D6BvWMWEqttlWWQ8OXN4Cv4HixVFZlu/0p1pQSFJwC7mSxk7gpwrJOPo507KishetJ@FlPxjIl0HszMls@YRWwJtvnnP8F8Qz4IpuiKYQ4Doc3)
# Java 7, 31 bytes
```
int c(int a,int b){return a*b;}
```
[Try it here.](https://tio.run/nexus/java-openjdk#VYy9CoMwFEZ3n@IbkyLSDqWDT9Chk6M4XNMgAb1KctNSJM@eRujS5QzfzzEzhYDHXgFBSJxBdiww6iDVB0e9eyvRM@g0tikDWxznsvwdXqt7YiHHqhPveOoHkD6EQPcJYpdmjdJspZKZlVFs37iz2Ml6Rf150DX@o8ugtW6LIFUp52u@fQE)
As full program **(~~99~~ 90 bytes)**:
```
interface M{static void main(String[]a){System.out.print(new Long(a[0])*new Long(a[1]));}}
```
[Try it here.](https://tio.run/##y0osS9TNL0jNy0rJ/v8/M68ktSgtMTlVwbe6uCSxJDNZoSw/M0UhNzEzTyO4pCgzLz06NlGzOriyuCQ1Vy@/tESvAChYopGXWq7gk5@XrpEYbRCrqYXENYzV1LSurf3//7/pf3MA)
[Answer]
# [Intel 8080 machine code](https://en.wikipedia.org/wiki/Intel_8080), [MITS Altair 8800](https://en.wikipedia.org/wiki/Altair_8800), 28 bytes
This implements [binary multiplication](https://en.wikipedia.org/wiki/Multiplication_algorithm#Peasant_or_binary_multiplication) on the [Intel 8080 CPU](https://en.wikipedia.org/wiki/Intel_8080) (c. 1974) which did not have multiplication or division instructions. Inputs are 8-bit values and the product is a 16-bit value returned in the `BC` register pair.
Here is the machine code along with step-by-step instructions to load the program into an [Altair 8800](https://en.wikipedia.org/wiki/Altair_8800) using the front panel switches.
```
Step    Switches 0-7    Control Switch  Instruction Comment
1                       RESET
2       00 001 110      DEPOSIT         MVI  C, 5   Load multiplier into C
3       00 000 101      DEPOSIT NEXT                value is 5
4       00 010 110      DEPOSIT NEXT    MVI  D, 16  Load multiplicand into D
5       00 010 000      DEPOSIT NEXT                value is 16
6       00 000 110      DEPOSIT NEXT    MVI  B, 0   clear B register (high byte of result)
7       00 000 000      DEPOSIT NEXT
8       00 011 110      DEPOSIT NEXT    MVI  E, 9   set loop counter E multiplier size
9       00 001 001      DEPOSIT NEXT                (8 bits + 1 since loop ends in middle)
10      01 111 001      DEPOSIT NEXT    MOV  A, C   move multiplier into A for shift
11      00 011 111      DEPOSIT NEXT    RAR         shift right-most bit to CF
12      01 001 111      DEPOSIT NEXT    MOV  C, A   move back into C
13      00 011 101      DEPOSIT NEXT    DCR  E      decrement loop counter
14      11 001 010      DEPOSIT NEXT    JZ   19 00  loop until E=0, then go to step 27
15      00 011 001      DEPOSIT NEXT
16      00 000 000      DEPOSIT NEXT
17      01 111 000      DEPOSIT NEXT    MOV  A, B   move sum high byte into A
18      11 010 010      DEPOSIT NEXT    JNC  14 00  add if right-most bit of 
19      00 010 100      DEPOSIT NEXT                multiplier is 1, else go to 22
20      00 000 000      DEPOSIT NEXT
21      10 000 010      DEPOSIT NEXT    ADD  D      add shifted sums
22      00 011 111      DEPOSIT NEXT    RAR         shift right new multiplier/sum
23      01 000 111      DEPOSIT NEXT    MOV  B, A   move back into B
24      11 000 011      DEPOSIT NEXT    JMP  08 00  go to step 10
25      00 001 000      DEPOSIT NEXT
26      00 000 000      DEPOSIT NEXT
27      11 010 011      DEPOSIT NEXT    OUT  255    display contents of A on data panel
28      11 111 111      DEPOSIT NEXT
30      01 110 110      DEPOSIT NEXT    HLT         Halt CPU
31                      RESET                       Reset program counter to beginning
32                      RUN
33                      STOP
```
[Try it online!](https://s2js.com/altair/sim.html)
If you've entered it all correctly, on the machine state drawer in the simulator your RAM contents will look like:
```
0000    0e 05 16 10 06 00 1e 09 79 1f 4f 1d ca 19 00 78 
0010    d2 14 00 82 1f 47 c3 08 00 d3 ff 76
```
**Input**
Multiplier in `C` register, and multiplicand into `D`. The stock Altair has no `STDIN` so input is by front panel switches only.
**Output**
The result is displayed on the `D7`-`D0` lights (top right row) in binary.
`5 x 16 = 80 (0101 0000)`
[![enter image description here](https://i.stack.imgur.com/7qssy.png)](https://i.stack.imgur.com/7qssy.png)
`4 x 5 = 20 (0001 0100)`
[![enter image description here](https://i.stack.imgur.com/2yC06.jpg)](https://i.stack.imgur.com/2yC06.jpg)
`7 x 9 = 63 (0011 1111)`
[![enter image description here](https://i.stack.imgur.com/guPTi.png)](https://i.stack.imgur.com/guPTi.png)
`8 x -9 = -72 (1011 1000)`
[![enter image description here](https://i.stack.imgur.com/ytTE3.png)](https://i.stack.imgur.com/ytTE3.png)
*Compatibility note: this should also run on the [IMSAI 8080](https://en.wikipedia.org/wiki/IMSAI_8080), though currently untested.*
[Answer]
## Pyth, 2 bytes
```
*E
```
[Try it here!](http://pyth.herokuapp.com/?code=%2aE&input=2%0A3&debug=0)
Pyth's automatic evaluation gets in the way here. To get around it, I'm using explicit evaluation for one of the arguments
[Answer]
# PHP, 21 bytes
```
<?=$argv[1]*$argv[2];
```
takes input from command line arguments. Also works with floats.
[Answer]
## [Retina](https://github.com/m-ender/retina), ~~39~~ 35 bytes
*Thanks to Leo for letting me use an idea of his that ended up saving 4 bytes.*
```
[^-]
*\)`--
.+
$*
\G1
_
_|1+
$'
1
```
Input is linefeed-separated.
[Try it online!](https://tio.run/nexus/retina#HcjBDYAgEETR@1SxB42IWbNLNGIFFOBRFHrwau8IXibzfm@OHB@YkMt58wXYOGZmYJ7QWcSgSEivVg3QUpQcFlqx0Q525OGJ6/tXKoW4NWlJquQD) (Space-separated test suite for convenience.)
### Explanation
The first two stages print a minus sign if exactly one of the two inputs is negative. They do this without actually changing the input. This is done by grouping them in the second stage with `)` and turning them into a dry-run with `*`. The `\` option on the second stage prevents printing a trailing linefeed.
```
[^-]
```
First, we remove everything except the minus signs.
```
*\)`--
```
Then we cancel the minus signs if there are two of them left.
```
.+
$*
```
Now we convert each line to the unary representation of its absolute value. This will get rid of the minus sign because `$*` only looks for the first non-negative number in the match (i.e. it doesn't know about minus signs and ignores them).
```
\G1
_
```
The first line is converted to `_`, by matching individual `1`s as long as their adjacent to the previous match (hence, we can't match the `1`s on the second line, because the linefeed breaks this chain).
```
_|1+
$'
```
This performs the actual multiplication. We replace each `_` (on the first line) as well as the entire second line everything *after* that match. The `_` matches will therefore include the entire second line (multiplying it by the number of `0`s in the first line), and the second line will be removed because there is nothing after that match. Of course the result will also include some junk in the form of `_`s and linefeeds, but that won't matter.
```
1
```
We finish by simply counting the number of `1`s in the result.
[Answer]
# [PigeonScript](https://github.com/PigeonScript/PigeonScript), 1 byte
```
*
```
Explanation:  
`*` looks to the stack to see if there is anything there. If not, it prompts for input and multiplies the inputs together
[Answer]
# [Perl 6](http://perl6.org/), 4 bytes
```
&[*]
```
This is just the ordinary infix multiplication operator `*`, expressed as an ordinary function. As a bonus, if given one number it returns that number, and if given no numbers it returns `1`, the multiplicative identity.
[Answer]
# [Owk](https://github.com/phase/owk), 11 bytes
```
λx.λy.x*y
```
This can be assigned to a function like this:
```
multiply:λx.λy.x*y
```
and called like this:
```
result<multiply(a,b)
```
[Answer]
# ><>, 5 Bytes
```
i|;n*
```
Takes input as an ascii character, outputs a number.
### Explanation:
```
i                        | Get input.
 |                       | Mirror: Change the pointer's direction.
i                        | Get input again.
    *                    | Loop around to the right side. Multiply
   n                     | Print the value on the stack, as a number
  ;                      | End the program
```
You could also do
```
ii*n;
```
But I feel my solution is *waaay* cooler.
Another possibility is dropping the semicolon, which would result in the pointer bouncing off the mirror, hitting the print command, and throwing an error since the stack is empty.
[Answer]
# [BitCycle](https://github.com/dloscutoff/esolangs/tree/master/BitCycle), 33 bytes
```
 >>\/v
?+ \/
? +~!/
 A + =
  ~BC^
```
[Try it online!](https://tio.run/##S8osSa5Mzkn9/1/Bzi5Gv4zLXlshRp/LXkG7TlGfS8FRQVvBlktBoc7JOe7///@mBv91jY3@5ReUZObnFf/XDQUA "BitCycle – Try It Online")
This takes input via command line args, with the `-U` flag to convert it into signed unary.
This only uses one pair of collectors in the main loop by representing the first number with unary `0`s and the other number with `1`s, allowing us to store both in the same collector.
### Explanation:
No fancy gifs sorry. This also assumes you have at least a passing familiarity with BitCycle.
```
?+       Get both numbers as signed unary from the ? sources
? +      Sends 0s upwards (0s signify that the number is negative), and 1s downwards
```
```
  >>\/v  Given either 0, 1 or 2 zeroes
  + \/
   + !/  Push a 0 (signifying negative) if there is exactly one 0
```
```
 +      Push the first number as unary 1s to collector A
  +     Push the second number as unary 0s to collector B
 A +    Then push the first number into collector B
  ~BC   Then push both into collector C
```
```
     /    If the first bit out of collector C is 0
   + =    Turn the = into { and discard the first bit
   BC^    All the 0s go back to collector B, and the 1s go up
```
```
  +~!     Duplicate and print all the 1s   
   +      Push the duplicates back into B
  ~B
```
This loops until it runs out of `0s` in the collector, then the `=` turns into a `}` and discards the rest of the `1` bits.
[Answer]
## C#, 10 bytes
```
a=>b=>a*b;
```
It's just a simply multiplication.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 1 byte
```
×
```
[Try it online!](https://tio.run/nexus/jelly#@394@v///y3@61oCAA "Jelly – TIO Nexus")
Obligatory Jelly submission.
]