# Why Bool is a Number?

**URL:** https://discourse.julialang.org/t/why-bool-is-a-number/41845
**Category:** General Usage
**Tags:** question
**Created:** [June 22, 2020, 7:29am UTC](https://discourse.julialang.org/t/why-bool-is-a-number/41845 "2020-06-22T07:29:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)
#### Post date: [June 22, 2020, 7:29am UTC](https://discourse.julialang.org/t/why-bool-is-a-number/41845/1 "2020-06-22T07:29:05Z")

</div>

just came across `true + 3 == 4`, and also `true isa Number`

What is the reason why a boolean gets converted to Int automatically?

---

<div class="post-metadata">

### Author: ![bernhard](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bernhard/32/2619_2.png) [@bernhard](https://discourse.julialang.org/u/bernhard)
#### Post date: [June 22, 2020, 8:11am UTC](https://discourse.julialang.org/t/why-bool-is-a-number/41845/2 "2020-06-22T08:11:42Z")

</div>

I found some related discussion here

> [@Why is Bool an Integer?](https://discourse.julialang.org/t/why-is-bool-an-integer/17237):
>
> I just realized that Bool is a subtype of Integer… why? When I have a function that takes an Integer value I don’t expect to get dispatched with true or false value… That’s very C-like but makes no logical sense to me otherwise…

---

<div class="post-metadata">

### Author: ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)
#### Post date: [June 22, 2020, 9:13am UTC](https://discourse.julialang.org/t/why-bool-is-a-number/41845/3 "2020-06-22T09:13:18Z")

</div>

It basically boils down to the fact that it is quite practical, as discussed in the first part of [https://arxiv.org/pdf/math/9205211.pdf](https://arxiv.org/pdf/math/9205211.pdf) on Iverson’s bracket and strong zeros.
