Friday, October 28

CHAPTER 2 : DIGITAL LOGIC



LOGIC DESIGN

  • Digital electronics operate with only two voltage levels
         * high voltage and low voltage
  • Computer used binary system (0,1).
  • Combinational logic block contains no memory.
  • Logic block with n inputs, there are 2n entries (possibility) in the truth table.

TRUTH TABLES






BOOLEAN ALGEBRA



  • Boolean algebra laws





GATES

  • Logic blocks are built from gates that implement basic logic functions.
  • Any logical function can be constructed using AND gates, OR gates, and inversion.
  • Two common inverting gates are called NOR and NAND.

DECODER



  • Use decoder to build larger components.
  • The most common type of decoder has an n-bit input and 2n-bit outputs, where only one output is asserted for each input combination.
  • This decoder translates the n-bit input into a signal that corresponds to the binary value of the n-bit input.
  • The outputs are shows a 3-bit decoder and the truth table. This decoder is called a 3-to-8 decoder.
  • Since there are 3 inputs and 8 (2 power of 3) outputs. There is also a logic element called an encoder that performs the inverse function of a decoder, taking n inputs and producing an n-bit output.


MULTIPLEXER (Selector)

  • The output is one of the inputs that is selected by a control.



  • Multiplexers can be created with an arbitrary number of data inputs.
  • If there are only two inputs, the selector is a single signal that selects one of the inputs.
  • If it is true (1) and the other if it is false (0). If there are n data inputs, there will need to be [log2n] selector inputs.


  • To associate the inputs with selector values, we often label the data inputs numerically.

ARITHMETIC LOGIC UNIT (ALU)

  • ALU – perform arithmetic operation (addition, subtraction and logical operation : AND, OR).
  • Constructs an ALU from four hardware building blocks (AND and OR gates, inverters, and multiplexors) and illustrates how combinational logic works.
  • MIPS word is 32 bits wide, so need 32-bit-wide ALU (connect 32 1-bit ALUs ).


1-Bit ALU












This adder is called a full adder; it is also called a (3,2) adder because it has 3 inputs and 2 outputs. An adder with only the a and b inputs is called a (2,2) adder or half-adder.







Specify the outputs of this "black box" based on its inputs, as in truth tables.


5 comments: