What's We Did So Far

Download as ppt
Download as ppt
You are on page 1of 9

Computer Programming TA C162

What’s we did so far …


• Adder: Adding Two n-bit numbers including carry bit

• Decoder: Enables one output from 2n at a time, for a particular


combination of n input bits
 Example: Letters are encoded as 8 bit codes inside the computer.
– When the particular combination of bits that encodes “A” is detected, we
want to activate the output line corresponding to A

• Multiplexer: A multiplexer is a combinatorial circuit that is given a


certain number (usually a power of two) data inputs, let us say 2n, and
n address inputs used as a binary number to select one of the data
inputs.
• The multiplexer has a single output, which has the same value as the
selected data input.

• Demorgan’s Law: AND logic to OR logic conversion and vice versa


1
Computer Programming TA C162

4 x 1 MUX Circuit Diagram

4-to-1 MUX

2
Computer Programming TA C162

R-S Latch: Simple Storage Element


•R is used to “reset” or “clear” the element
• Set it to zero
•S is used to “set” the element –
• Set it to one

•If both R and S are one, output could be


either zero or one
• “quiescent” state -- Holds its previous value
• Note: if a is 1, b is 0, and vice versa
3
Computer Programming TA C162

Clearing the R-S latch


Suppose we start with output = 1, then change R to zero.
1
0 1
1

1 0
0
1 Output changes to zero.
1
1 0
1

0 1
0
0
Then set R=1 to “store” value in quiescent state.

4
Computer Programming TA C162

Setting the R-S Latch


Suppose we start with output = 0, then change S to zero
1
1 0

0 1

1 Output changes to one.


0
0 1

1 0

1
Then set S=1 to “store” value in quiescent state.
5
Computer Programming TA C162

Quiescent state
Holds previous value

1 1
0 1 0
1

1 0 1
0
1 1

6
Computer Programming TA C162

R-S Latch Summary


R=S=1
• Holds previous value in latch
S = 0, R=1
• Set value to 1
R = 0, S = 1(Set)
• Set value to 0 (Reset)

R=S=0
• Both outputs equal one
• Final state determined by electrical properties of gates
• Don’t do it!

7
Computer Programming TA C162

Gated D-Latch
Two inputs: D (data) and WE (write enable)
• when WE = 1, latch is set to value of D
S = NOT(D), R = D
• when WE = 0, latch holds previous value
S = R = 1

8
Computer Programming TA C162

Register
A register stores a multi-bit value.
• We use a collection of D-latches, all controlled by a
common WE.
• When WE = 1, n-bit value D is written to register.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy