<p>The coin selection that the client does is performed behind the scenes, the client takes care of the details.</p>

<p>But if you are curious to know what happens behind the scenes:</p>

<p>INPUT:</p>

<ul>
<li>Address: A  1.0 BTC</li>
<li>Address: B  1.0 BTC</li>
</ul>

<p>OUTPUT:</p>

<ul>
<li>Address: C  2.0 BTC</li>
</ul>

<p>FEE (derived as inputs - outputs): 0.0 BTC</p>

<p>This is assuming you didn't pay a fee.</p>

<hr>

<p>Let's say instead you only were to pay 1.5 BTC, and a 0.0005 BTC Fee.</p>

<p>INPUT:</p>

<ul>
<li>Address: A  1.0 BTC</li>
<li>Address: B  1.0 BTC</li>
</ul>

<p>OUTPUT:</p>

<ul>
<li>Address: C  1.5 BTC</li>
<li>Address: D  0.4995 BTC</li>
</ul>

<p>FEE (derived as inputs - outputs): 0.0005 BTC</p>

<p>Address D was an address from your own wallet that the client chose to receive the change transaction.  Your balance in your wallet will then show 0.49995 BTC.</p>

<hr>

<p>Here's a technical explanation:</p>

<ul>
<li><a href="http://en.bitcoin.it/wiki/Transactions">http://en.bitcoin.it/wiki/Transactions</a></li>
</ul>

CC BY-SA 3.0
2012-05-18T00:07:02.790Z
2012-05-18T00:07:02.790Z
Stephen Gornick
<p>A Bitcoin transaction can have multiple inputs (and multiple outputs). In the scenario you described, a single transaction will be created, which will include as inputs both the payment to A and the payment to B.</p>

<p>Usually, the receiving party will not care what are the inputs of a transaction, he will care that the output will include the expected payment to his own address.</p>

CC BY-SA 3.0
2012-05-18T04:27:20.230Z
2012-05-18T04:27:20.230Z
Meni Rosenfeld
<p>I'm new to Bitcoin and am considering allowing people to pay for my software with them. Before I continue I would like to clarify some things. My googling did not get me the answers I was after.</p>

<p>I understand that you can create new addresses for each transaction. Say I have 1BTC paid to A and 1BTC paid to B.</p>

<p>On the overview tab of the default Bitcoin client, the balance would be displayed as 2BTC. I can only assume it has simply added up all the amounts in A and B address?</p>

<p>But when I send 2BTC to address C, does it create a new 'sending address' X and move to amounts from A and B to X and then send to C or send two transactions, one from each account A and B?</p>

CC BY-SA 3.0
2012-05-18T03:46:18.657Z
There really aren't "sending addresses" in Bitcoin. The client creates a transaction that gathers all the inputs and sends them as an output.
David Schwartz
<transactions><address><sending><receiving>
Sending and Receiving Mechanics
hozza
# Sending and Receiving Mechanics

(Asked by: username_0 on 2012-05-17)

I'm new to Bitcoin and am considering allowing people to pay for my software with them. Before I continue I would like to clarify some things. My googling did not get me the answers I was after.

I understand that you can create new addresses for each transaction. Say I have 1BTC paid to A and 1BTC paid to B.

On the overview tab of the default Bitcoin client, the balance would be displayed as 2BTC. I can only assume it has simply added up all the amounts in A and B address?

But when I send 2BTC to address C, does it create a new 'sending address' X and move to amounts from A and B to X and then send to C or send two transactions, one from each account A and B?

**Tags:** transactions, address, sending, receiving

> **Comments:**
> **username_1**: There really aren't "sending addresses" in Bitcoin. The client creates a transaction that gathers all the inputs and sends them as an output.  

---

## 2 answers

### Answer by username_2 on 2012-05-18. Score: 5

The coin selection that the client does is performed behind the scenes, the client takes care of the details.

But if you are curious to know what happens behind the scenes:

INPUT:

* Address: A 1.0 BTC
* Address: B 1.0 BTC

OUTPUT:

* Address: C 2.0 BTC

FEE (derived as inputs - outputs): 0.0 BTC

This is assuming you didn't pay a fee.

---

Let's say instead you only were to pay 1.5 BTC, and a 0.0005 BTC Fee.

INPUT:

* Address: A 1.0 BTC
* Address: B 1.0 BTC

OUTPUT:

* Address: C 1.5 BTC
* Address: D 0.4995 BTC

FEE (derived as inputs - outputs): 0.0005 BTC

Address D was an address from your own wallet that the client chose to receive the change transaction. Your balance in your wallet will then show 0.49995 BTC.

---

Here's a technical explanation:

* <http://en.bitcoin.it/wiki/Transactions>


---

### Answer by username_3 on 2012-05-18. Score: 3

A Bitcoin transaction can have multiple inputs (and multiple outputs). In the scenario you described, a single transaction will be created, which will include as inputs both the payment to A and the payment to B.

Usually, the receiving party will not care what are the inputs of a transaction, he will care that the output will include the expected payment to his own address.


---

