# set3 - TA C162 Computer Programming I Agenda What we did so...

This preview shows pages 1–10. Sign up to view the full content.

1 TA C162 Computer Programming I Virendra S Set3 Agenda square4 What we did so far? square4 Logic Structures without storage square4 e.g. Adder, Decoder, Mux, comparator etc. •What’s next? square4 Logic structures with storage of information square4 Basic storage structure square4 R-S latch square4 Gated D-latch square4 Register

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 TA C162 Computer Programming I Virendra S Set3 Combinational Circuit Design- Summary Problem Statement barb2right Truth Table barb2right Boolean Expression barb2right Circuit Diagram square4 Adder: Adding Two n-bit numbers including carry bit square4 Arithmetic Operations on bits square4 Decoder: Enables one output from 2 n at a time, for a particular combination of n input bits square4 Example: Letters are encoded as 8 bit codes inside the computer. square4 When the particular combination of bits that encodes “A” is detected, we want to activate the output line corresponding to A square4 Multiplexer: A multiplexer is a combinatorial circuit that is given a certain number (usually a power of two) data inputs, let us say 2 n , and n address inputs used as a binary number to select one of the data inputs. square4 The multiplexer has a single output, which has the same value as the selected data input. square4 Demorgan’s Law: AND logic to OR logic conversion and vice versa
3 TA C162 Computer Programming I Virendra S Set3 Simple Storage Element Called R-S Latch square4 S is used to “set” the element – square4 Set it to one square4 R is used to “reset” or “clear” the element square4 Set it to zero square4 If both R and S are one, output could be either zero or one square4 Quiescent” state -- Holds its previous value

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 TA C162 Computer Programming I Virendra S Set3 Clearing the R-S latch Suppose we start with output = 1, then change R to zero. Output changes to zero. Then set R=1 to “store” value in quiescent state. 1 1 1 1 0 0 1 0 0 0 1 1
5 TA C162 Computer Programming I Virendra S Set3 Setting the R-S Latch Suppose we start with output = 0, then change S to zero Output changes to one. Then set S=1 to “store” value in quiescent state. 1 1 0 0 1 1 0 1 1 1 0 0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 TA C162 Computer Programming I Virendra S Set3 Quiescent state Holds previous value 1 1 0 0 1 1 1 1 1 1 0 0
7 TA C162 Computer Programming I Virendra S Set3 R-S Latch Summary R = S = 1 square4 Holds previous value in latch S = 0, R=1 square4 Set value to 1 ( Set ) R = 0, S = 1 square4 Set value to 0 (Reset) R = S = 0 square4 Both outputs equal one square4 Final state determined by electrical properties of gates square4 Don’t do it!

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 TA C162 Computer Programming I Virendra S Set3 Gated D-Latch Two inputs: D (data) and WE (write enable) square4 when WE = 1 , latch is set to value of D square4 S = NOT(D), R = D square4 when WE = 0 , latch holds previous value square4 S = R = 1
9 TA C162 Computer Programming I Virendra S Set3 Register A register stores a multi-bit value.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern