CSE241 Digital Systems
Date | Topic | Chapter | Classnotes |
---|---|---|---|
1/30 | Course Goals and Plans | Course description | C1 |
2/1 | Number System | Chapter 1 | C2 |
2/3 | Signed Arithmetic | Chapter 1 | C3 |
2/6 | Boolean Algebra | Chapter 2 | C4 |
2/8,2/10 | Boolean Algebraic Simplification | Chapter 2 | C5 |
2/13 | Logic gates and IC chips | Chapter 2 | C5 |
2/15 | Karnuagh Map | Chapter 2 | C6 |
2/17 | Lab 1 Complete demo | Lab 1 | C7 |
2/20 | K-map simplification | Chapter 3 | C8 |
2/22 | Problem Solving using Logic Gates | Chapter 3 | C8 |
2/24 | Seven segment LED Display | Chapter 3 | C9 |
2/27 | Analysis of Combinational Circuits | Chapter 4 | C10 |
3/1 | MSI: Full Adder | Chapter 4 | C11 |
3/3 | MSI: Decoder | Chapter 4 | C12 |
3/3 | MSI: Multiplxer | Chapter 4 | C13 |
3/8,10 | Midterm Exam Review | Chapter 1-4 | |
3/13 | Midterm Exam | Chapter 1-4 | |
3/17 | Floating Point Representation | Classnotes | C14 |
3/29 | Introduction to Sequential Circuit | Chapter 5 | C15 |
3/31 | Sequential Circuit Analysis | Chapter 5 | C16 |
4/3 | Sequential Circuit Synthesis | Chapter 5 | C17 |
4/5 | Data-intensive Computing Certificate Program | Review Analysis of SeqCkt | C18 |
4/10,12 | Hardwre Description Language | Chapter 3 | C17 |
4/17 | Verilog: Sequential Circuit Description | Chapter 5 | C18 |
4/19,21 | Field programmable Logic Array | Chapter 7 | C19 |
4/24 | FPGA Programming | Lab 4 | |
5/1 | Final Exam Review | C20 | |
5/3 | Floating point | C21 | |
5/6 | What's my grade standing in class? | My Grade so far |
Consider playing cards, set of coins: how do understand these systems?
We think in decimal, computers number crunch in binary
How do you define a number system?
Radix of a number system?
Number conversion
Decimal to binary, binary to decimal
Numbers with fractions
ASCII 7-bit code for information representation
Notes
ASCII 7-bit code for representation of characters.. standard code
BCD for binary form of decimal
Representing numbers for efficient computation: 1's complement and 2's complement
In general, lot of research effort on "coding" information for efficient and reliable processing: excess-3 code, Gray code
Binary arithmetic: sign-magnitude vs. 2's complement
Signed Binary Arithmetic Consider numbers A = 53 and B= 76. Assume positive numbers are represented using sign-magnitude and negative numbers as 2's complement. Perform the operations below in binary. Assume 8-bit container. Specify if the result is positive, negative or overflow and explain your answer.
- X = A + B
- Y = A - B
- Z = -A -B
- W = -A + B
Notes
Boolean algebra is like any other math system: Set of elements, set of operators, and a number of axioms and postulates.
Basic operations {AND, OR, NOT} {.,+,'}
Algebraic simplification: goal is to minimize the Boolean function to minimum number of literals and minimum number of terms. We will use only sum of products form.
Lets review what we did last class.
What is simplification of a Boolean expression? Goal of simplification is to minimize the number of literals and also the number of terms in an
expression. We will look at algebraic simplification by applying the laws and theorems.
We will implement the Boolean expressions uisng logic gates. {AND, OR, NOT} combiation and also using only NAND gate. We will also implelemt the circuits using common IC chips.
Logic gates are used to implement Boolean functions. For the gates, study it through the name of the gate, logic operator, graphic symbol, truth table and expression representing the operation of a gate.
We will discuss implementation of Boolean functions. Here are the steps in the design and implementation of a Boolean function.
Problem Statement: Design a combinational logic circuit to generate odd parity for the BCD code; a logic circuit that will generate the odd parity bit for any 4-bit combination of the BCD code. Implement it using (i) {AND, OR, NOT} and (iii) using only NAND gates.
Lets review what we did last class: we worked on solving a simple problem. We are yet to complete an efficient gate design for the problem. We need some more information about logic gates. Lets do that today.
We are in Chapter 2.
We will explore K-maps for 2-3-4-variable functions.
We will demo how to work on Lab1.
We will fully explore K-map simplification. We will also revisit out BCD to odd parity generator.
1. We will revisit: BCD to odd parity generator. 2. We will also solve the Decimal to 7-segment LED Display circuit
We will also solve the Decimal to 7-segment LED Display circuit.
So far we synthesized or designed and constructed circuits. Today we will learn how deconstruct and analyze a combinational circuit. See figure 4.2, p.128. We also designed a half-adder.
We designed a full-adder. Sum(A,B,Cin) and Cout(A,B,Cin). Also on use of DeMorgan's law.
We will study MSI circuits for an nX2^n decoder and 2^nX1 MUX. For each of these circuits we will study:
We will study sequential circuits using
// Sequential Circuit Example 5_20 : the instantiation is inside
// the test bench
// item 1
module counter2 (output y, input x, input clock,input reset);
// item 2
reg[1:0] state; // 2 bits
// item 3
parameter S0=2'b00, S1 = 2'b01, S2=2'b10, S3=2'b11;
//item 4 when and how do the state transitions happen?
always@ (posedge clock, negedge reset)// event driven
if (reset == 0) state <= S0;
else case (state)
S0 : if(x==1) state <= S1; else state<= S0;
S1 : if(x==1) state <= S2; else state<= S1;
S2 : if(x == 1) state <= S3; else state<= S2;
S3 : if(x == 1) state <= S0; else state<= S3;
endcase // case(state)
// item 5 : output
assign y = (state==S3);
endmodule // counter2
module counter2_tb;
// stand alone
// item 1 definitions
reg x, clk, rst;
wire y;
// item 2 instantiate counter2
counter2 C1(y, x, clk,rst);
// item 3
initial #200 $finish; // duration of your simulation testing
// item 4
initial begin
rst = 0;
clk = 0;
#5 rst = 1;
repeat (16)
#5 clk = ~clk;
end
// item 5 for x
initial begin
x = 1'b0;
repeat(8)
#10 x = ~x;
end
// item 6 for montioring, output text and waveform
initial begin
$monitor("x= %d y= %d",x,y);
$dumpfile("example1.vcd");
$dumpvars;
end
endmodule
Actual verilog code can be found at example1.v
iverilog -o example1.vvp example1.v
vvp example1.vvp
gtkwave example1.vcd