Follow TV Tropes

Following

History MediaNotes / BinaryLogic

Go To

OR

Is there an issue? Send a MessageReason:
Page was movedfrom UsefulNotes.Binary Logic to MediaNotes.Binary Logic. Null edit to update page.
Is there an issue? Send a MessageReason:
None


'''NAND''': If all inputs are 1, the output is 0; the opposite of AND. This is one of the universal logic operations, which can create any other logic operation. Most commonly used in UsefulNotes/FlashMemory.

to:

'''NAND''': If all inputs are 1, the output is 0; the opposite of AND. This is one of the universal logic operations, which can create any other logic operation. Most commonly used in UsefulNotes/FlashMemory.MediaNotes/FlashMemory.



Note in this example for inputs 11, it produces the output 00, which makes Q = Q-not.

to:

Note in this example for inputs 11, it produces the output 00, which makes Q = Q-not.
Is there an issue? Send a MessageReason:
None


* Outside of computing, it's often written as "iff", for "if and only if", because one is true ''if and only if'' the other one is too.

to:

* Outside of computing, it's often written as "iff", for "if and only if", because one is true ''if and only if'' the other one is too. This makes it useful as a voter gate (i.e., both inputs must agree before giving an output)
Is there an issue? Send a MessageReason:
Revised XNOR\'s definition.


'''XNOR''': Outputs a 1 if all inputs are the same value.

to:

'''XNOR''': Outputs a 1 if For two-input operation, all inputs are must be the same value.to output a 1; the opposite of a XOR. Otherwise the number of inputs that are 1 must be even to output a 1.

Changed: 586

Removed: 398

Is there an issue? Send a MessageReason:
Rewritten the explanation of logic operations to be more generic, mostly to get rid of the \"multiple inputs\" line. Also revised the defintion of a flipflop


Below is a list of all the operations that can be done. All operations but "NOT" take in two inputs and spit out one output.

to:

Below is a list of all the operations that can be done. All operations but "NOT" take in Example outputs are assuming either one or two inputs. Multiple inputs and spit out one output.
of the same logic gate can be reduced to a chain of two-input versions.



* For multi-input OR gates, outputs 1 if at least one input is 1.



'''AND''': Both inputs must be 1 for the output to be 1.

to:

'''AND''': Both All inputs must be 1 for the output to be 1.



* For multi-input AND gates, outputs 1 if all inputs are 1.



'''XOR (Exclusive OR)''': Both inputs must be different for the output to be 1.

to:

'''XOR (Exclusive OR)''': Both For two-input XOR operations, both inputs must be different for the to output a 1. Otherwise, the number of inputs that are 1 must be odd to be output a 1.



* For multi-input XOR gates, outputs 1 if there are an odd number of 1's.



'''NAND''': Same as the AND operation, but the output is inverted. One of the universal logic operations (you can do any of these operations with NAND gates). Most commonly used in UsefulNotes/FlashMemory.

to:

'''NAND''': Same as the AND operation, but If all inputs are 1, the output is inverted. One 0; the opposite of AND. This is one of the universal logic operations (you operations, which can do create any of these operations with NAND gates).other logic operation. Most commonly used in UsefulNotes/FlashMemory.



* For multi-input NAND gates, outputs 0 if all inputs are 1.



'''NOR''': Same as the OR operation, but the output is inverted. The other universal logic operation.

to:

'''NOR''': Same as the OR operation, but If any input is 1, the output is inverted. The 0; the opposite of OR. This is the other universal logic operation.operation and was used in flash memory.



* For multi-input NOR gates, outputs 0 if at least one input is 1.



'''XNOR''': Same as the XOR, but the output is inverted.

to:

'''XNOR''': Same as Outputs a 1 if all inputs are the XOR, but the output is inverted.same value.



* For multi-input XNOR gates, outputs 1 if there are an even number of 1's.



'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can produce an invalid result if its input is 00 or 11 depending on the type. This is due to the outputs equally each other when they should be different. If one of the inputs is a clock signal, a latch is called a flip-flop instead.

to:

'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can produce an invalid result if its input is 00 or 11 depending on the type. This is due to the outputs equally each other when they should be different. If one of the inputs is a latch takes a clock signal, a latch is signal as an input, it's called a flip-flop instead.

Added: 85

Changed: 148

Is there an issue? Send a MessageReason:
Clarified the latch invalid input because it\'s possible, it\'s just the output is invalid for use


'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can't have a certain input, which is either 00 or 11, depending on the type. If one of the inputs is a clock signal, a latch is called a flip-flop instead.

to:

'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can't have a certain input, which can produce an invalid result if its input is either 00 or 11, 11 depending on the type.type. This is due to the outputs equally each other when they should be different. If one of the inputs is a clock signal, a latch is called a flip-flop instead.



||Output (Q)|| (no change)|| 0|| 1|| (invalid)||
||Output (Q-not)|| (no change)|| 1|| 0|| (invalid)||

to:

||Output (Q)|| (no change)|| 0|| 1|| (invalid)||
0||
||Output (Q-not)|| (no change)|| 1|| 0|| (invalid)|| 0||

Note in this example for inputs 11, it produces the output 00, which makes Q = Q-not.


* Usually written using one or two [[ExactlyWhatItSaysOnTheTin ampersands]], '''⋅''' (dot operator) , or ∧

to:

* Usually written using one or two [[ExactlyWhatItSaysOnTheTin ampersands]], ampersands, '''⋅''' (dot operator) , or ∧
Is there an issue? Send a MessageReason:
None


'''NAND''': Same as the AND operation, but the output is inverted. One of the universal logic operations (you can do any of these operations with NAND gates). Most commonly used in FlashMemory

to:

'''NAND''': Same as the AND operation, but the output is inverted. One of the universal logic operations (you can do any of these operations with NAND gates). Most commonly used in FlashMemoryUsefulNotes/FlashMemory.

Added: 85

Changed: 63

Is there an issue? Send a MessageReason:
Just a bit more fiddling.


* '''XNOR''': Same as the XOR, but the output is inverted.
** Outside of computing, it's often written as "iff", for "if and only if", because one is true ''if and only if'' the other one is too.
** For multi-input XNOR gates, outputs 1 if there are an even number of 1's.

to:

* '''XNOR''': Same as the XOR, but the output is inverted.
** * Outside of computing, it's often written as "iff", for "if and only if", because one is true ''if and only if'' the other one is too.
** * For multi-input XNOR gates, outputs 1 if there are an even number of 1's.



For a typical set-reset latch, using output Q (as opposed to Q-not)

to:

For a typical set-reset Set-Reset latch, using the output Q (as opposed to Q-not)is:



||Input || 00|| 01|| 10|| 11||

to:

||Input || 00|| 01|| 10|| 11||(Set)|| 0|| 0|| 1|| 1||
||Input (Reset|| 0|| 1|| 0|| 1||


Added DiffLines:

||Output (Q-not)|| (no change)|| 1|| 0|| (invalid)||

Added: 1258

Changed: 956

Removed: 951

Is there an issue? Send a MessageReason:
None


* '''NOT''': Inverts the incoming signal.
** Usually written as a leading exclamation mark or tilde.

to:

* '''NOT''': Inverts the incoming signal.
** * Usually written as a leading exclamation mark mark, tilde, or tilde.¬.
** For example !X or ~X.



* '''OR''': As long as one input is 1, the output is 1.
** Usually written using one or two pipe characters.
** Can be thought of as addition, only you have to believe for a moment that 1 + 1 = 1.
** For multi-input OR gates, outputs 1 if at least one input is 1.

to:

* '''OR''': As long as one input is 1, the output is 1.
** * Usually written using one or two pipe characters.
characters, +, or v.
** For example, X | Y or X || Y.
*
Can be thought of as addition, only you have to believe for a moment that 1 + 1 = 1.
** * For multi-input OR gates, outputs 1 if at least one input is 1.



* '''AND''': Both inputs must be 1 for the output to be 1.
** Usually written using one or two [[ExactlyWhatItSaysOnTheTin ampersands]]
** Can be thought of as multiplication.
** For multi-input AND gates, outputs 1 if all inputs are 1.

to:

* '''AND''': Both inputs must be 1 for the output to be 1.
** * Usually written using one or two [[ExactlyWhatItSaysOnTheTin ampersands]]
ampersands]], '''⋅''' (dot operator) , or ∧
** For example, X & Y or X && Y.
*
Can be thought of as multiplication.
** * For multi-input AND gates, outputs 1 if all inputs are 1.



* '''XOR (Exclusive OR)''': Both inputs must be different for the output to be 1.
** Can be thought of subtraction, only the result is the always positive.
** For multi-input XOR gates, outputs 1 if there are an odd number of 1's.

to:

* '''XOR (Exclusive OR)''': Both inputs must be different for the output to be 1.
* Usually written using a caret or ⊕.
** For example, X ^ Y.
*
Can be thought of subtraction, only the result is the always positive.
** * For multi-input XOR gates, outputs 1 if there are an odd number of 1's.



* '''NAND''': Same as the AND operation, but the output is inverted. One of the universal logic operations (you can do any of these operations with NAND gates). Most commonly used in FlashMemory
** For multi-input NAND gates, outputs 0 if all inputs are 1.

to:

* '''NAND''': Same as the AND operation, but the output is inverted. One of the universal logic operations (you can do any of these operations with NAND gates). Most commonly used in FlashMemory
* Usually written using ↑
** If programming, it would be written as !(X & Y) or similar.
*
For multi-input NAND gates, outputs 0 if all inputs are 1.



* '''NOR''': Same as the OR operation, but the output is inverted. The other universal logic operation.
** For multi-input NOR gates, outputs 0 if at least one input is 1.

to:

* '''NOR''': Same as the OR operation, but the output is inverted. The other universal logic operation.
* Usually written using ↓
** If programming, it would be written as !(X | Y) or similar.
*
For multi-input NOR gates, outputs 0 if at least one input is 1.



'''Three-state Buffer''': Normally, whatever signal comes into this will come out just the same. But there's a second input that when turned on, effectively "cuts off" the signal. This third state, known as the Hi-Z state, is seen by the rest of the system as disconnected.

----
'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can't have a certain input, which is either 00 or 11, depending on the type.

For a typical set-reset latch, using output Q (as opposed to Q-not)

to:

'''Three-state Buffer''': Normally, whatever signal comes into this will come out just the same. But there's A buffer (input = output) with a second input that that, when turned on, effectively "cuts off" enabled, cuts the signal. This third state, signal off in a state known as the Hi-Z state, is seen by the Hi-Z. The rest of the system sees this as disconnected.

----
'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing
"disconnected". As an actual output. This produces example, if you had a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can motor control, 0 could be used to avoid using a NOT gate if the signal's negative is needed. Latches also can't have a certain input, which is either 00 or 11, depending on the type.

For a typical set-reset latch, using output Q (as opposed to Q-not)
reverse, 1 could be forward, and Hi-Z could be off.



||Input || X|| 0|| 1||
||Disable || 1|| 0 || 0 ||
||Output || Hi-Z|| 0|| 1||

'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can't have a certain input, which is either 00 or 11, depending on the type. If one of the inputs is a clock signal, a latch is called a flip-flop instead.

For a typical set-reset latch, using output Q (as opposed to Q-not)
||align=center border=1 width=50%



----
'''Flip-Flop''': A flip flop uses a type of latch that uses a clock signal as one of its inputs. Not only is it used to store information, but it can also be used to divide clock signals in half. There are three types of flip-flops named D, T, and JK. The D flip-flop sets its stored value to whatever its data input happens to be once per clock cycle. T and JK flip-flops are specialized and are not commonly used.
Is there an issue? Send a MessageReason:
some notes about common notation

Added DiffLines:

** Usually written as a leading exclamation mark or tilde.


Added DiffLines:

** Usually written using one or two pipe characters.


Added DiffLines:

** Usually written using one or two [[ExactlyWhatItSaysOnTheTin ampersands]]
Is there an issue? Send a MessageReason:
None

Added DiffLines:

** For multi-input OR gates, outputs 1 if at least one input is 1.


Added DiffLines:

** For multi-input AND gates, outputs 1 if all inputs are 1.


Added DiffLines:

** For multi-input XOR gates, outputs 1 if there are an odd number of 1's.


Added DiffLines:

** For multi-input NAND gates, outputs 0 if all inputs are 1.


Added DiffLines:

** For multi-input NOR gates, outputs 0 if at least one input is 1.


Added DiffLines:

** For multi-input XNOR gates, outputs 1 if there are an even number of 1's.
Is there an issue? Send a MessageReason:
None


'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. Latches also can't have a certain input, which is either 00 or 11, depending on the type.

to:

'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. The other can be used to avoid using a NOT gate if the signal's negative is needed. Latches also can't have a certain input, which is either 00 or 11, depending on the type.
Is there an issue? Send a MessageReason:
None


'''Flip-Flop''': A flip flop uses a type of latch that uses a clock signal as one of its inputs. Not only is it used to store information, but it can also be used to divide clock signals in half. There are three types of flip-flops named D, T, and JK.

to:

'''Flip-Flop''': A flip flop uses a type of latch that uses a clock signal as one of its inputs. Not only is it used to store information, but it can also be used to divide clock signals in half. There are three types of flip-flops named D, T, and JK. The D flip-flop sets its stored value to whatever its data input happens to be once per clock cycle. T and JK flip-flops are specialized and are not commonly used.
Is there an issue? Send a MessageReason:
None

Added DiffLines:

Data in computers (or any digital electronic device) is represented in UsefulNotes/BinaryBitsAndBytes. Basically 0 or 1. But how do computers change data? Without going into too much detail, computers do so by way of binary logic.

Below is a list of all the operations that can be done. All operations but "NOT" take in two inputs and spit out one output.

!The operations

* '''NOT''': Inverts the incoming signal.
||align=center border=1 width=50%
||Input || 0|| 1||
||Output || 1|| 0||

* '''OR''': As long as one input is 1, the output is 1.
** Can be thought of as addition, only you have to believe for a moment that 1 + 1 = 1.
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output || 0|| 1|| 1|| 1||

* '''AND''': Both inputs must be 1 for the output to be 1.
** Can be thought of as multiplication.
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output || 0|| 0|| 0|| 1||

* '''XOR (Exclusive OR)''': Both inputs must be different for the output to be 1.
** Can be thought of subtraction, only the result is the always positive.
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output || 0|| 1|| 1|| 0||

* '''NAND''': Same as the AND operation, but the output is inverted. One of the universal logic operations (you can do any of these operations with NAND gates). Most commonly used in FlashMemory
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output || 1|| 1|| 1|| 0||

* '''NOR''': Same as the OR operation, but the output is inverted. The other universal logic operation.
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output || 1|| 0|| 0|| 0||

* '''XNOR''': Same as the XOR, but the output is inverted.
** Outside of computing, it's often written as "iff", for "if and only if", because one is true ''if and only if'' the other one is too.
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output || 1|| 0|| 0|| 1||

!Supplemental Operations
'''Three-state Buffer''': Normally, whatever signal comes into this will come out just the same. But there's a second input that when turned on, effectively "cuts off" the signal. This third state, known as the Hi-Z state, is seen by the rest of the system as disconnected.

----
'''Latch''': A latch is a fundamental "storage unit", made with a pair of NOR or NAND gates with the outputs feeding one of the other's inputs, as well as providing an actual output. This produces a pair of opposite outputs. Since there are two outputs, usually only one of them is used. Latches also can't have a certain input, which is either 00 or 11, depending on the type.

For a typical set-reset latch, using output Q (as opposed to Q-not)
||align=center border=1 width=50%
||Input || 00|| 01|| 10|| 11||
||Output (Q)|| (no change)|| 0|| 1|| (invalid)||
----
'''Flip-Flop''': A flip flop uses a type of latch that uses a clock signal as one of its inputs. Not only is it used to store information, but it can also be used to divide clock signals in half. There are three types of flip-flops named D, T, and JK.

Top