user2028: I'm trying to sign a coinbase transaction. I know I need to use 76 A9 14 (HASH160) 88 AC but I don't understand how to create the HASH160 (20 byte) from a bitcoin address.

user2044: For regular addresses you can use the addresstohash tool in blockexplorer.
For testnet addresses you can open https://blockexplorer.com/testnet/address/the address you want and read the Hash160 field. This works for addresses which aren't in the block chain too.

user659: This wiki page is probably more helpful.  It describes how the bitcoin address is created from the 160 bit hash.  You need to run those steps backwards to get back to the 160 bit hash.
For example, if your address is 1HgiEYL6fsKrfh8wuMhAGfvSc6PY5ZXJdv, you first count and remove the 1's from the start.  There's only one '1' in most addresses.  Remember this for later.
With the rest of the address, use this page to convert each character into its base58 value:  'H' -> 16, 'g' -> 39, 'i' -> 41, ..., 'v' -> 53 etc.  So you have a list of values: [16, 39, 41, ..., 53].
Then combine all these values into a single large number:
(([...](((16) * 58 + 39) * 58 + 41) ...) * 58 + 53) 

Convert the single large number into a sequence of bytes, prepend the same number of 00 bytes as the number of '1's you initially removed from the address, remove the last 4 bytes (that's the checksum), remove the first zero byte (that's the version byte), and there's your 160 bit hash.

user323: Check the Wiki. I think what you are looking for is point 3:

How to create Bitcoin Address
0 - Having a private ECDSA key
18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725
1 - Take the corresponding public key generated with it (65 bytes, 1
  byte 0x04, 32 bytes corresponding to X coordinate, 32 bytes
  corresponding to Y coordinate)
0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6
2 - Perform SHA-256 hashing on the public key
600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408
3 - Perform RIPEMD-160 hashing on the result of SHA-256
010966776006953D5567439E5E39F86A0D273BEE
4 - Add version byte in front of RIPEMD-160 hash (0x00 for Main
  Network)
00010966776006953D5567439E5E39F86A0D273BEE
5 - Perform SHA-256 hash on the extended RIPEMD-160 result
445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094
6 - Perform SHA-256 hash on the result of the previous SHA-256 hash
D61967F63C7DD183914A4AE452C9F6AD5D462CE3D277798075B107615C1A8A30
7 - Take the first 4 bytes of the second SHA-256 hash. This is the
  address checksum
D61967F6
8 - Add the 4 checksum bytes from point 7 at the end of extended
  RIPEMD-160 hash from point 4. This is the 25-byte binary Bitcoin
  Address.
00010966776006953D5567439E5E39F86A0D273BEED61967F6
9 - Convert the result from a byte string into a base58 string using
  Base58Check encoding. This is the most commonly used Bitcoin Address
  format
16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM

You can check your calculations against my testing suite.

2028: <p>I'm trying to sign a coinbase transaction. I know I need to use <code>76 A9 14 (HASH160) 88 AC</code> but I don't understand how to create the HASH160 (20 byte) from a bitcoin address.</p>
 2044: <p>For regular addresses you can use the <a href="https://blockexplorer.com/q/addresstohash" rel="nofollow">addresstohash</a> <a href="https://blockexplorer.com/q" rel="nofollow">tool</a> in blockexplorer.</p>

<p>For testnet addresses you can open <code>https://blockexplorer.com/testnet/address/the address you want</code> and read the Hash160 field. This works for addresses which aren't in the block chain too.</p>
 659: <p>This <a href="https://en.bitcoin.it/wiki/Base58Check_encoding#Creating_a_Base58Check_string" rel="nofollow">wiki page</a> is probably more helpful.  It describes how the bitcoin address is created from the 160 bit hash.  You need to run those steps backwards to get back to the 160 bit hash.</p>

<p>For example, if your address is 1HgiEYL6fsKrfh8wuMhAGfvSc6PY5ZXJdv, you first count and remove the 1's from the start.  There's only one '1' in most addresses.  Remember this for later.</p>

<p>With the rest of the address, use <a href="https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart" rel="nofollow">this page</a> to convert each character into its base58 value:  'H' -> 16, 'g' -> 39, 'i' -> 41, ..., 'v' -> 53 etc.  So you have a list of values: [16, 39, 41, ..., 53].</p>

<p>Then combine all these values into a single large number:</p>

<pre><code>(([...](((16) * 58 + 39) * 58 + 41) ...) * 58 + 53) 
</code></pre>

<p>Convert the single large number into a sequence of bytes, prepend the same number of 00 bytes as the number of '1's you initially removed from the address, remove the last 4 bytes (that's the checksum), remove the first zero byte (that's the version byte), and there's your 160 bit hash.</p>
 323: <p>Check the <a href="https://en.bitcoin.it/wiki/Technical_background_of_Bitcoin_addresses" rel="noreferrer">Wiki</a>. I think what you are looking for is point 3:</p>

<blockquote>
  <p><strong>How to create Bitcoin Address</strong></p>
  
  <p>0 - Having a private ECDSA key</p>
  
  <p>18E14A7B6A307F426A94F8114701E7C8E774E7F9A47E2C2035DB29A206321725</p>
  
  <p>1 - Take the corresponding public key generated with it (65 bytes, 1
  byte 0x04, 32 bytes corresponding to X coordinate, 32 bytes
  corresponding to Y coordinate)</p>
  
  <p>0450863AD64A87AE8A2FE83C1AF1A8403CB53F53E486D8511DAD8A04887E5B23522CD470243453A299FA9E77237716103ABC11A1DF38855ED6F2EE187E9C582BA6</p>
  
  <p>2 - Perform SHA-256 hashing on the public key</p>
  
  <p>600FFE422B4E00731A59557A5CCA46CC183944191006324A447BDB2D98D4B408</p>
  
  <p>3 - Perform RIPEMD-160 hashing on the result of SHA-256</p>
  
  <p>010966776006953D5567439E5E39F86A0D273BEE</p>
  
  <p>4 - Add version byte in front of RIPEMD-160 hash (0x00 for Main
  Network)</p>
  
  <p>00010966776006953D5567439E5E39F86A0D273BEE</p>
  
  <p>5 - Perform SHA-256 hash on the extended RIPEMD-160 result</p>
  
  <p>445C7A8007A93D8733188288BB320A8FE2DEBD2AE1B47F0F50BC10BAE845C094</p>
  
  <p>6 - Perform SHA-256 hash on the result of the previous SHA-256 hash</p>
  
  <p>D61967F63C7DD183914A4AE452C9F6AD5D462CE3D277798075B107615C1A8A30</p>
  
  <p>7 - Take the first 4 bytes of the second SHA-256 hash. This is the
  address checksum</p>
  
  <p>D61967F6</p>
  
  <p>8 - Add the 4 checksum bytes from point 7 at the end of extended
  RIPEMD-160 hash from point 4. This is the 25-byte binary Bitcoin
  Address.</p>
  
  <p>00010966776006953D5567439E5E39F86A0D273BEED61967F6</p>
  
  <p>9 - Convert the result from a byte string into a base58 string using
  Base58Check encoding. This is the most commonly used Bitcoin Address
  format</p>
  
  <p>16UwLL9Risc3QfPqBUvKofHmBQ7wMtjvM</p>
</blockquote>

<p>You can check your calculations against <a href="http://gobittest.appspot.com" rel="noreferrer">my testing suite</a>.</p>
