Chapter 3: Boolean Algebra and Digital Logic

[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.

- Boolean.
- Boolean operators.
**and**:both true none, ⋅, ∧ **or**:either true +, ∨ **not**:invert overbar, ¬ **nand**:not and **nor**:not or **xor**:different ⊕ - Boolean Expressions.
- Truth Tables.
- Boolean Algebra Laws.
- Boolean Algebra Examples.

- Cannonical Forms.
- Sum-of-products. The OR of conjuncts of the input variables, or inverted input variables.
- Product-of-sums. The AND of disjuncts of the input variables, or inverted input variables.
- A systematic way to build an expression from a truth table.
- Example.

- Boolean operators.
- Digital Circuits.
- Gates: Electronic circuits which compute the boolean functions.
- Building gates from transistors.
- Versions with more than two inputs available.
- Manufactured in groups on a chip.

**not****and****or****nand****nor****xor** - Combine the devices to build more complex circuits.
- Useful Combinational Circuits.
- Combinational circuits are also functional: Produce an output which is a function of the current inputs.
- Adders
- One-bit adder: One column of a binary add.
- Inputs: Each data bit and a carry in.
- Outputs: The sum bit and the carry out.

- Carry propagation adder: Combine for needed bits.
- Connect each carry-out to the next carry-in.
- Send 0 as carry-in to the rightmost bit.
- Two banks of input signals for the arguments, one bank for the result.
- Carry-out of the high bit is the carry-out of the addition.

- One-bit adder: One column of a binary add.
- Decoder
- A binary number selects which output line to send a signal on.
- Demo
- Implementation

- Multiplexor
- A binary input selects which of several input signals to send to the output.
- Demo
- Implementation

- Arithmetic and Logic Unit (ALUs)
- An ALU is a circuit which can compute any of several functions as determined by an input function code.
- Very important in CPU design.
- Some clever ways to do this.
- Seven-Function ALU
- Combines two four-bit numbers to a four-bit result.
- Function Codes

- Eleven-function ALU
- Combines two eight-bit numbers to an eight-bit result. This is based on an example from Patterson and Hennessy.
- Function Codes

- Some techniques.
- Compute several things and use a multiplexor to select which one to output based on the function code.
- The bits of the operation code may be used individually as boolean flags.
- Use an and gate to conditionally block a signal.
- Use an xor gate to conditionally invert a signal.
- Use an adder to subtract by inverting all the B inputs and feeding a 1 to the initial carry-in.

- State Devices
- State devices have memory: They produce an output which depends on both the current and previous inputs.
- Book uses “sequential circuit,” which is descriptive, but does not seem to be very standard.
- Clock: Not a state device. Generates a square wave.

- Flip-flops. Change state based on clock signal.

- Level-triggered.
- Edge-triggered, leading or trailing.
- We'll usually use leading edge-triggered.
- Building them.
- Uses feed-back to maintain the state.
- Unclocked SR, Level-clocked SR
- Level-clocked D

- Register. Collection of D flip-flops.

- State machines.
- Finite State Machine (FSM): A theoretical construct.
- Deterministic Finite Automaton (DFA): Changes state on input.
- Moore Machine: Output value associated with each state, transitions on input.
- Mealy Machine: Transitions on input changes, outputs with transitions.
- Algorithmic State Machine (ASM): Sort of a flowchart.

- A real digital machine with state devices and a clock. The state changes when the clock ticks.
- An FSM may be used to model the behavior of a real machine.
- Counter.
- The increment unit is build with half-adders.
- The collection of D-flip-flops constitutes a register.

- Finite State Machine (FSM): A theoretical construct.

- Gates: Electronic circuits which compute the boolean functions.

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 |