<p>take first 160 symbols from <a href="https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7?format=hex" rel="nofollow noreferrer">https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7?format=hex</a></p>

<p>should I explain more? :))))</p>

<p><strong>update:</strong></p>

<p><code>01000000</code> version</p>

<p><code>a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b0200000000</code> prev hash</p>

<p><code>38805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff</code> merkle hash </p>

<p><code>27b80a4c</code> timestamp</p>

<p><code>5c670f1c</code> bits</p>

<p><code>8bedfd00</code> nonce</p>

CC BY-SA 4.0
2018-06-07T16:33:24.403Z
Thank you for the reply! I do apologize, I am a still bit confused as to where all of those numbers come from in the link you attached. And why the first 160? Is that in anyway related to RIPE-MD 160? Thanks!
Ben Stolman
CC BY-SA 4.0
2018-06-07T20:29:05.320Z
this is block in hex format. first 160 symbols are block header (80 bytes)
amaclin
CC BY-SA 4.0
2018-06-07T05:41:20.400Z
2018-06-07T20:35:10.760Z
2018-06-07T20:35:10.760Z
amaclin
<p>As noted above, you should take the first 80 bytes from the serialized block. Since this data is <a href="https://en.wikipedia.org/wiki/Hexadecimal" rel="nofollow noreferrer">hex-encoded</a>, and each byte takes two hex-digit to encode, a block header is <code>80 * 2 = 160</code> digits.<br />
You will notice that a few fields are inverted, it's because they are represented in <a href="https://en.wikipedia.org/wiki/Endianness" rel="nofollow noreferrer">little-endian</a> format. Once you double-sha256 this data, you'll find a hash with trailing zeros and not leading, this is also because endianness.</p>
<p>Here is how the mentioned block looks like:<br />
Take the first 160-digits <a href="https://mempool.space/api/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7/header" rel="nofollow noreferrer">serialized header</a><br />
<code>01000000a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b020000000038805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff27b80a4c5c670f1c8bedfd00</code><br />
And parse:<br />
Version: <code>01000000</code> (This is 1 in little-endian)<br />
Previous block hash:   <code>a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b0200000000</code> (Notice the trailing zeroes)<br />
<a href="https://en.wikipedia.org/wiki/Merkle_tree" rel="nofollow noreferrer">Merkle Root</a>: <code>38805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff</code><br />
<a href="https://en.wikipedia.org/wiki/Unix_time" rel="nofollow noreferrer">Timestamp</a>: <code>27b80a4c</code><br />
<a href="https://en.bitcoin.it/wiki/Difficulty#How_is_difficulty_stored_in_blocks.3F" rel="nofollow noreferrer">Bits</a>: <code>5c670f1c</code><br />
<a href="https://en.bitcoin.it/wiki/Nonce" rel="nofollow noreferrer">Nonce</a>: <code>8bedfd00</code></p>
<p>A python 3 code that hashes it:</p>
<pre><code>import hashlib
data = bytes.fromhex(&quot;01000000a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b020000000038805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff27b80a4c5c670f1c8bedfd00&quot;)
h1 = hashlib.sha256(data).digest()
h2 = hashlib.sha256(h1).digest()
print(h2.hex())
</code></pre>
<p>It results in <code>a7f6f121a9903284d02ebfe1e772d131d1e12195493c120531f46a0900000000</code>, that's precisely the little-endian version of <code>00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7</code></p>

CC BY-SA 4.0
2021-12-28T18:09:13.120Z
2021-12-28T18:09:13.120Z
Davidson Souza
<p>I'm not sure how to combine all of this information.
<a href="https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7" rel="nofollow noreferrer">https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7</a></p>

<p>Version 
1</p>

<p>Time Bits
470771548 (is this the right number to use for Time Bits?)</p>

<p>Merkle Root
 ff682ef66cd1b56213fd4db9462fb138f6d8c16d706d41969a7eacc819528038</p>

<p>Nonce
16641419</p>

<p>Hash of Current Block 
00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7</p>

<p>Hash of Previous Block
00000000023bbab0e78a22d27fbd2d0cd13f8302fb3f560138e0e81d087ac7a1</p>

<transactions><blockchain><block><hash><sha256>
How do I double SHA-256 the header of block #59,500?
Ben Stolman
# How do I double SHA-256 the header of block #59,500?

(Asked by: username_0 on 2018-06-07)

I'm not sure how to combine all of this information.
<https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7>

Version
1

Time Bits
470771548 (is this the right number to use for Time Bits?)

Merkle Root
ff682ef66cd1b56213fd4db9462fb138f6d8c16d706d41969a7eacc819528038

Nonce
16641419

Hash of Current Block
00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7

Hash of Previous Block
00000000023bbab0e78a22d27fbd2d0cd13f8302fb3f560138e0e81d087ac7a1

**Tags:** transactions, blockchain, block, hash, sha256


---

## 2 answers

### Answer by username_1 on 2018-06-07. Score: 1

take first 160 symbols from <https://blockchain.info/block/00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7?format=hex>

should I explain more? :))))

**update:**

`01000000` version

`a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b0200000000` prev hash

`38805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff` merkle hash

`27b80a4c` timestamp

`5c670f1c` bits

`8bedfd00` nonce

> **Comments:**
> **username_0**: Thank you for the reply! I do apologize, I am a still bit confused as to where all of those numbers come from in the link you attached. And why the first 160? Is that in anyway related to RIPE-MD 160? Thanks!  
> **username_1**: this is block in hex format. first 160 symbols are block header (80 bytes)  

---

### Answer by username_2 on 2021-12-28. Score: 0

As noted above, you should take the first 80 bytes from the serialized block. Since this data is hex-encoded, and each byte takes two hex-digit to encode, a block header is 80 * 2 = 160 digits.
You will notice that a few fields are inverted, it's because they are represented in little-endian format. Once you double-sha256 this data, you'll find a hash with trailing zeros and not leading, this is also because endianness.
Here is how the mentioned block looks like:
Take the first 160-digits serialized header
01000000a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b020000000038805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff27b80a4c5c670f1c8bedfd00
And parse:
Version: 01000000 (This is 1 in little-endian)
Previous block hash:   a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b0200000000 (Notice the trailing zeroes)
Merkle Root: 38805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff
Timestamp: 27b80a4c
Bits: 5c670f1c
Nonce: 8bedfd00
A python 3 code that hashes it:
import hashlib
data = bytes.fromhex("01000000a1c77a081de8e03801563ffb02833fd10c2dbd7fd2228ae7b0ba3b020000000038805219c8ac7e9a96416d706dc1d8f638b12f46b94dfd1362b5d16cf62e68ff27b80a4c5c670f1c8bedfd00")
h1 = hashlib.sha256(data).digest()
h2 = hashlib.sha256(h1).digest()
print(h2.hex())

It results in a7f6f121a9903284d02ebfe1e772d131d1e12195493c120531f46a0900000000, that's precisely the little-endian version of 00000000096af43105123c499521e1d131d172e7e1bf2ed0843290a921f1f6a7


---

