Boolean data type

Boolean variable named after George Boole, are elements of a Boolean algebra. Special form is the control variable (English: switching variable )

Basics: Boolean math and Boolean algebra

A Boolean variable is generally a variable that only finitely may take many values ​​or states: In his work, The Mathematical Analysis of Logic of 1847 George Boole laid the foundation for the formal logic and computer technology. The amount of these values ​​is a character set.

Special form of Boolean algebra is the algebra of circuits, the switching variable can take only a few values ​​:

  • Here it is mostly divalent ( binary ) Boolean variables - in the jargon is understood, Boolean variable ' generally include a shift variable in the strict sense. This dichotomous pair of values ​​is referred to as true / false or true / false ( propositional variable ), or 1 /0 ( binary number) depending on the application, among others. In the electronic data processing, the two values ​​are represented by voltage or current levels: HIGH, H or 1/LOW, L or 0 ( zero) - as a circuit corresponds to the on / off, or -1 / 1, corresponding to a flip- flop corresponds.
  • Next to it there in the application often trivalent logic variable in the form -1/0/1 ( mathematically a signed -digit binary number, or a ternary number system 0/1/2 ), so HIGH / ZERO / LOW, such as in the control and Automatic Control ( FORWARD / STOP / REVERSE ).

Boolean and switching algebra is in principle about any character set (range ) possible.

Electrical, electronics and programming

In electrical circuits can be Boolean variables by different electrical voltage output ranges. The specific voltage limits vary depending on the technique used (transistor - transistor logic or CMOS).

In computer systems in principle takes is a single bit (true = 1; false = 0), to represent both possible variable states. For technical reasons, however, chose a different representation usually, mostly dependent on the word length of the concrete system.

Many programming languages ​​provide a separate data type, like for instance under the name of boolean ( Pascal, Java, Visual Basic, Ada ) or bool ( C #, C , PHP, Python) or logical ( FORTRAN ).

138363
de