Digital Logic Design
College9 units and 36 lessons. Helio talks each one through and draws each step on a board.
Units
Number systems and codes
5 lessons- Binary, octal and hexadecimalFind the decimal value of a number written in base 2, 8 or 16 from its place values, and count in binary and hexadecimal.
- Converting between basesConvert a decimal number, fraction part included, to binary by repeated division and multiplication, and convert between binary, octal and hexadecimal by grouping bits.
- Binary addition and subtractionAdd and subtract unsigned binary numbers column by column with carries and borrows, add hexadecimal numbers, and tell when an n-bit result does not fit.
- Signed numbers and two's complementRead and write signed integers in n-bit two's complement, and subtract by adding the two's complement while detecting overflow.
- Binary codesEncode a number or character in BCD, Gray code and ASCII, add BCD digits with the +6 correction, and add a parity bit that detects a single-bit error.
Boolean algebra and logic gates
5 lessons- Logic gates and truth tablesBuild a gate circuit from an expression and find its output for every input.
- Boolean algebraProve a Boolean identity by truth table or by the postulates, and simplify an expression algebraically with absorption, the distributive laws and the consensus theorem.
- DeMorgan's theoremsUse DeMorgan's theorems to complement any expression and to read a circuit of NAND or NOR gates as a sum or product.
- Minterms, maxterms and canonical formsWrite a truth table as a sum of minterms Σm or a product of maxterms ΠM, and convert between them.
- NAND and NOR implementationsConvert a two-level sum of products to NAND-NAND and a product of sums to NOR-NOR, and count the gates.
Gate-level minimization
4 lessons- Karnaugh mapsMinimize a function of three or four variables by grouping the 1s of its Karnaugh map into the largest possible rectangles of 1, 2, 4 or 8 cells.
- Prime and essential prime implicantsList a function's prime implicants from its K-map, pick out the essential ones, and complete a minimal cover.
- Don't-cares and product-of-sums minimizationUse don't-care cells to enlarge K-map groups, and minimize a function as a product of sums by grouping its 0s.
- Exclusive-OR functionsUse XOR chains to count 1s mod 2, and to generate and check parity bits.
Combinational logic design
5 lessons- The combinational design procedureTurn a word statement into a truth table, simplified equations and a gate circuit, using don't-cares for inputs that never occur, on a majority voter and a BCD to excess-3 converter.
- Half adders, full adders and ripple-carry addersBuild the half adder and the full adder from gates, chain four full adders into a 4-bit ripple-carry adder, and find how long its carry takes to settle.
- Adder-subtractors and overflowMake one 4-bit adder add or subtract with XOR gates on B and a mode input M that is also the carry-in, and detect two's complement overflow as C₃ ⊕ C₄.
- Carry lookahead and magnitude comparatorsWrite every carry of a 4-bit adder directly from the generate and propagate signals, count its delay against the ripple adder, and build a 4-bit magnitude comparator from XNOR equality terms.
- Propagation delay and hazardsFind the critical path of a gate circuit from its propagation delays, show how unequal delays make a static-1 hazard in a timing diagram and on a K-map, and remove it with the consensus term.
Combinational building blocks
4 lessons- DecodersUse an n-to-2ⁿ decoder with enable as a minterm generator: build a larger decoder from smaller ones and implement a function as an OR of its outputs.
- Encoders and priority encodersWrite the equations of a 2ⁿ-to-n encoder, see why it fails when two inputs are 1, and build the 4-to-2 priority encoder with a valid output from its truth table with don't-cares.
- MultiplexersThe 2-to-1, 4-to-1 and 8-to-1 multiplexer, building a larger mux from smaller ones, and implementing a function of n variables with a 2ⁿ⁻¹-to-1 mux.
- ROMs and programmable logic arraysProgram a truth table into a ROM, a decoder with an OR array, and into a PLA with shared product terms, and count the size of each.
Latches and flip-flops
3 lessons- SR and D latchesTrace the cross-coupled NOR SR latch, the gated SR latch and the gated D latch through their tables and a timing diagram, and say which input combination is forbidden and why the D latch avoids it.
- Edge-triggered flip-flopsExplain how a master-slave D flip-flop changes only at the clock edge, and use the characteristic tables and equations of the D, JK and T flip-flops and the asynchronous preset and clear to trace a flip-flop through its clock edges.
- Flip-flop timingDefine setup time, hold time and clock-to-Q delay, find the maximum clock frequency of a register-to-register path from Tclk ≥ tcq + tpd + tsu, and say what a setup or a hold violation does.
Synchronous sequential circuits
4 lessons- Analysis of clocked sequential circuitsTurn a circuit of flip-flops and gates into its state table and state diagram, and trace an input sequence through it.
- Moore and Mealy machinesTell a Moore machine, whose output depends on the state alone, from a Mealy machine, whose output depends on the state and the input, draw both for one task, and explain the one-clock difference in their outputs.
- Designing a state machineDesign the 1011 sequence detector as a Moore machine, from the words to the circuit.
- State reduction and state assignmentMerge equivalent states of a state table, then compare binary, Gray and one-hot state assignments by flip-flops and gate literals.
Registers and counters
4 lessons- Registers and shift registersBuild a 4-bit register with parallel load from D flip-flops and multiplexers, trace data through serial and universal shift registers, and add two numbers serially.
- Ripple countersA 4-bit binary ripple counter from T flip-flops, its count sequence and ripple delay, and a BCD ripple counter.
- Synchronous countersBuild synchronous up and up-down counters from T flip-flops, find their speed gain over a ripple counter, and cut a counter to mod 10 with its load.
- Designing countersDesign a counter for a chosen sequence with JK or D flip-flops using excitation tables, and make sure its unused states lead back into the sequence.
Hardware description
2 lessons- Describing combinational logic in an HDLWrite a combinational Verilog module with ports, continuous assignments and an always block with a case statement, and say what gates each line becomes.
- Describing flip-flops and state machines in an HDLDescribe registers, counters and a state machine in Verilog with clocked always blocks and nonblocking assignment, and trace them clock by clock.






