You can convert an integer to a boolean value as show below:

 b = (i != 0);