All Topics  
Boolean datatype

 

   Email Print
   Bookmark   Link






 

Boolean datatype



 
 
In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, the Boolean datatype, sometimes called the logical datatype, is a primitive datatype having one of two values: true and false. Many systems represent true as non-zero (often 1, or -1) and false as zero. It is the special case of a binary
Binary numeral system

The binary numeral system, or notation with a radix of 2. Owing to its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by all modern computers....
 numeric datatype of only one digit, or bit
Bit

A bit is a binary numeral system numerical digit, taking a value of either 0 or 1. Binary digits are a basic unit of information Computer data storage and transmission in digital computing and digital information theory....
, and can also be represented in any other radix
Radix

In numeral system, the base or radix is usually the number of unique Numerical digit, including zero, that a Positional notation numeral system uses to represent numbers....
 by restricting the range of allowed values for certain operations.

In some languages the Boolean datatype is defined to represent more than two truth values.






Discussion
Ask a question about 'Boolean datatype'
Start a new discussion about 'Boolean datatype'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
, the Boolean datatype, sometimes called the logical datatype, is a primitive datatype having one of two values: true and false. Many systems represent true as non-zero (often 1, or -1) and false as zero. It is the special case of a binary
Binary numeral system

The binary numeral system, or notation with a radix of 2. Owing to its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by all modern computers....
 numeric datatype of only one digit, or bit
Bit

A bit is a binary numeral system numerical digit, taking a value of either 0 or 1. Binary digits are a basic unit of information Computer data storage and transmission in digital computing and digital information theory....
, and can also be represented in any other radix
Radix

In numeral system, the base or radix is usually the number of unique Numerical digit, including zero, that a Positional notation numeral system uses to represent numbers....
 by restricting the range of allowed values for certain operations.

In some languages the Boolean datatype is defined to represent more than two truth values. For instance the ISO SQL:1999 standard defined a Boolean data type for SQL which could hold three possible values: true, false, unknown (SQL null
Null (SQL)

Null is a special marker used in SQL to indicate that a data value does not exist in the database. Introduced by the creator of the Relational model database model, Edgar F....
 is treated as equivalent to the unknown truth value, but only for the Boolean data type). This defies the law of excluded middle
Law of excluded middle

In logic, the law of the excluded middle states that the propositional calculus formula "P ? ?P" can be deduced from the calculus under investigation....
, though very often useful.

This datatype is used in Boolean and other operations such as and
Logical conjunction

In logic and/or mathematics, logical conjunction or and is a two-place logical operation that results in a value of true if both of its operands are true, otherwise a value of false....
 (AND, &, *), or
Logical disjunction

File:ORGate2.pngIn logic and mathematics, or, also known as logical disjunction or inclusive disjunction is a logical operator that results in true whenever one or more of its operands are true....
 (OR, |, +), exclusive or/not equivalent
Exclusive disjunction

The Logical connective exclusive disjunction, also called exclusive or , is a type of logical disjunction on two operands that results in a value of true if and only if exactly one of the operands has a value of true....
 (xor, NEQV, ^), equal
Logical equivalence

In logic, statements p and q are logically equivalent if they have the same logical content.Syntax , p and q are equivalent if each can be proof from the other....
 (EQV, =,

) and not
Negation

In logic and mathematics, negation or not is an operation on logical values, for example, the logical value of a proposition, that sends true to false and false to true....
 (NOT, ~, !) which correspond to some of the operations of Boolean algebra and arithmetic
Arithmetic

Arithmetic or arithmetics is the oldest and most elementary branch of mathematics, used by almost everyone, for tasks ranging from simple day-to-day counting to advanced science and business calculations....
.

In semiconductor
Semiconductor

A semiconductor is a material that has electrical conductivity between those of a Electrical conductor and an electrical insulation; it can vary over that wide range either permanently or dynamically....
 logic hardware, it is usually more efficient to implement all as NAND or NOR, that is NOT-AND and NOT-OR (which is not the same as NOR).

Ada

Ada defines Boolean in the package Standard as an enumerated type with values False and True where False < True.

type Boolean is (False, True);

p : Boolean := True; ... if p then ... end if;

The relational operators (=, /=, <, <=, >, >=) apply to all enumerated types, including Boolean. Boolean operators and, or, xor, and not are defined on Boolean and any declared subtype. The Boolean operators also apply to arrays of Boolean values.

Algol

Algol 60 had a Boolean datatype and associated operations, defined in the Algol 60 report. This was abbreviated to bool in ALGOL 68
ALGOL 68

ALGOL 68 is an imperative programming computer programming programming language that was conceived as a successor to the ALGOL 60 programming language, designed with the goal of a much wider scope of application and more rigorously defined syntax and semantics....
.

An actual extract from the ALGOL 68 language specification (page 177) where the boolean operators are defined:

10.2.2. Operations on Boolean Operands
  1. op ? = (bool a, b) bool;
  2. op ? = (bool a, b) bool: ( a | b | false );
  3. op ¬ = (bool a) bool: ( a | false | true );
  4. op = = (bool a, b) bool ? ( ¬b?¬a );
  5. op ? = (bool a, b) bool: ¬(a=b);
  6. op abs = (bool a)int: ( a | 1 | 0 );


C

Prior to C99
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
, the standards for the C programming language
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 provided no Boolean type. This however does not mean that C90 cannot represent the concept of boolean values, as all the boolean operators (&&, ||) and conditional statements (if, while) in C interpret nonzero values to signify true and zero values to signify false. Thus, it is common to store boolean values in variables of another type, such as an integer or an enum. For convenience, it is also common to create a typedef
Typedef

typedef is a keyword in the C and C++ programming languages. It is used to give a data type a new name. The intent is to make it easier for programmers to comprehend source code....
 for a boolean type, which resolves to some existing datatype. The C99
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
 standard also provides a built-in boolean type.

To illustrate Booleans in C, note that the C code: if (my_variable) else

is equivalent to: if (my_variable != 0) else

This is straightforward for integer
Integer

The integers are natural numbers including 0 and their negative and non-negative numberss . They are numbers that can be written without a fractional or decimal component, and fall within the set ....
 datatypes. Since C standards mandate that 0 be interpreted as the null pointer when used in a pointer context or cast to a pointer, the above construct can also be used to check a pointer for NULL, although some code styles discourage this use. While the same conditional is also valid for floating-point values, special care must be taken when comparing them for equality, since they often contain rounded results. Traditionally, integers are used to contain boolean variables.

While it is not necessary to name the true and false values in order to test variables for truth or falsehood, it is necessary to do so in order to assign values to them. (One way is to use the values zero and one, which have the advantage of being language-independent.) Alternatively, the enum
Enumerated type

In computer programming, an enumerated type is a data type consisting of a set of named constants called enumerators. The act of creating an enumerated type defines an enumeration....
keyword allows for naming elements in the language of your choice, for example: typedef enum boolean; ... boolean b;

The following typical preprocessor
C preprocessor

The C preprocessor is the preprocessor for the C . In many C implementations, it is a separate computer program invoked by the compiler as the first part of translation....
 macros are also often used.

  1. define FALSE 0
  2. define TRUE 1
... int f = FALSE;

Sometimes TRUE may be defined as -1 or ~0 (the bitwise complement of zero). This means that all bits of the integer are set to 1, on the now common two's complement
Two's complement

The two's complement of a binary number is defined as the value obtained by subtracting the number from a large power of two .A two's-complement system or two's-complement arithmetic is a system in which negative numbers are represented by the two's complement of the absolute value; this system is the most common Signed number r...
 computer architectures.

However, problems arise from the fact that any non-zero value represents true in C, while the value TRUE is represented by a specific value. So while in other languages, if (foo

TRUE) ... is merely redundant, in C, it is actually incorrect code.

C99

In C99, there is a _Bool type. It is large enough to store the values 0 and 1. When any scalar value is converted to _Bool, the result is 0 if the value is 0, otherwise 1.

If the <stdbool.h
Stdbool.h

The header stdbool.h in the C Standard Library for the C programming language contains four macros. This header was introduced in C99.The macros as defined in IEEE Std 1003.1-2001 are :...
>
is #included, the macros bool, true and false can be used to refer to _Bool, 1 and 0, respectively:

  1. include
int main



C++

During its standardization process, the C++
C++

C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
 programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 introduced the bool, true and false keywords, adding a native datatype to support boolean data. Its size is implementation-defined. bool was introduced in 1993.

Values of type bool are either true or false. Implicit conversions exist between bool and other integral types, floating point
Floating point

In computing, floating point describes a system for numerical representation in which a String of digits represents a rational number.The term floating point refers to the fact that the radix point can "float": that is, it can be placed anywhere relative to the Significant figures of the number....
 types, pointer types, and pointer-to-member types. In addition, user-defined types can be converted to bool via a user-defined conversion operator
Operator overloading

In computer programming, operator overloading is a specific case of polymorphism in which some or all of operator s like +, =, or have different implementations depending on the types of their arguments....
. In general, a zero or null-pointer value is converted to false, any other value is converted to true.

  1. include


int main



The 1998 C++ Standard Library defines a specialization of the vector
Vector (STL)

This article describes the implementation of the vector container as a template class in the Standard Template Library of the C++ programming language....
 template for bool. The description of the class indicates that the implementation should pack the elements so that every bool only uses one bit of memory. This is widely considered a mistake. vector does not meet the requirements for a C++ Standard Library
C++ standard library

In C++, the Standard Library is a collection of class and subroutine, which are written in the core language. The Standard Library provides several generic containers, functions to utilise and manipulate these containers, function objects, generic strings and streams , support for some language features, and every day functions for tasks suc...
 container. For instance, a containerreference must be a true lvalue of type T. This is not the case with vectorreference, which is a proxy class convertible to bool. Similarly, the vectoriterator does not yield a bool& when dereferenced
Dereference operator

The dereference operator or indirection operator, "*", is a unary operator found in C -like languages that include pointer variables. It operates on a pointer variable, and returns an value equivalent to the value at the pointer address....
. There is a general consensus among the C++ Standard Committee and the Library Working Group that vector should be deprecated and subsequently removed from the standard library, while the functionality will be reintroduced under a different name. This change is unlikely to take place until after C++0x
C++0x

C++0x is the planned new Open standard for the C++. It is intended to replace the existing C++ standard, ISO/IEC 14882, which was published in 1998 and updated in 2003....
.

C#


In C#, Boolean variables are identified through the reserved word bool, which is an alias for the predefined struct type System.Boolean. It occupies one byte
Byte

A byte is a basic unit of measurement of Computer storage in computer science. In many computer architectures it is a Byte addressing memory address space....
. No standard conversions exist between bool and other types.

Code to output a Boolean could be represented like this:

bool myBool = (i

5); System.Console.WriteLine(myBool ? "I = 5" : "I != 5");

Fortran

The LOGICAL keyword and associated operations .NOT., .AND., .OR., etc. were introduced in the 1950s, before Fortran
Fortran

Fortran is a general-purpose programming language, procedural programming language, imperative programming language programming language that is especially suited to numerical analysis and scientific computing....
 was standardized.

Haskell



In Haskell
Haskell

Haskell may refer to:*Haskell , a standardized pure functional programming language with non-strict semantics* Haskell Indian Nations University, a four year degree granting university in Lawrence, Kansas which offers free tuition to members of registered Native American tribes in the United States...
, a Bool type is defined in the standard prelude, defining it as a simple algebraic data type
Algebraic data type

In computer programming, an algebraic data type is a datatype each of whose value s is data from other datatypes wrapped in one of the constructors of the datatype....
:

data Bool = False | True

The operations are defined as ordinary functions and operators:

(&&), (||) Bool -> Bool -> Bool True && x = x False && _ = False True || _ = True False || x = x

Java

In the Java programming language
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
, boolean variables are represented by the primitive type boolean. The Java Virtual Machine (JVM)
Java Virtual Machine

A Java Virtual Machine is a set of computer software programs and data structures which use a virtual machine model for the execution of other computer programs and Scripting language....
 abstracts away from the actual representation in memory, so JVM writers can represent booleans in whatever manner is convenient (for example, one byte, or one word).

The Java Language Specification does not permit any explicit or implicit casts to or from boolean. Thus, it requires the compiler to reject this code:

int i = 1; if (i) System.out.println("i is not zero."); else System.out.println("i is zero.");

because the integer variable i cannot be cast to a boolean, and the if statement requires a boolean condition.

In Java, boolean values (like other primitive types) can be appended to Strings. This feature provides a default visual representation of a boolean (true is displayed as "true" and false as "false").

Another way to use the boolean is to set a variable type as a boolean. This can be done in the following:

boolean i; //the variable i is boolean i = true; //sets the value to true if (i)else

boolean used with a switch statement:

boolean i = true; //we can also set the value of the variable in the same line that it is being declaired switch(i)

JavaScript

JavaScript
JavaScript

JavaScript is a scripting language widely used for client-side web development. It was the originating Programming language dialect of the ECMAScript standard....
 has two keywords true and false, both of which are written in lowercase. It is a weakly typed language and does not have an explicit Boolean datatype for its variables. However many values will evaluate to false when used in a logical context, including zero, null, zero length strings, and unknown properties of objects. All other variable values, including empty arrays and empty objects, will evaluate to true. The language does offer a Boolean object which can be used as a wrapper for handling boolean values. The Boolean object will always evaluate to true even if it has a value of false.

var objBool = new Boolean(false);

if ( false || 0 || "" || null || window.not_a_property ) else if ( true && [] && && objBool )

Lambda calculus

In the lambda calculus
Lambda calculus

In mathematical logic and computer science, lambda calculus, also written as ?-calculus, is a formal system designed to investigate function definition, function application and recursion....
  model of computing, booleans are represented as Church booleans.

Lisp

Lisp has two special symbols T and NIL which represent the logical values of true and false respectively. However, any non-NIL value is interpreted by a LISP system as true. The special symbol NIL is also represented by , the empty list. So the empty list is false, but any list with data has the logical value of true. Therefore "nothing" is false and everything else is true.

ML

Like Ocaml, ML
ML programming language

ML is a general-purpose functional programming language developed by Robin Milner and others in the late 1970s at the University of Edinburgh, whose syntax is inspired by ISWIM....
 has a bool type that has true and false values. For example:

- fun isittrue x = if x then "YES" else "NO" ;
> val isittrue = fn : bool -> string
- isittrue true;
> val it = "YES" : string
- isittrue false;
> val it = "NO" : string
- isittrue (8=8);
> val it = "YES" : string
- isittrue (7=5);
> val it = "NO" : string


Objective-C

Objective-C
Objective-C

Objective-C is a Reflection , Object-oriented programming programming language which adds Smalltalk-style message passing to C .Today it is used primarily on Mac OS X, iPhone OS, and GNUstep, three environments based on the OpenStep standard, and is the primary language used for the NEXTSTEP, OpenStep#OPENSTEP, and Cocoa application framew...
 provides a type BOOL, and macros YES and NO. Since Objective-C is a superset of C
C (programming language)

C is a general-purpose computer programming language originally developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories to implement the Unix operating system....
, C language semantics for booleans
Boolean datatype

In computer science, the Boolean algebra datatype, sometimes called the logical datatype, is a primitive datatype having one of two values: Truth value and false....
 also apply.

Ocaml

Ocaml has a bool type that has true and false values.

  1. 1 = 1 ;;
- : bool = true

Like other enumerated types, a value of this type uses a word of memory.

Pascal

Boolean is a basic datatype provided by Pascal
Pascal (programming language)

Pascal is an influential imperative programming and Procedural programming programming language, designed in 1968/9 and published in 1970 by Niklaus Wirth as a small and efficient language intended to encourage good programming practices using structured programming and data structure....
. Its definition and uses:

(* declaration in system or standard*) Type Boolean = (False,True);

(* usage *)

var value: Boolean;

...

value := True; value := False;

if value then begin ... end;

Note that values outside the enum are not defined. Some compilers like Delphi have as extension special boolean type that map onto C numeric types for interfacing purposes. (Delphi: bytebool,wordbool,longbool)

Perl

In the Perl programming language
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
, there is no distinction between numbers, strings and other non-aggregate data types. (They are all called "scalar".) Aggregate types without any elements, empty strings, numbers which equal a value of 0, the strings "" and "0", and undefined variables evaluate to "false" when used in a Boolean context. All other values (including strings such as 0.0 and 0E0 which are "zero but true") evaluate to "true".

Elements of aggregates may also be tested against "existence" or "non-existence", and all variables may be evaluated as either "defined" or "undefined". (An element of a hash or array that has been assigned the value undef exists but is undefined.) In Perl this distinction is important when evaluating scalars in a boolean manner to prevent "false falses" where one of the above values should be considered "true".

There are no built-in true or false constants in Perl 5, however the values do exist internally in Perl6.

1 is traditionally used for true, and constructs such as ... while 1 are special-cased to avoid advisory warnings. Internally, recent versions of Perl 5 have a variety of predefined yesses and nos, so that the recommended way to provide a false value has recently shifted from undef to !1 .

PHP

PHP has a boolean datatype with two values: true and false (case doesn't matter). $var = true; $var = false; print $var ? "T" : "F"; print $var

true ? "T" : "F"; print $var

true ? "T" : "F"; print is_bool($var) ? "T" : "F"; print gettype($var);

Several values evaluate to a logical false with the loose comparison operator

. There are generally empty instances of a type, or are considered equivalent to the number 0
0 (number)

0 is both a number and the numerical digit used to represent that number in numeral system. It plays a central role in mathematics as the additive identity of the integers, real numbers, and many other algebraic structures....
. These values are:
  • false
  • integer or float 0
  • string "0"
  • NULL
  • empty array
  • empty string


PHP programmers wishing to distinguish a boolean variable set to false from other types of variable must use the strict comparison operator

.

Python

The Python programming language
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
 defines True and False values as its boolean type, as well as allowing all objects to be tested for their truth value. The following values are considered false:
  • Numeric zero, None, False.
  • Empty containers such as empty strings, lists, tuples, dicts and sets.
  • User defined object instances have control over their boolean value through special methods __nonzero__ and __len__.
In all other cases, objects are considered true.

Boolean operators and boolean built-in types always return one of the boolean values True and False except for the operators "or" and "and" which return one of their operands (from left to right, the first operand that determines the boolean value of the expression). >>> class spam: pass # spam is assigned a class object. ... >>> eggs = "eggs" # eggs is assigned a string object. >>> spam

eggs# (Note double equals sign for equality testing). False >>> spam != eggs# != and

always return bool values. True >>> spam and eggs # and returns an operand. 'eggs' >>> spam or eggs# or also returns an operand. >>>

Ruby



The Ruby programming language does not have a Boolean data type as part of the language. Like many other interpreted languages, all variables are dynamically typed. Instead, ruby defines the explicit values of false and nil, and everything else is considered true, including 0, [ ], and the empty string "". The values true, false, and nil can be assigned to variables, returned from functions or methods, and compared in Boolean expressions.

a = 0 if (a) print "true" else print "false" end

will print "true", which might come as a surprise to a new user of the language.

Since Ruby is a pure object-oriented programming
Object-oriented programming

Object-oriented programming is a programming paradigm that uses "Object_" and their interactions to design applications and computer programs....
 language, even the "explicitly" defined values of true, false and nil are objects that each have their own class:

p false.class p true.class p nil.class

Would output "FalseClass", "TrueClass" and "NilClass" respectively.

Scheme

Scheme has two special symbols #t and #f which represent the logical values of true and false respectively. However, any non-#f value is interpreted as true. Note that unlike Lisp, nil or ', the empty list, is separate from #f in Scheme, and therefore is considered true.

SQL

SQL
SQL

SQL is a database computer language designed for the retrieval and management of data in relational database management systems , database schema creation and modification, and database object access control management....
 supports three-valued logic (3VL), and comparison predicates in SQL can return any of three possible results: true, false, or unknown. The Boolean datatype was introduced in the ISO SQL:1999 standard, which specified that in addition to the three possible SQL Boolean values, instances of the datatype could be set to null. For DBMSs that implement the ISO SQL:1999 standard, the following code creates a table which holds instances of the Boolean data type.

CREATE TABLE test1 ( a int, b boolean );

INSERT INTO test1 VALUES (1, true);

INSERT INTO test1 VALUES (2, false);

INSERT INTO test1 VALUES (3, null);

-- The SQL:1999 standard says that vendors can use null in place of the -- SQL Boolean value unknown. It is left to the vendor to decide if -- null should be used to completely replace unknown. The standard also -- says that null should be treated as equivalent to unknown, which is an -- inconsistency. The following line may not work on all SQL:1999-compliant -- systems.

INSERT INTO test1 VALUES (4, unknown);

SELECT * FROM test1;

The SQL Boolean data type did not gain widespread adoption, owing to inconsistencies in the standard and lack of support from vendors. Most SQL DBMSs use other data types like bit, byte, and char to simulate the behavior of Boolean data types.

Visual Basic

In Visual Basic
Visual Basic

'Visual Basic' is the third-generation programming language event-driven programming and integrated integrated development environment from Microsoft for its Component Object Model programming model....
 Boolean values from comparisons can be stored in variables with the Boolean data type, which is stored as a 16-bit signed integer, but should only have the values True(-1) and False(0). For example: Dim isSmall As Boolean isSmall = intMyNumber < 10 ' Expression evaluates to True or False If isSmall Then MsgBox("The number is small") End If

Dim hellFreezesOver As Boolean ' Boolean variables are initialized as False hellFreezesOver = False ' Or you can use an assignment statement Do Call CheckAndProcessUserInput Loop Until hellFreezesOver

Note: Although Boolean values should only be -1 or 0, other values can be coerced into them by calling a function with a Variant ByRef parameter. It is highly recommended not to do this. Sub Voo(ByRef v As Variant) v = 1 End Sub

Sub Bar(ByRef b As Boolean) b = 1 End Sub

Dim b1 As Boolean, b2 As Boolean b1 = True b2 = True Debug.Print (b1 = b2) 'True Call Voo(b2) Debug.Print (b1 = b2) 'False Call Bar(b2) Debug.Print (b1 = b2) 'True

Similarly, values neither true nor false can be unwittingly passed across COM interfaces from other languages where, say, the value for true is 1, not -1. Great care must be taken here to prevent problems with the law of excluded middle
Law of excluded middle

In logic, the law of the excluded middle states that the propositional calculus formula "P ? ?P" can be deduced from the calculus under investigation....
; in particular, flipping the bits in the Boolean value does not change it from true to false or back again.

XPath and XQuery

XML Path Language
XPath

XPath is a language for selecting nodes from an XML document. In addition, XPath may be used to compute values from the content of an XML document....
 (XPath 2.0) and XML Query Language
XQuery

XQuery is a query language that is designed to query collections of XML data. It is semantic similarity to SQL.XQuery 1.0 was developed by the XML Query working group of the W3C....
 (XQuery 1.0) both rely on XML Schema for Boolean data type support. The XML Schema xs:boolean data type supports both true and false Boolean values. XPath and XQuery define a set of rules for calculating the effective Boolean value of expressions.

XPath 1.0 and languages based on it, like XML Stylesheet Language (XSL), also support Boolean data types and implicit calculation of effective Boolean values from non-Boolean expressions.

See also

  • true
    True (Unix)

    In Unix-like operating systems, true is a command whose only function is to always return the value 0, which is regarded by the shell as the logical value true....
     and false
    False (Unix)

    In Unix-like operating systems, false is the command that always returns the value 1, which is regarded by the shell as the logical value false....
     shell scripting commands
  • Shannon's expansion