------------------------------------------------------------------------------
MC logo
Chapter 3: Boolean Algebra and Digital Logic
[^] CSc 314 Home
------------------------------------------------------------------------------
[Chapter 1: Introduction] [Chapter 2: Data Representation] [Chapter 3: Boolean Algebra and Digital Logic] [Chapter 4: MARIE: A Very Simple Architecture] [386 Assembler Language] [Chapter 5: Real-World Architectures] [Chapter 6: Memory Systems] [Chapter 7: I/O Systems] [Chapter 9: Alternative Architecture] [Chapter 11: Performance Measurement]
For the sake of time, we won't cover appendix 3A, but you might find it interesting reading.

You are not responsible for the material in Sec. 3.6.6.

  1. Boolean.
    1. Boolean operators.
      and:both true none, ⋅, ∧
      or:either true +, ∨
      not:invert overbar, ¬
      nand:not and
      nor:not or
      xor:different
    2. Boolean Expressions.
      1. Truth Tables.
      2. Boolean Algebra Laws.
      3. Boolean Algebra Examples.
    3. Cannonical Forms.
      1. Sum-of-products. The OR of conjuncts of the input variables, or inverted input variables.
      2. Product-of-sums. The AND of disjuncts of the input variables, or inverted input variables.
      3. A systematic way to build an expression from a truth table.
      4. Example.
  2. Digital Circuits.
    1. Gates: Electronic circuits which compute the boolean functions.

        not

        and

        or

        nand

        nor

        xor
      1. Building gates from transistors.
      2. Versions with more than two inputs available.
      3. Manufactured in groups on a chip.
    2. Combine the devices to build more complex circuits.
      1. Larger Combinations
      2. Logisim simulator
    3. Useful Combinational Circuits.
      1. Combinational circuits are also functional: Produce an output which is a function of the current inputs.
      2. Adders
        1. One-bit adder: One column of a binary add.
          1. Inputs: Each data bit and a carry in.
          2. Outputs: The sum bit and the carry out.
        2. Carry propagation adder: Combine for needed bits.
          1. Connect each carry-out to the next carry-in.
          2. Send 0 as carry-in to the rightmost bit.
          3. Two banks of input signals for the arguments, one bank for the result.
          4. Carry-out of the high bit is the carry-out of the addition.
      3. Decoder
        1. A binary number selects which output line to send a signal on.
        2. Demo
        3. Implementation
      4. Multiplexor
        1. A binary input selects which of several input signals to send to the output.
        2. Demo
        3. Implementation
    4. Arithmetic and Logic Unit (ALUs)
      1. An ALU is a circuit which can compute any of several functions as determined by an input function code.
      2. Very important in CPU design.
      3. Some clever ways to do this.
      4. Seven-Function ALU
        1. Combines two four-bit numbers to a four-bit result.
        2. Function Codes
      5. Eleven-function ALU
        1. Combines two eight-bit numbers to an eight-bit result. This is based on an example from Patterson and Hennessy.
        2. Function Codes
      6. Some techniques.
        1. Compute several things and use a multiplexor to select which one to output based on the function code.
        2. The bits of the operation code may be used individually as boolean flags.
        3. Use an and gate to conditionally block a signal.
        4. Use an xor gate to conditionally invert a signal.
        5. Use an adder to subtract by inverting all the B inputs and feeding a 1 to the initial carry-in.
    5. State Devices
      1. State devices have memory: They produce an output which depends on both the current and previous inputs.
      2. Book uses “sequential circuit,” which is descriptive, but does not seem to be very standard.
      3. Clock: Not a state device. Generates a square wave.
      4. Flip-flops. Change state based on clock signal.
        1. Level-triggered.
        2. Edge-triggered, leading or trailing.
        3. We'll usually use leading edge-triggered.
          1. SR (set-reset)
          2. JK (SR with no race condition)
          3. D (stores a bit)
        4. Building them.
          1. Uses feed-back to maintain the state.
          2. Unclocked SR, Level-clocked SR
          3. Level-clocked D
        5. Register. Collection of D flip-flops.
    6. State machines.
      1. Finite State Machine (FSM): A theoretical construct.
        1. Deterministic Finite Automaton (DFA): Changes state on input.
        2. Moore Machine: Output value associated with each state, transitions on input.
        3. Mealy Machine: Transitions on input changes, outputs with transitions.
        4. Algorithmic State Machine (ASM): Sort of a flowchart.
      2. A real digital machine with state devices and a clock. The state changes when the clock ticks.
      3. An FSM may be used to model the behavior of a real machine.
      4. Counter.
        1. The increment unit is build with half-adders.
        2. The collection of D-flip-flops constitutes a register.

Questions

I'm suggesting chapter questions from both 3rd and 4th editions. In most cases, the questions are of the same type, but not identical. Most of them have been changed in the 4th.

Chapter questions:

4th ed: 1, 14, 15, 18, 22, 24, 32, 35, 42, 44, 50.
3rd ed: 1, 11, 12, 20, 22, 28, 31, 38, 40, 44, 50.
Use logisim to solve the circuit problems. For question 40 (3rd) or 44 (4th), the point is to detect a pattern higher than 9.

Question 44 from 3rd is to draw a full adder using only NAND gates, which doesn't appear in 4th.

For chapter questions 36 and 37 (4th), or 32 and 33 (3rd), find the boolean expression for the function computed, then simplify it if possible.

Try using the table in question 22 (4th) or 20 (3rd) to write a product-of-sums expression.

Use logisim to create a sequential circuit with four LEDs producing the following pattern:


You will need some flip-flops to hold the displayed bit values, and some logic to get them to change correctly when the clock strikes.
<<Chapter 2: Data Representation Chapter 4: MARIE: A Very Simple Architecture>>