If I buy half a bitcoin at $500 and the value of a bitcoin goes up to $1000, does that mean I earn 1 bitcoin or do I have to buy a full bitcoin to get the price increase? How does it work? Please give me some examples.
I'm not sure when you say "If I buy half a bitcoin at $500" whether you mean you paid $500, or whether you mean the price of one bitcoin was $500 and you paid $250 for half a bitcoin.
If you buy half a bitcoin for $500, that means the value of one bitcoin is already $1000. The price can not increase from $1000 to $1000.
If you buy half a bitcoin when the price is $500, you paid $250, which means if the price increases to $1000 then you can sell your half a bitcoin for $500.
I think you should rephrase your question. Or maybe this is fundamentally an arithmetic question, rather than specific to Bitcoin.
Bitcoin is like any other investment, you will profit/lose the percentage Bitcoin changes on your capital investment.
If you invest 100$ into Bitcoin and Bitcoin increases 10%, you will earn 10% on the $100.
If you invest $10 into Bitcoin and it drops %50, you will lose %50 of your initial investment.
With there only being 21 million Bitcoin possible to be mined, only a select few will have full bitcoins in the future.
The earnings/loses will only occur when you cash out. BTC also has associated fees, so when depositing say $200, the amount of BTC received will not be exactly worth $200.
Technically you don't earn anything until you sell it. So just consider it like any other commodity:
Start off with 0 bitcoin and $500
Buy 0.5 bitcoins for $500.
You now own 0.5 bitcoin, and $0. You've exchanged one item, dollars, for another, bitcoin.
Bitcoin price goes up relative to the dollar.
You now own 0.5 bitcoin, and $0. The amount of bitcoin hasn't changed, merely the value relative to another item.
Sell 0.5 bitcoin for $1,000.
You now own 0 bitcoin, and $1,000. You're trading bitcoin for cash, so the relative value determines what you can sell it for, and since that value has changed you can exchange it for more than originally purchased. However, the amount of bitcoin hasn't changed. Just its value.
So while the price of bitcoin fluctuates, it doesn't really mean anything until you trade it for goods or cash. Once you do that, depending on the sell price, you may have increased or decreased in wealth depending on whether the value of the dollar has also changed. It's an exchange.
You don't gain or lose bitcoin when its value changes. It simply becomes more or less valuable, and the amount you hold remains the same.