For compilers, a rule often indicates that false is 0, and everything else will be true. However, calling bool as an integer type is usually considered bad. The standard, however, includes a rule for converting to int, and your assumption is true false = 0 and true = 1, as long as the compiler adheres to the standard!
Anyway, why arithmetic with bool types?
Hope for this help
source share