user4870: I'm trying to learn how litecoins work (and learn new programming language at same time by writing a crappy little miner).
I'm stuck with getdata. Here http://litecoin.info/wiki/Scrypt 
it says that data is 160 characters long. But its not. Its quite a bit longer than that.
So my questions are:

1.) What is nonce and how do I use it?
2.) What is bits?
3.) What are all the 0's after the bits.

EDIT: Ok, I think I have to use just first 160 characters of data and ignore the rest. Correct?

user441: A nonce is just a value that you keep changing in the hope that after you hash all the data the hash will be less than the target value. See https://en.bitcoin.it/wiki/Block_hashing_algorithm (litecoin is similar only uses scrypt instead of sha256 hash function.)

4870: <p>I'm trying to learn how litecoins work (and learn new programming language at same time by writing a crappy little miner).</p>

<p>I'm stuck with <code>getdata</code>. Here <a href="http://litecoin.info/wiki/Scrypt" rel="nofollow">http://litecoin.info/wiki/Scrypt</a> 
it says that data is 160 characters long. But its not. Its quite a bit longer than that.</p>

<p>So my questions are:</p>

<ul>
<li>1.) What is <code>nonce</code> and how do I use it?</li>
<li>2.) What is <code>bits</code>?</li>
<li>3.) What are all the 0's after the <code>bits</code>.</li>
</ul>

<p>EDIT: Ok, I think I have to use just first 160 characters of <code>data</code> and ignore the rest. Correct?</p>
 441: <p>A nonce is just a value that you keep changing in the hope that after you hash all the data the hash will be less than the target value. See <a href="https://en.bitcoin.it/wiki/Block_hashing_algorithm" rel="nofollow">https://en.bitcoin.it/wiki/Block_hashing_algorithm</a> (litecoin is similar only uses scrypt instead of sha256 hash function.)</p>
