Update
This commit is contained in:
parent
63ed9985ce
commit
baca171ff8
9 changed files with 2023 additions and 1873 deletions
3
and.md
Normal file
3
and.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# And
|
||||||
|
|
||||||
|
See [logic gate](logic_gate.md).
|
135
logic_gate.md
135
logic_gate.md
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
Logic gate is a basic element of [logic circuits](logic_circuit.md), a simple device that implements a [Boolean function](bool.md), i.e. it takes a number of [binary](binary.md) (1 or 0) input values and transforms them into an output binary value. Logic gates are kind of "small boxes" that eat 1s and 0s and spit out other 1s and 0s. Strictly speaking a logic gate must implement a mathematical function, so e.g. [flip-flops](flip_flop.md) don't fall under logic gates because they have an internal state/[memory](memory.md).
|
Logic gate is a basic element of [logic circuits](logic_circuit.md), a simple device that implements a [Boolean function](bool.md), i.e. it takes a number of [binary](binary.md) (1 or 0) input values and transforms them into an output binary value. Logic gates are kind of "small boxes" that eat 1s and 0s and spit out other 1s and 0s. Strictly speaking a logic gate must implement a mathematical function, so e.g. [flip-flops](flip_flop.md) don't fall under logic gates because they have an internal state/[memory](memory.md).
|
||||||
|
|
||||||
|
NOTE: Logic gate is a term used in [hardware](hardware.md), but the principles of logic gates are present everywhere in [programming](programming.md) and [computer science](compsci.md), the term *logic gate* is practically equivalent to what we otherwise call **Boolean functions, logical operators, binary operations etc.** So this article will talk about all of these at once; the knowledge is crucial not just for hardware engineers but for anyone interested in [hacking](hacking.md) computers in any way.
|
||||||
|
|
||||||
Logic gates are to logic circuits kind of what [resistors](resistor.md), [transistors](transistor.md) etc. are for electronic circuits. They implement basic functions that in the realm of boolean logic are equivalents of addition, multiplication etc.
|
Logic gates are to logic circuits kind of what [resistors](resistor.md), [transistors](transistor.md) etc. are for electronic circuits. They implement basic functions that in the realm of boolean logic are equivalents of addition, multiplication etc.
|
||||||
|
|
||||||
Behavior of logic gates is, just as with logic circuits, commonly expressed with so called [truth tables](truth_table.md), i.e. a tables that show the gate's output for any possible combination of inputs. But it can also be written as some kind of equation etc.
|
Behavior of logic gates is, just as with logic circuits, commonly expressed with so called [truth tables](truth_table.md), i.e. a tables that show the gate's output for any possible combination of inputs. But it can also be written as some kind of equation etc.
|
||||||
|
@ -58,6 +60,139 @@ The truth table of these gates is as follows:
|
||||||
|
|
||||||
Functions NAND and NOR are so called [functionally complete](functional_completeness.md) which means we can implement any other gate with only one of these gates. For example NOT(x) = NAND(x,x), AND(x,y) = NAND(NAND(x,y),NAND(x,y)), OR(x,y) = NAND(NAND(x,x),NAND(y,y)) etc. Similarly NOT(x) = NOR(x,x), OR(x,y) = NOR(NOR(x,y),NOR(x,y)) etc.
|
Functions NAND and NOR are so called [functionally complete](functional_completeness.md) which means we can implement any other gate with only one of these gates. For example NOT(x) = NAND(x,x), AND(x,y) = NAND(NAND(x,y),NAND(x,y)), OR(x,y) = NAND(NAND(x,x),NAND(y,y)) etc. Similarly NOT(x) = NOR(x,x), OR(x,y) = NOR(NOR(x,y),NOR(x,y)) etc.
|
||||||
|
|
||||||
|
## More Detail On Boolean Functions
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
Now please see to the following gigatable of all 16 existing boolean functions of two variables (also called logical operators, conjunction etc.). It's clear there are exactly 16 such functions because two input binary variables result in 4 rows of a truth tables, each of which can be either 0 or 1, which gives 2^4 = 16 possible truth tables. These functions are related in various ways, for example to every function there is always another function which is basically the same, just with negated truth table. The table should highlight some of these patterns.
|
||||||
|
|
||||||
|
```
|
||||||
|
symbol| 0 ; & ; > ; X ; < ; Y ; ~ ; | ; v ; = ; !Y ; @ ; !X ; ? ; ^ ; 1
|
||||||
|
------+----------+----------+----------+----------;----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
alt. | F f ; * ^ A . ; -/> ; A p ; </- ; B q ; </> ^ != ; + V U || ; !| ; <=> <-> ; ~Y -Y Y' ; <- <= ; ~X -X X' ; -> => ; !& ; T t
|
||||||
|
sym. | ; x && ; ; ; ; ; (+) ; ; ; == ; oY ; ; oX ; ; ;
|
||||||
|
------+----------+----------+----------+----------;----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
XY 00 | 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 0 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1
|
||||||
|
01 | 0 ; 0 ; 0 ; 0 ; 1 ; 1 ; 1 ; 1 ; 0 ; 0 ; 0 ; 0 ; 1 ; 1 ; 1 ; 1
|
||||||
|
10 | 0 ; 0 ; 1 ; 1 ; 0 ; 0 ; 1 ; 1 ; 0 ; 0 ; 1 ; 1 ; 0 ; 0 ; 1 ; 1
|
||||||
|
11 | 0 ; 1 ; 0 ; 1 ; 0 ; 1 ; 0 ; 1 ; 0 ; 1 ; 0 ; 1 ; 0 ; 1 ; 0 ; 1
|
||||||
|
------+----------+----------+----------+----------;----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
names | zero ; AND ; NIMPLY ; repeater ;rev.nonim.; repeater ; XOR ; OR ; NOR ; NXOR ; NOT ;rev. impl.; NOT ; IMPLY ; NAND ; one
|
||||||
|
| false ; conjunct.;nonimplic.; buffer ;less than ; buffer ;exclus. OR; disjunct.; non-disj.; XNOR ; negat. ; ; negat. ;implicat. ; ; true
|
||||||
|
| low ; times ; minus ; identity ; ; identity ;not equals; plus ; ; equival. ; inverse ; ; inverse ;if then ; ; high
|
||||||
|
|contradic.; carry ; greater ;projection; ;projection; XAND ; ; ; equals ; flip ; ; flip ;condition.; ;tautology
|
||||||
|
| ; ; ; ; ; ;biconditi.; ; ; only if ; ; ; ; ; ;
|
||||||
|
------+----------+----------+----------+----------;----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
arity | 0 ; 2 ; 2 ; 1 ; 2 ; 1 ; 2 ; 2 ; 2 ; 2 ; 1 ; 2 ; 1 ; 2 ; 2 ; 0
|
||||||
|
comm. | yes ; yes ; no ; no ; no ; no ; yes ; yes ; yes ; yes ; no ; no ; no ; no ; yes ; yes
|
||||||
|
assoc.| yes ; yes ; no ; yes ; no ; yes ; yes ; yes ; no ; yes ; no ; no ; no ; no ; no ; yes
|
||||||
|
dual | 1 ; | ; @ ; X ; ? ; Y ; = ; & ; ^ ; ~ ; !Y ; > ; !X ; < ; v ; 0
|
||||||
|
neg. | 1 ; ^ ; ? ; !X ; @ ; !Y ; = ; v ; | ; ~ ; Y ; < ; X ; > ; & ; 0
|
||||||
|
adj. | 0 ; & ; < ; Y ; > ; X ; ~ ; | ; v ; = ; !X ; ? ; !Y ; @ ; ^ ; 1
|
||||||
|
======+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========+==========
|
||||||
|
^ |(X^(X^X))^: (X^Y)^ :(X^(X^X))^: X :(X^(X^X))^: Y :((Y^X)^Y)^: (X^X)^ :((X^X)^ : ((X^X)^ : Y^Y : (Y^X)^Y : X^X : (X^Y)^X : X^Y : X^(X^X)
|
||||||
|
|(X^(X^X)) : (X^Y) :((X^Y)^X) : :((Y^X)^Y) : :((X^Y)^X) : (Y^Y) :(Y^Y))^ : (Y^Y))^ : : : : : :
|
||||||
|
| : : : : : : : :(X^(X^X)) : (X^Y) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
v | Xv(XvX) : (XvX)v : (YvX)vY : X : (XvY)vX : Y : ((XvX)v : (XvY)v : XvY :((YvX)vY)v: YvY :(Xv(XvX))v: XvX :(Xv(XvX))v:((XvX)v :(Xv(XvX))v
|
||||||
|
| : (YvY) : : : : : (YvY))v : (XvY) : :((XvY)vX) : :((XvY)vX) : :((XvY)vY) :(YvY))v :(Xv(XvX))
|
||||||
|
| : : : : : : (XvY) : : : : : : : :(Xv(XvX)) :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
| ! |!((!X)|X) : !((!X) :!(Y|(!X)) : X :!(X|(!Y)) : Y :!((!(X|Y)): X|Y : !(X|Y) :(!(X|Y))| : !Y : X|(!Y) : !X : Y|(!X) :(!X)|(!Y) : (!X)|X
|
||||||
|
| : |(!Y)) : : : : :|(!((!X)| : : : (!((!X)| : : : : : :
|
||||||
|
| : : : : : : (!Y)))) : : : (!Y))) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
& ! | (!X)&X : X&Y : X&(!Y) : X : Y&(!X) : Y :(!(X&Y))& : !((!X) :(!X)&(!Y) :!((!(X&Y)): !Y :!(Y&(!X)) : !X :!(X&(!Y)) : !(X&Y) :!((!X)&X)
|
||||||
|
| : : : : : : (!((!X)& : &(!Y)) : :&(!((!X)& : : : : : :
|
||||||
|
| : : : : : : (!Y))) : : : (!Y)))) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
? ! | !(X?X) :!(Y?(!X)) : !(X?Y) : X : !(Y?X) : Y : (X?Y)? : (!X)?Y :!((!X)?Y) : !((X?Y)? : !Y : Y?X : !X : X?Y : Y?(!X) : X?X
|
||||||
|
| : : : : : : (!(Y?X)) : : : (!(Y?X))): : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
@ ! | !(X@X) :!((!X)@Y) : !(Y@X) : X : !(X@Y) : Y : (!(X@Y))@: Y@(!X) :!(Y@(!X)) :!((!(X@Y)): !Y : X@Y : !X : Y@X : (!X)@Y : X@X
|
||||||
|
| : : : : : : (Y@X) : : :@(Y@X)) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
? 0 | 0 :(Y?(X?0)) : (X?Y)?0 : X : (Y?X)?0 : Y : (X?Y)? : (X?0)?Y :((X?0)?Y) :((X?Y)?((Y: Y?0 : Y?X : X?0 : X?Y : Y?(X?0) : 0?0
|
||||||
|
| : ?0 : : : : : ((Y?X)?0): : ?0 :?X)?0))?0 : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
@ 0 | 0 :0@ : 0@(Y@X) : X : 0@(X@Y) : Y :(0@(X@Y)) : Y@(0@X) : 0@ :0@((0@(X@Y: 0@Y : X@Y : 0@X : Y@X : (0@X)@Y : 0@0
|
||||||
|
| :((0@X)@Y) : : : : : @(Y@X) : :(Y@(0@X)) :))@(Y@X)) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
? ~ | X~X :(Y?(X?(X~X: (X?Y)~ : X : (Y?X)~ : Y : X~Y : (X~(X?X)):((X~(X?X)): (X~Y)~ : Y~(Y?Y) : Y?X : X~(X?X) : X?Y : Y? : X?X
|
||||||
|
| :)))?(X~X) : (X?X) : : (X?X) : : : ?Y :?Y)~(X?X) : (X?X) : : : : : (X?(X~X)):
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
@ ~ | X~X :(X~X)@(((X: (Y@X)~ : X : (X@Y)~ : Y : X~Y : Y@ :(Y@(X~(X@X: (X~Y)~ : Y~(Y@Y) : X@Y : X~(X@X) : Y@X : ((X~X)@X): X@X
|
||||||
|
| :~X)@X)@Y) : (X@X) : : (X@X) : : : (X~(X@X)):)))~(X@X) : (X@X) : : : : : @Y :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
? > | X>X : (Y?(X? : X>Y : X : Y>X : Y : (X?Y)? : (X?(X>X)):((X?(X>X)):((X?Y)?((Y: Y?(Y>Y) : Y?X : X?(X>X) : X?Y : Y? : X?X
|
||||||
|
| : (X>X))) : : : : : ((Y?X)? : ?Y :?Y)?(X>X) :?X)?(X>X)): : : : : (X?(X>X)):
|
||||||
|
| : ?(X>X) : : : : : (X>X)) : : :)?(X>X) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
? < | X<X : (Y?(X? : Y<X : X : X<Y : Y : (X?Y)? : (X?(X<X)):((X?(X<X)):((X?Y)?((Y: Y?(Y<Y) : Y?X : X?(X<X) : X?Y : Y? : X?X
|
||||||
|
| : (X<X))) : : : : : ((Y?X)? : ?Y :?Y)?(X<X) :?X)?(X<X)): : : : : (X?(X<X)):
|
||||||
|
| : ?(X<X) : : : : : (X<X)) : : :)?(X<X) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
@ > | X>X : (X>X)@ : X>Y : X : Y>X : Y : ((X>X)@ : Y@ :(X>X)@(Y@ :(X>X)@(((X: (Y>Y)@Y : X@Y : (X>X)@X : Y@X : ((X>X)@X): X@X
|
||||||
|
| : (((X>X) : : : : : (X@Y))@ : ((X>X)@X):((X>X)@X)):>X)@(X@Y)): : : : : @Y :
|
||||||
|
| : @X)@Y) : : : : : (Y@X) : : :@(Y@X)) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
@ < | X<X : (X<X)@ : Y<X : X : X<Y : Y : ((X<X)@ : Y@ :(X<X)@(Y@ :(X<X)@(((X: (Y<Y)@Y : X@Y : (X<X)@X : Y@X : ((X<X)@X): X@X
|
||||||
|
| : (((X<X) : : : : : (X@Y))@ : ((X<X)@X):((X<X)@X)):<X)@(X@Y)): : : : : @Y :
|
||||||
|
| : @X)@Y) : : : : : (Y@X) : : :@(Y@X)) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
> ! | X>X : X>(!Y) : X>Y : X : Y>X : Y :!((!(X>Y)): !((!X)>Y): (!X)>Y :(!(X>Y))>(: !Y : !(Y>X) : !X : !(X>Y) : (!X)>Y : !(X>X)
|
||||||
|
| : : : : : :>(!(!(Y>X): : :!(!(Y>X))): : : : : :
|
||||||
|
| : : : : : :))) : : : : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
< ! | X<X : (!Y)<X : Y<X : X : X<Y : Y :!((!(!(X<Y: !(Y<(!X)): Y<(!X) :(!(!(X<Y)): !Y : !(X<Y) : !X : !(Y<X) : Y<(!X) : !(X<X)
|
||||||
|
| : : : : : :)))<(!(Y<X: : :)<(!(Y<X)): : : : : :
|
||||||
|
| : : : : : :))) : : : : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
> 1 | 1>1 : X>(1>Y) : X>Y : X : Y>X : Y :1>((1>(X>Y: 1>((1>X) : (1>X)>Y :(1>(X>Y))>: 1>Y : 1>(Y>X) : 1>X : 1>(X>Y) : (1>X)>Y : 1
|
||||||
|
| : : : : : :))>(1>(1>(: >Y) : :(1>(1>(Y>X: : : : : :
|
||||||
|
| : : : : : :Y>X)))) : : :))) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
< 1 | 1<1 : (Y<1)<X : Y<X : X : X<Y : Y :((((X<Y)<1:(Y<(X<1)) : Y<(1<X) :(((X<Y)<1): Y<1 : (X<Y)<1 : X<1 : (Y<X)<1 : Y<(X<1) : 1
|
||||||
|
| : : : : : :)<1)<((Y<X: <1 : :<1)<((Y<X): : : : : :
|
||||||
|
| : : : : : :)<1))<1 : : :<1) : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
> = | X>X : Y> : X>Y : X : Y>X : Y : (X=Y)= :((X=(X>X)): (X=(X>X)): X=Y : Y=(Y>Y) : (X=X)> : X=(X>X) : (X=X)> :(Y>(X=(X> : X=X
|
||||||
|
| : (X=(X>X)): : : : : (X>X) : >Y)=(X>X): >Y : : : (Y>X) : : (X>Y) :X)))=(X>X):
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
< = | X<X : (X=(X<X)): Y<X : X : X<Y : Y : (X=Y)= :(Y<(X=(X<X: Y< : X=Y : Y=(Y<Y) : (X<Y)< : X=(X<X) : (Y<X)< :((X=(X<X)): X=X
|
||||||
|
| : <Y : : : : : (X<X) :)))=(X<X) : (X=(X<X)): : : (X=X) : : (X=X) :<Y)=(X<X) :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
| = 0 | 0 : ((X=0)| :((X=0)|Y) : X :((Y=0)|X) : Y : (X=Y)=0 : X|Y : (X|Y)=0 : X=Y : Y=0 : (Y=0)|X : X=0 : (X=0)|Y : (X=0)| : 0=0
|
||||||
|
| : (Y=0))=0 : =0 : : =0 : : : : : : : : : : (Y=0) :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
| = ~ | X~X :((X=(X~X)):(((X=(X~X): X :(((Y=(X~X): Y : X~Y : X|Y : (X|Y)= : X=Y : Y=(Y~Y) :((Y=(X~X) : X=(X~X) :((X=(X~X) :(X=(X~X))|: X=X
|
||||||
|
| :|(Y=(X~X) : ))|Y) : : ))|X) : : : : (X~X) : : : ))|X : : ))|Y :(Y=(X~X)) :
|
||||||
|
| :)=(X~X) : =(X~X) : : =(X~X) : : : : : : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
| ~ 1 | 1~1 : ((X~1)| :((X~1)|Y) : X :((Y~1)|X) : Y : X~Y : X|Y : (X|Y)~1 : (X~Y)~1 : Y~1 : (Y~1)|X : X~1 : (X~1)|Y : (X~1)| : 1
|
||||||
|
| : (Y~1))~1 : ~1 : : ~1 : : : : : : : : : : (Y~1) :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
& = 0 | 0 : X&Y : (Y=0)&X : X : (X=0)&Y : Y : (X=Y)=0 : ((X=0)& : ((X=0)& : X=Y : Y=0 :((Y=0)&X) : X=0 :((X=0)&Y) : (X&Y)=0 : 0=0
|
||||||
|
| : : : : : : : (Y=0))=0 : (Y=0)) : : : =0 : : =0 : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
& = ~ | X~X : X&Y : X&(Y= : X : Y&(X= : Y : X~Y :((X~(X=X)):(X~(X=X))&: X=Y : Y=(Y~Y) :(Y&(X=(X~X: X=(X~X) :(X&(Y=(X~X: (X&Y)= : X=X
|
||||||
|
| : : (X~X)) : : (X~X)) : : :&(Y~(X=X)):(Y~(X=X)) : : :)))=(X~X) : :)))=(X~X) : (X~X) :
|
||||||
|
| : : : : : : : )~(X=X) : : : : : : : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
& ~ 1 | 1~1 : X&Y : X&(Y~1) : X : Y&(X~1) : Y : X~Y : ((X~1)& : (X~1)& : (X~Y)~1 : Y~1 : (Y&(X~1)): X~1 : (X&(Y~1)): (X&Y)~1 : 1
|
||||||
|
| : : : : : : : (Y~1))~1 : (Y~1) : : : ~1 : : ~1 : :
|
||||||
|
------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------+----------
|
||||||
|
```
|
||||||
|
|
||||||
|
Comments on the table:
|
||||||
|
|
||||||
|
- Top shows all 16 boolean functions of two variables along with symbols we will use for them, alternative symbols that are often used, commonly used names, their truth tables etc.
|
||||||
|
- The *arity* row says how many arguments the function's output depends on.
|
||||||
|
- The *comm* and *assoc.* rows say if the function is [commutative](commutativity.md) (result is the same with swapped arguments) and [associative](associativity.md) (result doesn't depend on bracketing, i.e. order of evaluation) respectively.
|
||||||
|
- The *dual*, *neg.* and *adj.* say the dual function (equivalent via De Morgan's laws, i.e. its truth table is flipped vertically and negated), negated function (function that gives the same results, just negated) and adjoint function (function giving the same results if we flip the arguments, i.e. its truth table has the middle two rows flipped vertically) respectively.
|
||||||
|
- The bigger part of the table shows how the function is implemented when we're limited to any of the 26 existing functionally complete sets of functions (of course there exist many ways, here we show hopefully one of the most minimal expressions). This shows that we can implements ALL of the 16 functions using as few as one single function (NAND or NOR).
|
||||||
|
- Notice patterns in the table, i.e. that adjoint functions such as `<` and `>` use the same formula just with *X* and *Y* switched, that the negated function of a function is always the one that's mirrored by the table center etc.
|
||||||
|
|
||||||
## See Also
|
## See Also
|
||||||
|
|
||||||
- [logic circuit](logic_circuit.md)
|
- [logic circuit](logic_circuit.md)
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
{ Open consoles are how I got into [suckless](suckless.md) programming, they taught me about the low-level, optimizations and how to actually program efficiently on very limited hardware. I recommend you grab one of these. ~drummyfish }
|
{ Open consoles are how I got into [suckless](suckless.md) programming, they taught me about the low-level, optimizations and how to actually program efficiently on very limited hardware. I recommend you grab one of these. ~drummyfish }
|
||||||
|
|
||||||
|
{ Also I have now stopped following the newer open consoles, info here may be "[out of date](update_culture.md)". ~drummyfish }
|
||||||
|
|
||||||
Open consoles (also indie handhelds etc.) are tiny [GameBoy](gameboy.md)-like [gaming](game.md) consoles mostly powered by [free software](free_software.md) and [free hardware](free_hardware.md), which have relatively recently (some time after 2015) seen a small boom. Examples include [Arduboy](arduboy.md), [Pokitto](pokitto.md) or [Gamebuino](gamebuino.md). These are **NOT** to be confused with the [Raspberry Pi](rpi.md) (and similar) handhelds that run GameBoy/PS1/DOS [emulators](emulator.md) (though some open consoles may use e.g. the RP2040 Raspberry pi processor) but rather custom, mostly [FOSS](foss.md) platforms running mostly their own community made [homebrew](homebrew.md) games. Open consoles are also similar to the old consoles/computers such as [NES](nes.md), [GameBoy](gameboy.md) etc., however again there is a difference in being more indie, released more recently and being "open", directly made for tinkering, so it's e.g. much easier to program them (old consoles/computers very often require some unofficial hacks, obscure libraries, gcc patches etc. to just get your code working).
|
Open consoles (also indie handhelds etc.) are tiny [GameBoy](gameboy.md)-like [gaming](game.md) consoles mostly powered by [free software](free_software.md) and [free hardware](free_hardware.md), which have relatively recently (some time after 2015) seen a small boom. Examples include [Arduboy](arduboy.md), [Pokitto](pokitto.md) or [Gamebuino](gamebuino.md). These are **NOT** to be confused with the [Raspberry Pi](rpi.md) (and similar) handhelds that run GameBoy/PS1/DOS [emulators](emulator.md) (though some open consoles may use e.g. the RP2040 Raspberry pi processor) but rather custom, mostly [FOSS](foss.md) platforms running mostly their own community made [homebrew](homebrew.md) games. Open consoles are also similar to the old consoles/computers such as [NES](nes.md), [GameBoy](gameboy.md) etc., however again there is a difference in being more indie, released more recently and being "open", directly made for tinkering, so it's e.g. much easier to program them (old consoles/computers very often require some unofficial hacks, obscure libraries, gcc patches etc. to just get your code working).
|
||||||
|
|
||||||
In summary, open consoles are:
|
In summary, open consoles are:
|
||||||
|
@ -21,13 +23,15 @@ In summary, open consoles are:
|
||||||
|
|
||||||
Recommended consoles for starters are [Arduboy](arduboy.md) and [Pokitto](pokitto.md) which are not only very well designed, but most importantly have actual friendly active communities.
|
Recommended consoles for starters are [Arduboy](arduboy.md) and [Pokitto](pokitto.md) which are not only very well designed, but most importantly have actual friendly active communities.
|
||||||
|
|
||||||
These nice little toys are great because they are anti-[modern](modern.md), [simple](minimalism.md), out of the toxic mainstream, like the oldschool bullshit-free computers. This supports (and by the low specs kind of "forces") [suckless](suckless.md) programming and brings the programmer the joy of programming (no headaches of resizable windows, multithreading etc., just plain programming of simple things with direct access to hardware). They offer an alternative [ISA](isa.md), a non-x86 platform without botnet and [bloat](bloat.md) usable for any purpose, not just games. Besides that, this hobby teaches low level, efficiency-focused programming skills.
|
These nice little toys are great because they are anti-[modern](modern.md), [simple](minimalism.md), out of the [toxic](toxic.md) mainstream, like the oldschool bullshit-free computers. { Well, at least they used to be back when this was written. ~drummyfish } This supports (and by the low specs kind of "forces") [suckless](suckless.md) programming and brings the programmer the joy of programming (no headaches of resizable windows, multithreading etc., just plain programming of simple things with direct access to hardware). They offer an alternative [ISA](isa.md), a non-x86 platform without botnet and [bloat](bloat.md) usable for any purpose, not just games. Besides that, this hobby teaches low level, efficiency-focused programming skills.
|
||||||
|
|
||||||
**Watch out** (2024 update): having been successful on the market, the world of open consoles is now flooded by corporations and [SJWs](sjw.md) bringing in the [toxicity](toxic.md), they are going to go to shit very soon, get the old ones while you still can. New consoles already try to employ web-only IDEs in micropython, they're websites are full of suicide inducing diversity propaganda and unusable on computers with less than 1 TB of RAM.
|
**Watch out** (2024 update): having been successful on the market, the world of open consoles is now flooded by corporations and [SJWs](sjw.md) bringing in the [toxicity](toxic.md), they are going to go to shit very soon, get the old ones while you still can. New consoles already try to employ web-only IDEs in micropython, they're websites are full of suicide inducing diversity propaganda and unusable on computers with less than 1 TB of RAM.
|
||||||
|
|
||||||
|
Still we mustn't forget about the alternatives such as [homebrew](homebrew.md) development for old [proprietary](proprietary.md) consoles such as [NES](nes.md) or [GameBoy](gameboy.md). Open consoles are awesome, yes, but an old proprietary console may [de facto](de_facto.md) offer a very similar platform that is more stable (as in tested by time) and possibly even better documented (and therefore more practically free), despite not being "officially free hardware". Always consider all options. In any case we should probably never write software for a single system: write [portable](portability.md) programs, use ALL the systems that are available.
|
||||||
|
|
||||||
## Programming
|
## Programming
|
||||||
|
|
||||||
Open consoles can typically be programmed without proprietary software (though officially they may promote something involving proprietary software), GNU/[Linux](linux.md) mostly works just fine (sometimes it requires a bit of extra work but not much). Most of the consoles are [Arduino](arduino.md)-based so the Arduino IDE is the official development tool with [C++](cpp.md) as a language ([C](c.md) being thankfully an option as well). The IDE is "open-source" but also [bloat](bloat.md); thankfully [CLI](cli.md) development workflow can be set up without greater issues (Arduino comes with CLI tools and for other platforms [gcc](gcc.md) cross-compiler can be used) so comfy programming with [vim](vim.md) is nicely possible.
|
Open consoles can typically be programmed without proprietary software (though officially they may promote something involving proprietary software), GNU/[Linux](linux.md) mostly works just fine (sometimes it requires a bit of extra [work](work.md) but not much). Most of the consoles are [Arduino](arduino.md)-based so the Arduino IDE is the official development tool with [C++](cpp.md) as a language ([C](c.md) being thankfully an option as well). The IDE is "[open-source](open_source.md)" but also [bloat](bloat.md); thankfully [CLI](cli.md) development workflow can be set up without greater issues (Arduino comes with CLI tools and for other platforms [gcc](gcc.md) cross-compiler can be used) so comfy programming with [vim](vim.md) is nicely possible.
|
||||||
|
|
||||||
If normies can do it, you can do it too.
|
If normies can do it, you can do it too.
|
||||||
|
|
||||||
|
|
3
or.md
Normal file
3
or.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Or
|
||||||
|
|
||||||
|
See [logic gate](logic_gate.md).
|
3608
random_page.md
3608
random_page.md
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
133
wiki_stats.md
133
wiki_stats.md
|
@ -3,9 +3,9 @@
|
||||||
This is an autogenerated article holding stats about this wiki.
|
This is an autogenerated article holding stats about this wiki.
|
||||||
|
|
||||||
- number of articles: 609
|
- number of articles: 609
|
||||||
- number of commits: 939
|
- number of commits: 940
|
||||||
- total size of all texts in bytes: 4753927
|
- total size of all texts in bytes: 4764106
|
||||||
- total number of lines of article texts: 35135
|
- total number of lines of article texts: 35174
|
||||||
- number of script lines: 294
|
- number of script lines: 294
|
||||||
- occurrences of the word "person": 9
|
- occurrences of the word "person": 9
|
||||||
- occurrences of the word "nigger": 102
|
- occurrences of the word "nigger": 102
|
||||||
|
@ -35,60 +35,81 @@ longest articles:
|
||||||
|
|
||||||
top 50 5+ letter words:
|
top 50 5+ letter words:
|
||||||
|
|
||||||
- which (2621)
|
- which (2629)
|
||||||
- there (2062)
|
- there (2067)
|
||||||
- people (1962)
|
- people (1964)
|
||||||
- example (1615)
|
- example (1621)
|
||||||
- other (1490)
|
- other (1499)
|
||||||
- about (1318)
|
- about (1318)
|
||||||
- number (1282)
|
- number (1286)
|
||||||
- software (1226)
|
- software (1226)
|
||||||
- because (1043)
|
- because (1043)
|
||||||
- their (1020)
|
- their (1023)
|
||||||
- program (1020)
|
- program (1020)
|
||||||
- would (975)
|
- would (977)
|
||||||
- being (947)
|
- something (950)
|
||||||
- something (946)
|
- being (949)
|
||||||
- things (915)
|
- things (916)
|
||||||
- language (915)
|
- language (915)
|
||||||
- called (889)
|
- called (890)
|
||||||
- simple (817)
|
- simple (818)
|
||||||
- computer (813)
|
- computer (814)
|
||||||
- numbers (812)
|
- numbers (812)
|
||||||
- without (804)
|
- without (805)
|
||||||
- however (753)
|
- however (758)
|
||||||
- different (752)
|
- different (754)
|
||||||
- programming (749)
|
- programming (749)
|
||||||
- these (736)
|
- these (737)
|
||||||
- function (724)
|
- function (725)
|
||||||
- world (719)
|
- world (721)
|
||||||
- system (686)
|
- system (695)
|
||||||
- doesn (674)
|
- doesn (675)
|
||||||
- should (669)
|
- should (669)
|
||||||
- still (656)
|
- still (659)
|
||||||
- while (647)
|
- games (656)
|
||||||
- games (645)
|
- while (648)
|
||||||
- point (632)
|
- point (632)
|
||||||
- society (625)
|
- drummyfish (627)
|
||||||
- drummyfish (625)
|
- society (626)
|
||||||
- simply (615)
|
- simply (616)
|
||||||
- possible (605)
|
- possible (606)
|
||||||
- using (597)
|
- using (597)
|
||||||
- probably (581)
|
- probably (585)
|
||||||
|
- always (568)
|
||||||
- course (567)
|
- course (567)
|
||||||
- though (566)
|
- though (566)
|
||||||
- always (566)
|
|
||||||
- https (565)
|
- https (565)
|
||||||
- similar (560)
|
- similar (561)
|
||||||
- basically (552)
|
- basically (554)
|
||||||
- really (536)
|
- really (537)
|
||||||
- memory (535)
|
- memory (535)
|
||||||
- someone (533)
|
- someone (534)
|
||||||
- actually (532)
|
- actually (533)
|
||||||
|
|
||||||
latest changes:
|
latest changes:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Date: Tue Dec 10 20:41:11 2024 +0100
|
||||||
|
antialiasing.md
|
||||||
|
backgammon.md
|
||||||
|
cpp.md
|
||||||
|
doom.md
|
||||||
|
elo.md
|
||||||
|
exercises.md
|
||||||
|
hitler.md
|
||||||
|
homelessness.md
|
||||||
|
kiss.md
|
||||||
|
living.md
|
||||||
|
minimalism.md
|
||||||
|
often_confused.md
|
||||||
|
oop.md
|
||||||
|
random_page.md
|
||||||
|
science.md
|
||||||
|
suicide.md
|
||||||
|
wiki_pages.md
|
||||||
|
wiki_stats.md
|
||||||
|
woman.md
|
||||||
|
work.md
|
||||||
Date: Sat Dec 7 19:46:32 2024 +0100
|
Date: Sat Dec 7 19:46:32 2024 +0100
|
||||||
ashley_jones.md
|
ashley_jones.md
|
||||||
cpp.md
|
cpp.md
|
||||||
|
@ -102,26 +123,6 @@ Date: Sat Dec 7 19:46:32 2024 +0100
|
||||||
wiki_stats.md
|
wiki_stats.md
|
||||||
woman.md
|
woman.md
|
||||||
Date: Fri Dec 6 22:17:00 2024 +0100
|
Date: Fri Dec 6 22:17:00 2024 +0100
|
||||||
21st_century.md
|
|
||||||
cpp.md
|
|
||||||
homelessness.md
|
|
||||||
how_to.md
|
|
||||||
lmao.md
|
|
||||||
loquendo.md
|
|
||||||
money.md
|
|
||||||
often_confused.md
|
|
||||||
racism.md
|
|
||||||
random_page.md
|
|
||||||
wiki_pages.md
|
|
||||||
wiki_stats.md
|
|
||||||
windows.md
|
|
||||||
www.md
|
|
||||||
youtube.md
|
|
||||||
Date: Fri Dec 6 03:33:05 2024 +0100
|
|
||||||
21st_century.md
|
|
||||||
cancer.md
|
|
||||||
capitalism.md
|
|
||||||
crypto.md
|
|
||||||
```
|
```
|
||||||
|
|
||||||
most wanted pages:
|
most wanted pages:
|
||||||
|
@ -150,28 +151,28 @@ most wanted pages:
|
||||||
most popular and lonely pages:
|
most popular and lonely pages:
|
||||||
|
|
||||||
- [lrs](lrs.md) (323)
|
- [lrs](lrs.md) (323)
|
||||||
- [capitalism](capitalism.md) (278)
|
- [capitalism](capitalism.md) (280)
|
||||||
- [c](c.md) (233)
|
- [c](c.md) (233)
|
||||||
- [bloat](bloat.md) (225)
|
- [bloat](bloat.md) (225)
|
||||||
- [free_software](free_software.md) (194)
|
- [free_software](free_software.md) (194)
|
||||||
- [game](game.md) (146)
|
- [game](game.md) (147)
|
||||||
- [suckless](suckless.md) (145)
|
- [suckless](suckless.md) (145)
|
||||||
- [proprietary](proprietary.md) (131)
|
- [proprietary](proprietary.md) (131)
|
||||||
- [minimalism](minimalism.md) (112)
|
- [minimalism](minimalism.md) (112)
|
||||||
- [censorship](censorship.md) (111)
|
- [censorship](censorship.md) (111)
|
||||||
- [modern](modern.md) (108)
|
- [modern](modern.md) (108)
|
||||||
- [computer](computer.md) (107)
|
- [computer](computer.md) (107)
|
||||||
- [kiss](kiss.md) (104)
|
- [kiss](kiss.md) (105)
|
||||||
- [fun](fun.md) (103)
|
- [fun](fun.md) (104)
|
||||||
- [programming](programming.md) (100)
|
- [programming](programming.md) (100)
|
||||||
- [math](math.md) (100)
|
- [math](math.md) (100)
|
||||||
- [gnu](gnu.md) (96)
|
- [gnu](gnu.md) (96)
|
||||||
- [shit](shit.md) (95)
|
- [shit](shit.md) (95)
|
||||||
- [linux](linux.md) (95)
|
- [linux](linux.md) (95)
|
||||||
- [fight_culture](fight_culture.md) (92)
|
- [fight_culture](fight_culture.md) (93)
|
||||||
- [bullshit](bullshit.md) (91)
|
- [bullshit](bullshit.md) (91)
|
||||||
- [woman](woman.md) (90)
|
- [woman](woman.md) (90)
|
||||||
- [hacking](hacking.md) (88)
|
- [hacking](hacking.md) (89)
|
||||||
- [corporation](corporation.md) (86)
|
- [corporation](corporation.md) (86)
|
||||||
- [less_retarded_society](less_retarded_society.md) (85)
|
- [less_retarded_society](less_retarded_society.md) (85)
|
||||||
- [free_culture](free_culture.md) (85)
|
- [free_culture](free_culture.md) (85)
|
||||||
|
@ -180,6 +181,7 @@ most popular and lonely pages:
|
||||||
- [pseudoleft](pseudoleft.md) (83)
|
- [pseudoleft](pseudoleft.md) (83)
|
||||||
- [chess](chess.md) (83)
|
- [chess](chess.md) (83)
|
||||||
- ...
|
- ...
|
||||||
|
- [charity_sex](charity_sex.md) (5)
|
||||||
- [bilinear](bilinear.md) (5)
|
- [bilinear](bilinear.md) (5)
|
||||||
- [backpropagation](backpropagation.md) (5)
|
- [backpropagation](backpropagation.md) (5)
|
||||||
- [atan](atan.md) (5)
|
- [atan](atan.md) (5)
|
||||||
|
@ -198,7 +200,6 @@ most popular and lonely pages:
|
||||||
- [modern_software](modern_software.md) (4)
|
- [modern_software](modern_software.md) (4)
|
||||||
- [mob_software](mob_software.md) (4)
|
- [mob_software](mob_software.md) (4)
|
||||||
- [less_retarded_software](less_retarded_software.md) (4)
|
- [less_retarded_software](less_retarded_software.md) (4)
|
||||||
- [homelessness](homelessness.md) (4)
|
|
||||||
- [global_discussion](global_discussion.md) (4)
|
- [global_discussion](global_discussion.md) (4)
|
||||||
- [gigachad](gigachad.md) (4)
|
- [gigachad](gigachad.md) (4)
|
||||||
- [gaywashing](gaywashing.md) (4)
|
- [gaywashing](gaywashing.md) (4)
|
||||||
|
|
1
work.md
1
work.md
|
@ -47,6 +47,7 @@ For lawyer cunts: we officially DO NOT ADVISE any illegal methods mentioned here
|
||||||
- **Alcoholism**: starting to drink heavily may remove your brain brain, but then suddenly you'll also be judged a "victim" of alcoholism, locked somewhere and probably won't have to work, so it may be worth it.
|
- **Alcoholism**: starting to drink heavily may remove your brain brain, but then suddenly you'll also be judged a "victim" of alcoholism, locked somewhere and probably won't have to work, so it may be worth it.
|
||||||
- **Getting EU (or similar) money on some bullshit** -- if this was to be considered """fraud""", then we officially DO NOT RECOMMEND THIS (:D), but it is very nice if someone does it. This would require the hypothetical man to maybe do some small amount of "work", but he could just dig a lot of money for doing almost nothing, for example one may ask for money for some software project that looks like a 100K EUR 1 year project -- this would actually be true if you made the project the "normal" way (i.e. using bloat tech, hiring consultants, managers, lawyers and whatever), but you can just do the project in a simple, [LRS](lrs.md) way over the weekend alone, then enjoy a whole year off as well as your free money.
|
- **Getting EU (or similar) money on some bullshit** -- if this was to be considered """fraud""", then we officially DO NOT RECOMMEND THIS (:D), but it is very nice if someone does it. This would require the hypothetical man to maybe do some small amount of "work", but he could just dig a lot of money for doing almost nothing, for example one may ask for money for some software project that looks like a 100K EUR 1 year project -- this would actually be true if you made the project the "normal" way (i.e. using bloat tech, hiring consultants, managers, lawyers and whatever), but you can just do the project in a simple, [LRS](lrs.md) way over the weekend alone, then enjoy a whole year off as well as your free money.
|
||||||
- **[Sucicide](suicide.md)**: obviously death solves all problems. TBH lying in ground is probably more comfy than being raped every day of the year for 120 years.
|
- **[Sucicide](suicide.md)**: obviously death solves all problems. TBH lying in ground is probably more comfy than being raped every day of the year for 120 years.
|
||||||
|
- For discovering other methods it might be useful to dig in similar topics such as avoiding military service. For example breathing cacao before the medical entry examination was a popular way to simulate lung disease in the past -- nowadays with better technology this may no longer work, but still at least useful hints and directions may be found this way.
|
||||||
- ...
|
- ...
|
||||||
|
|
||||||
## See Also
|
## See Also
|
||||||
|
|
3
xor.md
Normal file
3
xor.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Xor
|
||||||
|
|
||||||
|
See [logic gate](logic_gate.md).
|
Loading…
Reference in a new issue