Signals, logic oprators and gates

  • Not gate $x^{\prime} = 1-x$

  • And gate $xy$

  • Or gate $x \cap y = x +y -x$

  • Xor gate $x+y-2xy$

  • NAND = NOT AND

  • NOR = NOT OR

  • XNOR = NOT XOR

Gates as control elements

  • AND Gate for controlled transer(output x or 0 depending on enable/pass signal)
  • Tristate buffer(output x or NULL(high impedacne) depending on enable/pass signal)

Boolean functions and esxpresion

how to calc the bit fnctions?

  • truth table
  • logic expressions to validate equivalent expresion
  • word statement (in spoken words) -> must be translated into boolean statements
  • logic circuit diagram (logic gate)
  • case analysis: consider all possible inputs

useful combinations of gates (prefab)

  • multiplexers (selectors)

    • n to 1 mux (n -> 1): we select one of several inputs (with or without additional enable switch)
    • with 4 inputs, we need 2 switches (since $2^2 == 4$)
      • to implement this with 2-1 mux, we need 3 muxes
  • decoders/demultiplexers

    • select one of $2^A$ options using a-bit address as input
    • 2-4 decoder: select one of the combinations $2^2$ to $4$ switches. (only one of them is selected, elses are 0)
  • encoders

    • 4-2 encoder: inverse of 2-4 decoder

arithmetic logic unit (ALU)

  • 1 bit ALU for addition

    • input = (a, b, carry_in)
    • output = (carry_out, sum)
    • carry_out = a* b + a * carry_in + b * carry_in
    • sum = a xor b xor carry_in
  • 1 bit ALU for subtraction

    • a - b = a + (-b)
    • add inverter (mux) + plus one from carry in
  • 1 bit ALU for NOR function

    • $a+b = a^{\prime}b^{\prime}$