Boolean: Difference between revisions

Jump to navigation Jump to search
110 bytes added ,  17:34, 10 November 2019
no edit summary
Miraheze>Marshall
Miraheze>Adám Brudzewsky
No edit summary
Line 1: Line 1:
{| class=vertical-navbox style="float:right; font-size:500%; margin:0 1ex;"
|<code>0</code> <code>1</code>
|}
In array languages, '''Boolean''' data consists only of the [[number]]s 0 and 1 (outside of APL, [[wikipedia:Boolean_data_type|Boolean]] data may use any two values). Boolean values are used in APL whenever a "true" or "false" value is required, that is, the truth value of a logical [[wikipedia:Proposition|Proposition]] such as a [[comparison]] of two [[scalar]]s. The identification of "true" with 1 and "false" with 0 is a simplification of the [[Iverson bracket]], a notation which allowed a truth value to be converted into a number. A notable feature of APL implementations in relation to other language families is their tendency to use bit Booleans (eight in each byte) rather than byte Booleans, a feature which is difficult to implement but increases storage density and can also greatly speed up computation on Boolean arrays.
In array languages, '''Boolean''' data consists only of the [[number]]s 0 and 1 (outside of APL, [[wikipedia:Boolean_data_type|Boolean]] data may use any two values). Boolean values are used in APL whenever a "true" or "false" value is required, that is, the truth value of a logical [[wikipedia:Proposition|Proposition]] such as a [[comparison]] of two [[scalar]]s. The identification of "true" with 1 and "false" with 0 is a simplification of the [[Iverson bracket]], a notation which allowed a truth value to be converted into a number. A notable feature of APL implementations in relation to other language families is their tendency to use bit Booleans (eight in each byte) rather than byte Booleans, a feature which is difficult to implement but increases storage density and can also greatly speed up computation on Boolean arrays.


Navigation menu