Bitmern Solo
Bitmern Solo
Log inStart Mining
← Back to blog

nBits & the Target Explained: How Bitcoin Writes “Hard Enough” Into Every Block

nBits is a 4-byte field in the Bitcoin block header. Its first byte is an exponent and the next three bytes are a mantissa; together they encode the 256-bit…

9 min read
nBits & the Target Explained: How Bitcoin Writes “Hard Enough” Into Every Block
nBits & the Target Explained: How Bitcoin Writes “Hard Enough” Into Every Block

Every miner on the network is chasing the same thing: a block hash that is low enough. But "low enough" has to be written down somewhere precise, or nobody could agree on whether a block is valid. That somewhere is a 4-byte field in the block header called nBits. It is a compressed way of writing a giant 256-bit number called the target — and once you understand it, "difficulty", "share difficulty", and "best diff" all click into place.

nBits is a 4-byte field in the Bitcoin block header. Its first byte is an exponent and the next three bytes are a mantissa; together they encode the 256-bit target. A block is valid only if its hash is at or below that target. Difficulty is a friendlier number: max target ÷ current target. The target is retargeted every 2,016 blocks, aiming for roughly 10-minute blocks. Pools use their own, much easier share targets to measure your work. On Bitmern Solo, keep BTC easy-start host btc.bitmernsolo.com with port :3132, username WALLET.worker, password x. Current Effort is not a find guarantee.

This post is the "how the bar is written" lane. For how the bar moves over time, read difficulty adjustment explained. For the pool-side version of the bar, read share difficulty explained. For all six header fields, read the Bitcoin block header explained. For the header bits your miner can flip, read version rolling explained.

Bitmern Solo is solo infrastructure: flat 1% fee on finds only, you keep 99%. Nothing in this post is financial advice, and nothing here promises a find.

The one-sentence version

nBits is the block header's shorthand for the target, and a block only counts if its hash is at or below that target.

Target first, nBits second

Proof of work boils down to one comparison:

double-SHA-256(header)  ≤  target   →  valid block
double-SHA-256(header)  >  target   →  try again

Both sides are 256-bit numbers. The hash looks random; the target is a fixed threshold. The lower the target, the fewer possible hashes fall under it, and the harder it is to find one. That is why people talk about hashes needing "leading zeros": a lower target means the winning hash has to start with more zeros when written in hex.

Writing out a full 256-bit target in every header would take 32 bytes. Bitcoin does not bother. It uses a 4-byte compact form instead — nBits.

How the compact encoding works

nBits is 4 bytes. Read it as hex and split it like this:

Part Bytes Meaning Exponent First byte How many bytes long the full target is Mantissa Next three bytes The significant digits of the target

The rule, in plain terms: take the 3-byte mantissa and shift it left so the whole number is "exponent" bytes long. Formally:

target = mantissa × 256^(exponent − 3)

That is a bit like scientific notation, just in base 256 instead of base 10. A handful of significant digits plus a size tells you the whole number, without writing every digit.

It is a compact form, so it cannot express every possible 256-bit number — only ones whose significant part fits in that 3-byte mantissa. That is fine: the network only needs a target that is precise enough.

Worked decode (EXAMPLE ONLY — the genesis value)

The cleanest example is the value used in Bitcoin's very first block: 0x1d00ffff. It corresponds to difficulty 1. This is a historical reference value, not today's target.

EXAMPLE ONLY — genesis nBits, not the current network target

nBits      = 0x1d00ffff
exponent   = 0x1d        = 29 (bytes)
mantissa   = 0x00ffff

target     = 0x00ffff × 256^(29 − 3)
           = 0x00ffff × 256^26

As a 64-digit hex number:
0x00000000ffff0000000000000000000000000000000000000000000000000000

Count it out: the mantissa 00ffff lands so the full number is 29 bytes long, which leaves 3 zero bytes (6 hex zeros) in front of it in a 32-byte value — plus the leading 00 of the mantissa itself. That is the eight leading zero hex digits you can see at the front. Any header whose double-SHA-256 is at or below that number would have met a difficulty-1 target.

This value matters beyond history: it is the max target that difficulty is measured against.

Target vs difficulty

Targets are awkward to talk about. Nobody wants to compare 64-digit hex numbers in a chat. So Bitcoin also expresses the same bar as difficulty:

difficulty = max target ÷ current target
  • When the current target equals the max target, difficulty is 1.
  • When the target is half the max target, difficulty is 2 — twice as hard.
  • When the target gets smaller, difficulty gets bigger.

Same information, two directions:

Concept Gets harder when it… Who uses it Target Goes down Consensus code, the actual hash comparison Difficulty Goes up Humans, dashboards, explorers nBits Encodes a lower target The block header (compact storage)

We are not quoting current network difficulty here — it changes, and an explorer will always be more current than a blog post.

How the target changes: every 2,016 blocks

The target is not fixed forever. Every 2,016 blocks, the network recalculates it so that blocks keep arriving at roughly 10-minute intervals on average. If blocks came in faster than that over the last period, the target drops (harder). If slower, it rises (easier). The new target gets written into nBits for the blocks that follow.

At about 10 minutes per block, 2,016 blocks works out to roughly two weeks — but that is a target average, not a calendar promise. The full mechanics are in difficulty adjustment explained. The point for this post: between retargets, every block template carries the same nBits, and your miner cannot change it.

Network target vs share target

Here is where pool mining — including solo pool mining — adds a second bar.

If the only thing your Bitaxe ever reported was a full network-target hash, the pool would almost never hear from it. So the pool gives the miner a much easier share target (expressed as share difficulty). Every hash that beats the share target gets submitted as a share. Shares prove your miner is working and let the pool attribute that work to your WALLET.worker.

EXAMPLE ONLY — illustrative numbers

max target (difficulty 1)      → baseline
share difficulty = 1,000        → share target = max target ÷ 1,000
network difficulty = (huge)     → network target = max target ÷ (huge)

Every block-winning hash is also a valid share.
Almost every share is nowhere near a block.

The same formula — max target ÷ difficulty — works for both. That is why the pool can talk about share difficulty and network difficulty on one scale. Read more in share difficulty explained.

Best diff, Current Effort, and the target

Two dashboard ideas sit right on top of this:

  • Best diff is the highest difficulty any of your hashes has reached — how close your luckiest hash came to the network target. See best diff explained.
  • Current Effort compares work done in the current round with the work expected at the network target. See difficulty vs effort.

Neither one is a countdown. A hash either meets the target or it does not; past attempts do not make the next one more likely. Current Effort is not a find guarantee.

Checklist: reading nBits and targets in practice

1. Know which number you are looking at

Symptom: An explorer shows "bits", "target", and "difficulty" and they look unrelated.

Fix: They are the same bar three ways: compact (nBits), raw (target), friendly (difficulty).

2. Do not try to set nBits

Symptom: You wonder if a firmware setting can make the target easier.

Fix: It cannot. nBits comes from the network. Your miner can roll nonce, extranonce, nTime, and version bits — not the target.

3. Keep share difficulty and network difficulty separate

Symptom: You see lots of accepted shares and expect a block.

Fix: Shares meet the easier share target. A block needs the network target. See share difficulty explained.

4. Keep stratum fields correct

Symptom: No shares at all.

Fix:

Host:     btc.bitmernsolo.com
Port:     3132
Username: WALLET.worker
Password: x

Easy-start for BTC on a Bitaxe is :3132.

5. Confirm on the dashboard

Symptom: You are not sure your work is being counted.

Fix: Open the BTC tab on Bitmern Solo and check workers, shares, and hashrate for your WALLET.worker.

What this post will not invent

  • No current network difficulty or target values — check an explorer
  • No time-to-find estimates, hashrate numbers, prices, or ROI
  • No financial advice
  • No find guarantees; Current Effort is not one either

Common nBits and target misunderstandings

  1. "A higher target means harder mining." Backwards. A lower target is harder; difficulty is the number that goes up.
  2. "nBits is the difficulty." It encodes the target. Difficulty is derived from it.
  3. "My miner can pick an easier nBits." No. A block with the wrong nBits is invalid.
  4. "Share difficulty changes my odds of a block." Share difficulty changes how often you report work, not the network target your hashes must meet to win.
  5. "Leading zeros are the rule." The rule is "hash ≤ target." Leading zeros are just a handy way to picture it.
  6. "High Current Effort means the target will be easier for me soon." No. Current Effort is not a find guarantee, and the target is the same for everyone.

Soft next step

Pick any recent block on an explorer and find its "bits" field, then compare it with the difficulty shown. You will be reading the same bar two ways. Then make sure AxeOS is set to btc.bitmernsolo.com, port :3132, username WALLET.worker, password x. Flat 1% on finds only; you keep 99%.

Start mining

Start Mining — after login, open the BTC tab and confirm workers, shares, and hashrate.

FAQ

What is nBits in a Bitcoin block header?

A 4-byte field that encodes the target in compact form: the first byte is an exponent, the next three bytes are a mantissa.

What is the Bitcoin target?

A 256-bit number. A block is valid only if its double-SHA-256 hash is at or below it.

How are target and difficulty related?

Difficulty = max target ÷ current target. A lower target means a higher difficulty.

What does 0x1d00ffff mean?

It is the genesis-block nBits value, which corresponds to difficulty 1 — the max target. It is an example, not today's value.

How often does the target change?

Every 2,016 blocks, aiming for roughly 10-minute blocks on average.

What does Bitmern Solo charge?

A flat 1% fee on finds only — you keep 99%.

Does Current Effort mean I am about to find a block?

No. Current Effort is an attribution signal — not a find guarantee. See Current Effort explained.

Related posts