The Boolean values in a computer program
 

Encoding the Boolean values inside a computer program
 

Encoding = mapping the Boolean values to binary codes
     (Remember that the computer can only store binary numbers !)

How would you map boolean values to these binary numbers:

Encoding the Boolean values inside a computer program
 

A commonly used encoding for Boolean values:

Encoding the Boolean values inside a computer program - DEMO
 

Python (and C) uses the previous encoding for Boolean values

Python program that show the encoding: