Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

- - - - -

Synthesize a program

pascal

  • Please log in to reply
No replies to this topic

#1 Guest_Ramzesi_*

Guest_Ramzesi_*
  • Guest

Posted 27 December 2006 - 01:36 AM

Hello evryone! In the text below is a program that I can't make.Please help me!

Synthesize a program, wich calculates the number of bits
in n(number wich is in binary code).The template of the program is:

{Q: (1<=n)}
S(initially);
{inv P: (1<=m)and(m*2^<=n<m*2^j+1)}
{bound t:m-1}
do B -> S od
{R:2^j-1<=n<2^j+1}

Transform the program in Pascal or ASML.

If you only know the algorithum of calculating bits in an integer I'll be thankful!
  • 0





Also tagged with one or more of these keywords: pascal

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download