A three-valued logic implements a boolean as having three possible values:
This third value comes in play when you want to retrieve a Boolean from a storage where it may be just inexistant.
For instance, if we want to retrieve the value of a boolean attribute called bool from a JSON
{
"bool": true
}
{
"bool": false
}
{
}
You need only two bit to store this values: