Binary Logic


  • Main
  • Wikipedia
  • All Subpages
  • Create New
    /wiki/Binary Logicwork

    Data in computers (or any digital electronic device) is represented in Binary Bits and Bytes. 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.
    Input01
    Output10
    • 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.
    Input00011011
    Output0111
    • AND: Both inputs must be 1 for the output to be 1.
      • Can be thought of as multiplication.
    Input00011011
    Output0001
    • 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.
    Input00011011
    Output0110
    • 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 Flash Memory
    Input00011011
    Output1110
    • NOR: Same as the OR operation, but the output is inverted. The other universal logic operation.
    Input00011011
    Output1000
    • 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.
    Input00011011
    Output1001

    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)

    Input00011011
    Output (Q)(no change)01(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.

      This article is issued from Allthetropes. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.