§ 01 · Bytes & numbers · Overview
Bytes & numbers
How a computer writes down every key, hash and amount
On this page 3 sections
Before you can read a Pearl block or transaction, you need four small ideas about how computers write numbers down.
None of them is special to Pearl. They come straight from Bitcoin, unchanged. But they are everywhere: in every key, every hash, every amount and every header. Learn them once and the rest of the codex opens up.
Why start with bytes?
Because that’s what Pearl really is underneath. A transaction isn’t a form with boxes. It’s a row of bytesByte: Eight bits, enough to hold a whole number from 0 to 255. Written as two hexadecimal characters, from 00 to ff., and the meaning comes from where each byte sits.
Here is the real header of block 130,825, all 108 bytes of it. By the end of this group you will be able to read every part: the version, the reversed hashes, the time and the bits.
| Field | Bytes | Value |
|---|---|---|
| Version header.version | 4 @0 | 0x20000000 int32 LE. BIP-9 style 0x20000000 since block 1; no consensus meaning in Pearl. |
| Previous block header.prevBlock | 32 @4 | abc77adee0d6eda61720687d5642efbe4a6a7d9853eee1dad0c559dc431e22d3 Hash of the parent block, stored byte-reversed; shown in display order. |
| Merkle root header.merkleRoot | 32 @36 | ab5f7fee74ac4fc304186ab08b556fd03e408576753b1f9ae4574d48251d052a Root of the SHA256d Merkle tree of this block’s txids, stored byte-reversed. |
| Time header.timestamp | 4 @68 | 1792512899 (2026-10-20 16:14:59 UTC) uint32 LE Unix seconds. Must be at least 1 s after the parent and at most 5 min in the future. |
| Bits header.bits | 4 @72 | 0x176ad0eb Compact target. Difficulty 40208379.91968057. The certificate's jackpot hash (not this header's hash) must meet it. |
| Proof commitment header.proofCommitment | 32 @76 | 86bad84eb6090f941048ea203ac102cf00db145383052c866ccae4e012e36dce SHA256d(LE32(certificate version) ‖ public data). Replaces Bitcoin’s nonce: Pearl headers have no nonce. |
What’s in this group?
Read these in order. Each one takes about five minutes.
| Page | What you’ll learn |
|---|---|
| Hexadecimal | Why keys and hashes are written with 0–9 and a–f, and how to convert by hand. |
| Bytes | What a byte holds, how big Pearl’s pieces are, and how negative numbers and text fit in. |
| Byte order | Why numbers are stored “backwards” and why hashes are shown reversed. |
| CompactSize | The tiny length prefix in front of every list and script. |
Where do these ideas show up in Pearl?
Everywhere, but a few places are worth knowing in advance:
- Hashes (block hashes, transaction IDs) are 32 bytes, shown as 64 hex characters, with their bytes reversed for display.
- Amounts are 8-byte little-endian whole numbers of grains. One PRL is 100,000,000 grains.
- The header’s time and bits are 4-byte little-endian numbers.
- Every count and length inside a transaction (inputs, outputs, scripts, witness items) is a CompactSize.
- Pearl’s mining tickets are BLAKE3 hashes read as little-endian 256-bit numbers, which is one of the few places where byte order decides who wins a block.