While Loops! Help me please!!!!

I am having issues with while loops ( or do while loops I think is another name for them). While loops seem so easy and I feel like I get them until I have to do problems on my own.

Can anyone explain them to me?

here is a problem from my homework:

which values of *b* do the following algorithm terminate?

**begin**

k:=b

**while** k<5 **do**

k:=2k-1

Now the answer I get is that it terminates at 3

__b__ __k__ __k<5__

3 5 False (cause k cannot = 5 right?)

but the answer in the back of the book is b>(or equal to)=2.

What am I doing wrong?!?

Also I get confused when another step is added in the while loop, such as:

**begin**

k:=1

**while** k<(or equal to) 4 **do**

k:=k^2

print k

k:=k+1

**end**

I am just not getting these. I think I may be over complicating them.

Help me uncomplicate the whole thing. Please!!!!