Jump to content

Synthesize a program

- - - - -

  • Please log in to reply
No replies to this topic

#1
Guest_Ramzesi_*

Guest_Ramzesi_*
  • Guests
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!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users