§ 01

§ 01 · Bytes & numbers · Overview

Bytes & numbers

How a computer writes down every key, hash and amount

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 bytes, 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.

Block 130,825 · header 108 bytes
00000020 d3221e43dc59c5d0dae1ee53987d6a4abeef42567d682017a6edd6e0de7ac7ab 2a051d25484d57e49a1f3b757685403ed06f558bb06a1804c34fac74ee7f5fab 8393d76a ebd06a17 ce6de312e0e4ca6c862c05835314db00cf02c13a20ea4810940f09b64ed8ba86
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.
Block hash
3fc851763893a0135ea756d5dcbe355f375e613957930e7f401fafc8ee5533ae
Height
130,825
Time
2026-10-20 16:14:59 UTC
Difficulty
40,208,379.92

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.

In this group

  1. 01.01 Hexadecimal Counting in sixteens, two characters per byte
  2. 01.02 Bytes Eight bits, one number from 0 to 255
  3. 01.03 Byte order Why Pearl's numbers are stored backwards, and its hashes shown backwards
  4. 01.04 CompactSize A length that takes one byte, unless it really needs more

The codex

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.