Saturday, 5 October 2013

Digital Logic Circuits

1.1. Digital Computers

1.1.1. Digital

The term digital means that the possible values are discrete, i.e. they are not infinitely variable. Integers are discrete, while real numbers are not.

1.1.2. Bits

A bit is a binary digit. This means only that it is a discrete information element with exactly two possible states. In digital electronics, these two states are usually the presence or absence of a voltage. Since digital circuits are imperfect, presence and absence generally mean some range such as -0.5v to +1v for absence, and +3.5v to 6v for presence.

1.1.3. Programs

A program is a sequence of instructions that a computer reads and follows in order to carry out some task.

1.1.4. Hardware

Hardware consists of one or more central processing units, or CPUs, electronic memory (RAM and ROM) , and several input-output (I/O) devices.

1.1.5. Computer Organization

Computer Organization is the structure of entire computer system, including CPU, memory, I/O devices, etc. It is concerned with how the components operate and how they are connected. (Graphics card model, bus type, etc.)

1.1.6. Computer Design

Similar to organization. Different designs can be used to meet the same specifications (operational parameters). Sometimes called implementation. (Contradicts terminology of engineering life cycle, where design and implementation are distinct steps.)

1.1.7. Computer Architecture

Hardware specifications concerning operational parameters. Athlon and Core Duo share an architecture, while the implementations are very different. Primary concern of the programmer and end user, who need to know about compatibility. 

1.2. Logic Gates

Know truth table, Boolean algebraic symbol, and circuit symbol.

1.2.1. AND

1.2.2. OR

1.2.3. Inverter (complement, not)

Can be abbreviated as a small circle attached to another gate.

1.2.4. NAND

1.2.5. NOR

1.2.6. XOR

1.3. Boolean Algebra

Three ways to represent Boolean Functions:

1.3.1. Boolean Algebraic Expressions

1.3.2. Truth Tables

1.3.3. Logic Diagrams

Practice conversions from each of the three to the other.

1.3.4. Boolean Expressions Identities

There are an infinite number of Boolean expressions that represent any Boolean function. Identities can be used to modify, and hopefully simplify these expressions, and hence reduce the complexity of the resulting circuit.
See book table 1-1.

1.3.5. DeMorgan's Theorem

Important theorem used in both programming and hardware design.
x1'*x2'*x3'*x4' = (x1 + x2 + x3 + x4)'
x1' + x2' + x3' + x4' = (x1*x2*x3*x4)'
Dual Symbols for NOR and NAND resulting from DeMorgan's theorem.

1.3.6. Complement of a Function

Circuit: Add a not gate at the end.
Truth table: Interchange 0's and 1's under the F column.
Boolean expression: Add a ' around the whole expression. Simplification derived from DeMorgan's theorem.
	F = AB + C'D' + B'D
	F = (AB + C'D' + B'D)' = (A' + B')(C + D)(B + D') 

1.4. Map Simplification

1.4.1. Minterms and Karnaugh Maps

  • Draw map.
  • Box largest possible adjacent squares with 1's.
  • Determine what properties squares within box have in common.

1.4.2. Adjacent Squares

Adjacent squares in a Karnaugh map must differ by exactly one bit in the minterm.

1.4.3. Don't-Care Conditions

If the function can be 0 or 1 for a given minterm, draw an 'x' in the map. The x can be treated as a 0 or 1. 

1.5. Combinational Circuits

A combinational circuit is one whose outputs at a given time depend only on the inputs a short time prior. If a combinational circuit has inputs x, y, and z, and outputs a and b, then:
	a = f(x,y,z)
	b = f(x,y,z)
Time is only a factor because of propagation delays in the circuit. I.e., the output a will not change instantaneously when input x changes, but will change after the new signal x propagates through the gates and wires that connect x to a.

1.5.1. Half-Adder

Example of how logic operations can be used to define arithmetic operations. Digital logic gates perform logic operations, but combinations of those gates are used to do arithmetic on integers and floating point numbers.
Adds two bits (augend and addend) to produce a 1-bit sum and a 1-bit carry.

1.5.2. Full-Adder

Add three bits (augend, addend, and carry from adjacent digit) to produce a sum and carry.

1.6. Flip-Flops

1.6.1. SR

Table 1.1. 

1.6.2. JK

Table 1.2. 

1.6.3. D

1.6.4. JK

1.6.5. Edge-Triggered Flip-Flops

Clock pulses can trigger circuits to act when low, when high, or when in transition (on an edge). Edge-triggering is preferred since a "square" wave spends very little time in transition, which leads to easier synchronization of all the sequential circuits. A circuit triggered by a high or low clock signal might transition twice in the same clock pulse if its response time is less than 1/4 the clock period. Edge-triggered circuits are triggered either on the leading (rising) edge or the trailing (falling) edge.

1.6.6. Excitation Tables

Reverse independent and dependent variables to determine what inputs are needed in order to produce a given output. Often results in don't-care conditions.
Table 1.3. 

1.7. Sequential Circuits

A sequential circuit differs from a combinational circuit in that it's outputs are not strictly functions of its inputs. The outputs of a sequential circuit at a given time depend on the inputs and the outputs at a previous time. Put another way, sequential circuits have state or memory.