<p>All transactions are actually stored and transmitted in satoshis (one hundred millionths of a bitcoin or bitcoin × 10<sup>8</sup>). So really, it is not divisibility, as much as it is converted by multiplying in the UI. It's always satoshis, but shown as various bigger units.</p>

<p>If you divide the the number of satoshis by 100m you get the value in bitcoin. If instead of dividing by 100m, you divide by 100k, you get mBTC (millibitcoin), if you divide by 100 you get μBTC (microbitcoin).</p>

CC BY-SA 3.0
2013-09-11T19:33:44.037Z
I don't think this is accurate.  Bitcoins are divisible to satoshis, but transactions are sent in the desired amount.  My understanding is that when a miner signs a block, that becomes the bitcoins, where this one unit was originally equal to 50 bitcoins.  There being 50 bitcoins to a block was just an abstraction for the value of a block.
Zamicol
CC BY-SA 3.0
2013-09-12T12:29:15.373Z
@Zach: aantonop is actually right, in the underlying protocol bitcoin values are always written as satoshis. I will also correct that in my answer.
Murch
CC BY-SA 3.0
2013-09-13T23:43:47.883Z
@Zach: no, you're confusing the monetary unit and blocks. Blocks are lists of transaction and form an authorative history for the network. Blocks are allowed to contain one transaction that conjures new currency out of nothing, under strictly controlled conditions, called the miner subsidy. So blocks do introduce new coins, they are not coins, and the amounts are always internally represented as multiples of a satoshi, even for subsidies.
Pieter Wuille
CC BY-SA 3.0
2013-09-14T23:25:41.287Z
Thanks Pieter and Murch!  

If I broke a ten dollar bill into two units, a $2.85 unit and a $7.15 cent unit, amounts are measured in pennies, but these units don't necessarily need to be transmitted or stored in pennies.  The only case this would happen is if I actually broke them out into pennies.
Zamicol
CC BY-SA 3.0
2013-09-15T14:29:39.577Z
Now I get what you were talking about. Yes, units are of variable size in the network and their value is measured in satoshis.
Murch
CC BY-SA 3.0
2013-09-06T20:52:06.813Z
2017-12-25T06:19:32.417Z
2017-12-25T06:19:32.417Z
aantonop
<p>A bitcoin is divisible to the eighth decimal. The smallest portion of Bitcoin has its own name: <a href="https://bitcoin.stackexchange.com/questions/114/what-is-a-satoshi">satoshi</a>, whereas 1 BTC = 10^8 satoshis = 100,000,000 satoshis</p>

<p>To be completely correct, while in popular conversation the bitcoin is the predominant currency unit, in realitas the protocol uses satoshi. You can see this when looking at raw transactions or the ledger.</p>

<p>Whenever you send a Bitcoin transaction, the inputs are destroyed and new outputs are created. Essentially, what happens with Bitcoin works like this: Imagine you are paying for a $5 ice cream with a $10 bill, and the $10 bill is destroyed and replaced by two $5 bills, of which you get one $5 bill and one $5 bill goes to the ice cream vendor. </p>

<p>I was not able to deduce what you are trying to get code for, but if you want to split up bitcoins for transactions you might be looking for more information on how to create <a href="https://en.bitcoin.it/wiki/Raw_Transactions" rel="nofollow noreferrer">raw transactions</a>, as dannypaz pointed out in the comments, the Bitcoin Wiki's page on <a href="https://en.bitcoin.it/wiki/Transaction" rel="nofollow noreferrer">transactions</a> may also be illustrative. </p>

CC BY-SA 3.0
2018-03-25T05:51:22.023Z
Your answer is great @Murch. I wanted to add to this, that you can see another example here: https://en.bitcoin.it/wiki/Transaction which also helped me understand the concept
dannypaz
CC BY-SA 3.0
2018-03-26T16:44:26.183Z
@dannypaz: Thanks, I've added your link as an additional example.
Murch
CC BY-SA 3.0
2013-09-06T18:28:24.370Z
2018-03-26T16:44:11.800Z
2018-03-26T16:44:11.800Z
Murch
<p>I come from a programming background and I am trying to figure out how Bitcoin allows for divisibility.  An example using high level code would also be nice.</p>

<p>I understand the high level basics of transactions (<a href="http://www.zerohedge.com/sites/default/files/images/user3303/imageroot/2013/05/20130512_BTC.jpg" rel="noreferrer" title="Bitcoin Transaction Diagram">Bitcoin Transaction Diagram</a>), but I am interested in divisibility specifically.  </p>

<transactions><divisibility>
How does Bitcoin divisibility work?
Zamicol
# How does Bitcoin divisibility work?

(Asked by: username_0 on 2013-09-06)

I come from a programming background and I am trying to figure out how Bitcoin allows for divisibility. An example using high level code would also be nice.

I understand the high level basics of transactions ([Bitcoin Transaction Diagram](http://www.zerohedge.com/sites/default/files/images/user3303/imageroot/2013/05/20130512_BTC.jpg "Bitcoin Transaction Diagram")), but I am interested in divisibility specifically.

**Tags:** transactions, divisibility


---

## 2 answers

### Answer by username_2 on 2013-09-06. Score: 8 | Accepted answer

A bitcoin is divisible to the eighth decimal. The smallest portion of Bitcoin has its own name: [satoshi](https://bitcoin.stackexchange.com/questions/114/what-is-a-satoshi), whereas 1 BTC = 10^8 satoshis = 100,000,000 satoshis

To be completely correct, while in popular conversation the bitcoin is the predominant currency unit, in realitas the protocol uses satoshi. You can see this when looking at raw transactions or the ledger.

Whenever you send a Bitcoin transaction, the inputs are destroyed and new outputs are created. Essentially, what happens with Bitcoin works like this: Imagine you are paying for a $5 ice cream with a $10 bill, and the $10 bill is destroyed and replaced by two $5 bills, of which you get one $5 bill and one $5 bill goes to the ice cream vendor.

I was not able to deduce what you are trying to get code for, but if you want to split up bitcoins for transactions you might be looking for more information on how to create [raw transactions](https://en.bitcoin.it/wiki/Raw_Transactions), as username_4 pointed out in the comments, the Bitcoin Wiki's page on [transactions](https://en.bitcoin.it/wiki/Transaction) may also be illustrative.

> **Comments:**
> **username_4**: Your answer is great @username_2. I wanted to add to this, that you can see another example here: https://en.bitcoin.it/wiki/Transaction which also helped me understand the concept  
> **username_2**: @username_4: Thanks, I've added your link as an additional example.  

---

### Answer by username_1 on 2013-09-06. Score: 2

All transactions are actually stored and transmitted in satoshis (one hundred millionths of a bitcoin or bitcoin × 108). So really, it is not divisibility, as much as it is converted by multiplying in the UI. It's always satoshis, but shown as various bigger units.

If you divide the the number of satoshis by 100m you get the value in bitcoin. If instead of dividing by 100m, you divide by 100k, you get mBTC (millibitcoin), if you divide by 100 you get μBTC (microbitcoin).

> **Comments:**
> **username_0**: I don't think this is accurate.  Bitcoins are divisible to satoshis, but transactions are sent in the desired amount.  My understanding is that when a miner signs a block, that becomes the bitcoins, where this one unit was originally equal to 50 bitcoins.  There being 50 bitcoins to a block was just an abstraction for the value of a block.  
> **username_2**: @Zach: username_1 is actually right, in the underlying protocol bitcoin values are always written as satoshis. I will also correct that in my answer.  
> **username_3**: @Zach: no, you're confusing the monetary unit and blocks. Blocks are lists of transaction and form an authorative history for the network. Blocks are allowed to contain one transaction that conjures new currency out of nothing, under strictly controlled conditions, called the miner subsidy. So blocks do introduce new coins, they are not coins, and the amounts are always internally represented as multiples of a satoshi, even for subsidies.  
> **username_0**: Thanks username_3 and username_2!    If I broke a ten dollar bill into two units, a $2.85 unit and a $7.15 cent unit, amounts are measured in pennies, but these units don't necessarily need to be transmitted or stored in pennies.  The only case this would happen is if I actually broke them out into pennies.  
> **username_2**: Now I get what you were talking about. Yes, units are of variable size in the network and their value is measured in satoshis.  

---

