Boolean
Data Type
Introduction
In computer science, the Boolean data type is a data type having two values (usually denoted true and false), intended to represent the truth values of logic and Boolean algebra. The Boolean data type's name is derived from the 19th century mathematician who initially introduced Boolean algebra to the world, George Boole. The Boolean data type is a built-in data type in all modern-day programming languages used for representing two-state values like true/false, on/off, up/down, left/right, yes/no, in/out, etc. The Boolean data type is primarily associated with conditional statements, which allow different actions and change control flow depending on whether a programmer-specified Boolean condition evaluates to true or false.
Conditional Statements
In computer science, conditional statements, conditional expressions and conditional constructs are features of a programming language, which perform different computations or actions depending on whether a programmer-specified boolean condition evaluates to true or false. Apart from the case of branch predication, this is always achieved by selectively altering the control flow based on some condition. In imperative programming languages, the term "conditional statement" is usually used, whereas in functional programming, the terms "conditional expression" or "conditional construct" are preferred, because these terms all have distinct meanings.