user6593: Maybe I haven't yet fully understood how transactions work. And if so, please forgive me my stupid question.
But I assume it to be "just" a digitally signed message like "send 1 BTC to Bob" where Bob is identified by its public key (of course obeying to some protocol). The transaction is then signed with my private key which prevents later modification and then sent to the network for hashing and block-building...
I'm not sure how Bob is notified of the transaction.
Does his client software really have to parse the block chain to find the transaction where his public key is listed?
And even more interesting is the question how the sender of the money is restricted to only send as much money as they have? Is this all managed by the Bitcoin client?
If so, I could write my own software which just uses the (or: any) amount of (Bitcoin) money together with the recipient's public key and build the transaction ASN specified somewhere in the protocol.
Who checks the balance and when is it checked?
Does my Bitcoin client fully dive into the block chain and calculates the balance?
Is this then trusted by the network?
Or does the network (e.g. when building and hashing the block) also a verification of all the public keys from their first transactions on?

user75001: Bitcoin doesn't track account balances like traditional accounting, it only keeps a record of where BTC came from and which address it is sent to. So, your receiving address doesn't technically have a recorded balance, only a calculated balance for all the transactions received on that address. Once you send Bitcoin, the unspent transaction output you reference when sending becomes spent and the calculated balance for that address you originally received on becomes zero.
You may find this video of assistance:
How Bitcoin Works Under the Hood

user575: 
The network knows your "balance" because all the transactions that credited or debited it are in the blockchain.
If Bob is using a full node then yes, his client knows and parses the blockchain (and also floating transactions). However, it doesn't need to go over the whole thing every time, there are more efficient data structures for that. Also, some people use lightweight clients which outsource the work of keeping track of the entire blockchain.
Of course the network doesn't trust your client to "do the right thing", that would be stupid. You must reference a valid previous output, known to the network, in the transaction you sign and broadcast.


user1453: To just address the transaction part (the "balance" part has already been addressed pretty well by the others):
When you make a transaction, you must refer to previous transactions pouring into your address as "input". In your transaction, after specifying these inputs, you need to specify output addresses and how much money goes to each. Any leftovers can be outputted back to your address, however if you wish to leave a transaction fee then you just imbalance the output (make it less than the input).
Of course, this in itself doesn't solve the problem of double spending. However, the concept of mining does.
When Bitcoin miners add your block to the chain, they verify that you're not spending bitcoins from an already-spent transaction. Of course, a miner could neglect to do so, but then the mined block would be rejected by the network and he wouldn't get the mining reward. Most nodes are honest nodes, so a large-scale double spend isn't a easy as it seems at first glance.

user153: The network doesn't know your current balance.
The bitcoin network doesn't use the concept of "balances".  Instead the Bitcoin ledger tracks assignments of value.  So every bitcoin that exists was initially claimed by a miner, and then there have been assignments of value ever since.  
Now a bitcoin client can show a "balance" for an address but that balance is simply the result of looking at all the transactions for an address and determining which payment assignments made to that address remain unspent.
An unspent transaction is referred to as an UTXO (unspent transaction output).
So a balance for an address is simply all the UTXOs for that address.   This can be determined from the blockchain.  This is a huge amount of transaction data but that's why the Bitcoin-Qt/bitcoind client uses LevelDB which is very efficient at retrieving from a dataset like the blockchain.

6593: <p>Maybe I haven't yet fully understood how transactions work. And if so, please forgive me my stupid question.</p>
<p>But I assume it to be &quot;just&quot; a digitally signed message like &quot;send 1 BTC to <em>Bob</em>&quot; where <em>Bob</em> is identified by its public key (of course obeying to some protocol). The transaction is then signed with my private key which prevents later modification and then sent to the network for hashing and block-building...</p>
<p>I'm not sure how Bob is notified of the transaction.
Does his client software really have to parse the block chain to find the transaction where his public key is listed?</p>
<p>And even more interesting is the question how the sender of the money is restricted to only send as much money as they have? Is this all managed by the Bitcoin client?
If so, I could write my own software which just uses the (or: any) amount of (Bitcoin) money together with the recipient's public key and build the transaction ASN specified somewhere in the protocol.
Who checks the balance and when is it checked?
Does my Bitcoin client fully dive into the block chain and calculates the balance?
Is this then trusted by the network?
Or does the network (e.g. when building and hashing the block) also a verification of all the public keys from their first transactions on?</p>
 75001: <p>Bitcoin doesn't track account balances like traditional accounting, it only keeps a record of where BTC came from and which address it is sent to. So, your receiving address doesn't technically have a recorded balance, only a calculated balance for all the transactions received on that address. Once you send Bitcoin, the unspent transaction output you reference when sending becomes spent and the calculated balance for that address you originally received on becomes zero.</p>

<p>You may find this video of assistance:<br>
<a href="https://youtu.be/Lx9zgZCMqXE" rel="nofollow noreferrer">How Bitcoin Works Under the Hood</a></p>
 575: <ol>
<li>The network knows your "balance" because all the transactions that credited or debited it are in the blockchain.</li>
<li>If Bob is using a full node then yes, his client knows and parses the blockchain (and also floating transactions). However, it doesn't need to go over the whole thing every time, there are more efficient data structures for that. Also, some people use lightweight clients which outsource the work of keeping track of the entire blockchain.</li>
<li>Of course the network doesn't trust your client to "do the right thing", that would be stupid. You must reference a valid previous output, known to the network, in the transaction you sign and broadcast.</li>
</ol>
 1453: <p>To just address the transaction part (the "balance" part has already been addressed pretty well by the others):</p>

<p>When you make a transaction, you <em>must</em> refer to previous transactions pouring into your address as "input". In your transaction, after specifying these inputs, you need to specify output addresses and how much money goes to each. Any leftovers can be outputted back to your address, however if you wish to leave a transaction fee then you just imbalance the output (make it less than the input).</p>

<p>Of course, this in itself doesn't solve the problem of double spending. However, the concept of mining does.</p>

<p>When Bitcoin miners add your block to the chain, they verify that you're not spending bitcoins from an already-spent transaction. Of course, a miner could neglect to do so, but then the mined block would be rejected by the network and he wouldn't get the mining reward. Most nodes are honest nodes, so a large-scale double spend isn't a easy as it seems at first glance.</p>
 153: <p>The network doesn't know your current balance.</p>

<p>The bitcoin network doesn't use the concept of "balances".  Instead the Bitcoin ledger tracks assignments of value.  So every bitcoin that exists was initially claimed by a miner, and then there have been assignments of value ever since.  </p>

<p>Now a bitcoin client can show a "balance" for an address but that balance is simply the result of looking at all the transactions for an address and determining which payment assignments made to that address remain unspent.</p>

<p>An unspent transaction is referred to as an UTXO (unspent transaction output).</p>

<p>So a balance for an address is simply all the UTXOs for that address.   This can be determined from the blockchain.  This is a huge amount of transaction data but that's why the Bitcoin-Qt/bitcoind client uses LevelDB which is very efficient at retrieving from a dataset like the blockchain.</p>
