75
Review of Digital Design Fundamentals

Computer Rchitecture

Embed Size (px)

Citation preview

Page 1: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 1/75

Review of Digital Design

Fundamentals

Page 2: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 2/75

 

Bit: A binary digit ; can have a value of 0 or 1

Logic gate: A digital circuit that manipulates bits. A logic gatetakes one or more bits as input(s) and generates one bit as theoutput.

A logic gate can be represented pictorially by its logic symbol.

The function performed by a logic gate can also be expressedalgebraically, or in terms of a Truth Table.

Logic diagram: A diagram showing an interconnection of logicsymbols.

Page 3: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 3/75

Truth table Truth table: The truth table gives the input-output

relation of a logic gate or logic circuit in tabularform.

It specifies the output bit(s) for each possible input bit combination.

A circuit with n  binary inputs has 2n different inputcombinations.

A binary value of 0 is sometimes referred to as L(low) or F (false).

A binary value of 1 is sometimes referred to as H(high) or T (true).

Page 4: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 4/75

Minterm

Minterm:  One specific combination of input

 bits, out of the 2n  different input

combinations. A truth table of n  binary inputs has 2n 

minterms and an output is specified for each

minterm.

Page 5: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 5/75

Logic GatesLogic Symbols:

1

0

0

1

outA

11 1

01 0

00 1

00 0 OutA B

Page 6: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 6/75

Logic Gates

11 1

11 0 10 1

00 0

OutA B

01 1

11 0

10 1

00 0 OutA B

Page 7: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 7/75

Logic Gates

01 111 0

10 1

10 0OutA B

01 1

01 0

00 1

10 0 OutA B

Page 8: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 8/75

Logic Gates

111

001

010

100

OutBA

Page 9: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 9/75

Digital Circuit Representation The truth table, logic diagram and algebraic expression are

three different ways of representing a digital circuit and givenone form the other representations of the circuit can bederived.

The truth table representation of a Boolean function is unique, but the same function may have more than one logic oralgebraic representation.

EXAMPLE: Given the following logic diagram, obtain thecorresponding truth table and algebraic expression.

Page 10: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 10/75

Digital Circuit Representation

01 1 1

01 1 0

11 0 101 0 0

00 1 1

00 1 0

10 0 1

10 0 0

OutA B C

Page 11: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 11/75

Basic Identities of Boolean algebra

Page 12: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 12/75

K-Map

The complexity of a digital circuit depends on

the complexity of the corresponding algebraic

expression. The karnaugh map (k-map) provides a simple

straightforward procedure for simplifying

Boolean expressions and thereby obtainingsimpler digital circuits.

Page 13: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 13/75

K-Map

A diagram made up of squares, where each

square represents a minterm.

The output (0 or 1) for a specific minterm isinserted in the corresponding square in the k-

map.

A function with n variables has a kmap with2n squares.

Page 14: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 14/75

Properties of k-maps

Each row (or column) in the k-map is labelled

 by one or more bits, representing the values of

the corresponding variables for that row (orcolumn).

The minterm corresponding to a particular

square in the k-map (belonging to the ith

 column and jth row) is obtained by taking the

values of the variables associated with the ith 

column and jth row.

Page 15: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 15/75

 00 01 11 10

0

1

 AB

C00 01 11 10

00

01

11

10

 ABCD

For example the shaded squares in figure 1 (a) and (b) correspond to minterms

111 and 0110 respectively.

Page 16: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 16/75

Rules for simplifying k-maps

1. Plot a Boolean function on to a k-map by inserting

1’s in those squares where the corresponding

minterm has an output of 1.

2. Combine adjacent 1’s into groups such that: 

i) a group contains only 1’s 

ii) the number of squares in a group is a power of 2

iii) the group is not part of a single larger group

Page 17: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 17/75

Rules for simplifying k-maps

3.Keep choosing additional groups until all the

1’s in the k -map are covered i.e. each 1 is part

of at least one group. Choose the groups insuch a way that the total number of groups

needed to cover all the 1’s is minimized. 

4.Obtain an algebraic product term for eachgroup.

5.Obtain the final solution by a logical OR of all

the terms from step 4.

Page 18: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 18/75

Some definitions:

Implicant: A group of 2k  adjacent 1’s in a k -

map.

Prime Implicant (PI): An implicant which isnot completely covered by a single larger

implicant.

Essential Prime Implicant: A prime implicantwhere at least one minterm is not covered by

any other prime implicant.

Page 19: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 19/75

Examples

A B C F

0 0 0 1

0 0 1 1

0 1 0 1

0 1 1 0

1 0 0 0

1 0 1 1

1 1 0 0

1 1 1 0

10

00

01

11

00 01 11 10

01

 AB

C

 A`B`F=A`C`+B`C

Essential PI Non-Essential PI

Page 20: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 20/75

Example

A B C D F

0 0 0 0 0

0 0 0 1 0

0 0 1 0 1

0 0 1 1 0

0 1 0 0 1

0 1 0 1 0

0 1 1 0 1

0 1 1 1 0

1 0 0 0 1

1 0 0 1 1

1 0 1 0 1

1 0 1 1 1

1 1 0 0 1

1 1 0 1 1

1 1 1 0 0

1 1 1 1 1

1

1

1

1

0

1

1

1

1

0

0

1

0

0

0

00 01 11 10

00

01

11

10

 AB

CD

F=AD+AB`+BC`D`+A`CD`

OR F=AD+ AC`+ A`BD`+B`CD`

 Non-Essential PI Essential PI

1

Page 21: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 21/75

 

Don’t Cares 

A truth table can be expressed in compact form by simply

specifying the minterms for which the output is 1.

 For some functions, there may be certain input conditions for

which we don’t care what output is. This situation isrepresented by putting a “d” in the output for the

corresponding minterms.

Don’t care outputs may be treated as either a 0 or a 1, in order

to obtain a minimized circuit.  All minterms which are not in the given list(s) are assumed

to have an output of 0.

Page 22: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 22/75

 

Function with Don’t cares 

a) F has three inputs A,B, and C.

 b) The outputs corresponding to minterms 0,2,6are 1.

c) The outputs corresponding to minters 1,3,5 are

don’t cares 

d) The outputs for all remaining minterms (4 and 7)

are 0.

Page 23: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 23/75

Examples:

Obtain a minimized SOP expression for the

following functions. Also, list all the prime

implicants and indicate which ones areessential.

Page 24: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 24/75

 

1 1 1 0

d d 0 d

F

00 01 11 10 AB

C01

F= A’+BC’ 

Prime Implicants

 A’(essential) 

BC’(essential) 

Page 25: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 25/75

00 01 11 10

00

01

11

10

CD

 AB

Prime Implicants

BC’D’(Essential) 

 A’B’C(Essential) 

B’D 

 A’BC’ 

 A’C’D 

F = B’D + BC’D’ + A’B’C 

0001d00d

d0d1

0110

Page 26: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 26/75

Product of sums (POS)

A POS expression for a function F can be

obtained by grouping the 0,s in the k-map for

F and then(i) Obtain a SOP expression for F’ and

complement it OR

(ii) Directly obtain the POS expression byexamining the selected groups.

Page 27: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 27/75

1 1 0 1

d 1 0 1

0 d 0 0

1 1 0 1

00 01 11 10

00

01

11

10

CD

 AB

Prime Implicants of F’ 

 AB (Essential)

CD(Essential)

 A’B’D 

F’=AB+CD 

F’’=(AB+CD)’ 

F=(AB)’.(CD)’ 

F=(A’+B’).(C’+D’) 

Final POS expression

The same final expression can also be obtained by directly examining the groups.

Page 28: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 28/75

1 0 1 1

1 0 1 1

0 0 1 0

1 0 1 1

00 01 11 10

00

01

11

10

CD

 AB

Prime Implicants of F’ 

 A’B (Essential) 

B’CD(Essential) 

 A’CD 

F’=A’B+B’CD 

F’’=(A’B+B’CD)’ 

F=(A’B)’.(B’CD)’ 

F=(A+B’).(B+C’+D’) 

Final POS expression

The same final expression can also be obtained by directly examining the groups.

Page 29: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 29/75

Multi-output functions

A multi-output function is treated similar to a

single output function,

A separate k-map and Boolean expressionneeds to be derived for each of the outputs.

Example: full adder (FA) circuit which has 3

inputs - the 2 bits (A and B) to be added and acarry in (Cin) and has 2 outputs a sum (S) and

a carry out to the next stage (Cout).

Page 30: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 30/75

 

Full Adder

A B Cin Cout S

0 0 0

0 0 10 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

0 0

0 10 1

1 0

0 1

1 0

1 0

1 1

0 1 0 1

1 0 1 0

00 01 11 10

0

1

 AB

C

S

0 0 1 0

0 1 1 1

00 01 11 10

0

1

 AB

C

Cout

S=A’B’C + A’BC’+AB’C’+ABC 

S= A B C

Cout=AB+BC+AC

Page 31: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 31/75

Decoder

Converts binary information from n inputs to

upto 2n outputs.

If some input combinations are unused, thenumber of outputs may be less.

For each input combination, only one output

is active  and all other outputs are inactive .

Page 32: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 32/75

A decoder may also have an enable input (E), as shown below.

Examples: Design a 2-4 decoder (without enable input).

Page 33: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 33/75

a) Truth Table

A1 A0 D0 D1 D2 D3

0 0 1 0 0 0

0 1 0 1 0 01 0 0 0 1 0

1 1 0 0 0 1

Page 34: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 34/75

 b) K-maps

1 0

0 0

0 0

1 0

0 1

0 0 0 00 1

D0 D1

D2D3

0 1 0 1

0 10 1

0

1

0

1

0

1 01

A1

A0A0

A0 A0

A1

A1

A1

D0=A1’A0’ 

D2=A1A0’ 

D1=A1’A0 

D3=A1A0

Page 35: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 35/75

Page 36: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 36/75

Multiplexer

A combinational circuit which takes information from one of

2n input lines and transfers it to a single output line.

The particular input line chosen is determined by n select

lines. 

Page 37: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 37/75

Example

S I1 I0 F

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

1 0 0 0

1 0 1 0

1 1 0 1

1 1 1 1

Design a 2-to-1 multiplexer with two input lines and one select line

Truth table

Page 38: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 38/75

k-maps

0 0 1 0

1 1 1 0

0 0 01 1 1 10

0

1

f

I0

S,I1

f = SI1 + S’I0 

Page 39: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 39/75

Multiplexer Expansion

Smaller multiplexers can be combined to form a larger one.

Example: Construct a 4-to-1 multiplexer using 2-to-1 multiplexers.

Page 40: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 40/75

Encoders

An encoder performs the inverse operation of

a decoder.

It has (up to) 2n

 inputs and n outputs. Each input line is mapped to a specific 

combination of output lines.

Only one input line can be high at any giventime.

Page 41: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 41/75

Example:

I3 I2 I1 I0 A0 A10 0 0 1 0 0

0 0 1 0 0 1

0 1 0 0 1 0

1 0 0 0 1 1

A 4-to-2 encoder

Page 42: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 42/75

Flipflops and Sequential Circuits

Combinational circuits: Digital circuits

where the output depends only on the current

inputs. They consist of a interconnection oflogic gates.

Sequential circuits: Output depends on the previous output state as well as the current

inputs.

Page 43: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 43/75

Flipflops and Sequential Circuits

Flipflops: Basic storage element, capable of

storing previous state (0 or 1). A flipflop can

store 1 bit of information and is the basic building block of sequential circuits.

Page 44: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 44/75

Flipflops and Sequential Circuits

Edge-triggered flipflop: State changes occur only during a positive (0 to1) or negative (1 to 0) clock transition. Thecorresponding flipflops are called positive or negative edge-triggered flipflops respectively.

The output ( Next State) of a flipflop depends on   Present State and

  Current inputs and is described in a characteristics table.

Characteristic table: Specifies the next state, based on presentstate and current inputs.

Page 45: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 45/75

SR-FLIPFLOP

 Next

State Q(t+1)

Present

StateQ(t)

Input

SR

0000

Indeterminate111110

1010

0101

0001

1100

Page 46: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 46/75

JK-FLIPFLOP

0111

1

 Next

State Q(t+1)

Present

StateQ(t)

Input

S R

0000

011

1110

1010

0101

0001

1100

Page 47: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 47/75

D-FLIPFLOP Next

State

Q(t+1)

Present

StateQ(t)

Input

D

000

111

101

010

Page 48: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 48/75

T-FLIPFLOP

 NextState Q(t+1)

PresentStateQ(t)

InputT

000

011

101

110

Page 49: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 49/75

Page 50: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 50/75

Sequential Circuit Analysis

001 11 1 1

001 11 1 0

101 11 0 1

110 11 0 0

011 10 1 1

111 00 1 0100 10 0 1

000 00 0 0

next state

A B

flipflop inputs

TA  TB

 present state input

A B X

(ii) Complete the state table If T-flipflops are used.

. TA = AX +B; TB = X + A;

Page 51: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 51/75

SR-FLIPFLOP JK-FLIPFLOP

Inputs

S R

 Next

state

Q(t+1)

Present

State

Q(t)

0

1

0

d

d

0

1

0

1

0

1

0

1

1

0

0

Inputs

J K

 Next state

Q(t+1)

Present

State

Q(t)

0

1

d

d

d

d

1

0

1

0

1

0

1

1

0

0

Excitation Tables

Page 52: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 52/75

D-FLIPFLOP T-FLIPFLOP

1

Inputs

D

 Next

state

Q(t+1)

Present

State

Q(t)

0

1

0

1

0

1

0

1

1

0

0

Inputs

T

 Next state

Q(t+1)

Present

State

Q(t)

0

1

1

0

1

0

1

0

1

1

0

0

Excitation Tables

Page 53: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 53/75

Sequential Circuit Design

The excitation tables give the required inputs to the flipflop

for a specific change of state. The steps to be followed in the

design of sequential circuits are as follows:

1. Draw the state diagram from the problem specification

2. Choose the type of flipflop to be used.

3. Fill in the excitation table of the circuit using the selected flipflops.

4. Obtain k-maps for each flipflop input.

5. Simplify the k-maps to obtain Boolean expressions for each flipflop input.

6. Draw the logic diagram of the circuit (if required).

Page 54: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 54/75

Design a sequential circuit going through the following sequence of states: 0 -> 1 -

> 3 -> 5 -> 6 -> 2 -> 7 -> 4 -> 0

010

011001

111 110

000

101100

(a) Draw the state diagram of the circuit.

Example

Page 55: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 55/75

Excitation Table

1100011 1 1

0010101 1 0

1100111 0 1

0010001 0 0

0111010 1 1

1011110 1 0

0101100 0 1

1001000 0 0

FlipFlop inputs

TA TB  TC

 Next State

A B C

Present state

A B C

Page 56: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 56/75

K-Map

0010

1110

00 01 11 10

0

1

AB

C

TA

TA=A’B + AC’ TB

1111

0000

00 01 11 10

AB

0

1

C

TB= C

1

0

1

0

0

1

0

1

00 01 11 10

0

1

AB

C

TC

TC=A’C’+AC 

1100011 1 1

0010101 1 0

1100111 0 1

0010001 0 0

0111010 1 1

1011110 1 0

0101100 0 1

1001000 0 0

FlipFlop inputs

TA TB  TC

 Next State

A B C

Present state

A B C

Page 57: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 57/75

More examples of sequential circuit synthesis.

Design a two bit

sequential circuit

with an external

input x, such thatthe circuit counts

up when x=0 and

counts down when

x=1. Use D

flipflops. a) Draw state

diagram

00

X=0

X=1

X=1

X=1

X=1X=0

X=0

X=0

00 01

11 10

Page 58: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 58/75

Excitation Table

0

0

1

1

0

0

11

0

0

1

1

0

0

11

Present

state

A B x

Next State

A B

FlipFlop Inputs

DA DB

0 0 0 0 00 0 1 1 1

0 1 0 1 1

0 1 1 0 0

1 0 0 1 1

1 0 1 0 0

1 1 0 0 0

1 1 1 1 1

00X=0

X

=1

X=1

X=1

X=1X=0

X=0

X=0

00 01

11 10

Page 59: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 59/75

K-maps

0 1 0 1

1 0 1 0

AB

x

DA

00 01 11 10

0

1

1 0 0 1

1 0 0 1

00 01 11 10

0

1

AB

DB

x

DA= A’B’x+ A’Bx’+AB’x’+ABx 

DB= B’ 

0

0

1

1

0

0

11

0

0

1

1

0

0

11

Present

state

A B x

Next

State

A B

FlipFlop

Inputs

DA DB

0 0 0 0 00 0 1 1 1

0 1 0 1 1

0 1 1 0 0

1 0 0 1 1

1 0 1 0 0

1 1 0 0 0

1 1 1 1 1

Page 60: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 60/75

Draw the logic diagram.

Page 61: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 61/75

2. Design a sequential circuit, using T flipflops, that has the following

state diagram

1/0

0/0

1/0

0/00/1

1/0

1/0 0/0

A B

DC

A = 00

B = 01

C = 10

D = 11

Page 62: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 62/75

Fill in the excitation table corresponding to the above sequential

circuit, using T flipflops.

0

1

1

0

0

1

10

1

0

1

0

1

0

10

Present State

Q1 Q2 X

Next State

Q1 Q2

FlipFlop Inputs

T1 T2

Output

0 0 0 0 0 00 0 1 0 0 0

0 1 0 1 1 0

0 1 1 0 0 0

1 0 0 0 1 0

1 0 1 1 0 0

1 1 0 0 1 1

1 1 1 0 1 0

1/0

0/0

1/0

0/00/1

1/0

1/0 0/0

A B

D C

Page 63: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 63/75

Page 64: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 64/75

Draw the logic diagram.

Page 65: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 65/75

Registers

A group of flipflops, where each flipflop stores 1 bit of

information.

A n-bit register consists of n flipflops and can store any

 binary information of n bits. May have combinational circuits associated with each

flipflop, for simple data processing operations such asLOAD, INR, INV etc.

The flipflops hold binary information and the combinational

circuits control how and when new information is transferredto the register.

Page 66: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 66/75

Registers Figure 1 shows a simple 4-bit register with parallel load. A positive clock

transition will load all 4 values I3 - I0 into the register.

Page 67: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 67/75

In a digital system a clock generator supplies a

continuous set of clock pulses.

A separate control signal (LOAD) is required to

determine which clock pulse affects the data in a

register.

When LOAD = 1, a new value is loaded into the

register. When LOAD = 0, the contents of the register

remains unchanged.

Page 68: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 68/75

Shift Registers

A register capable of shifting binary information in

one or both directions.

It consists of a chain of flipflops in cascade, with the

output of one stage connected to the input of the next

stage.

All flipflops receive a common clock pulse.

 A shift register that can shift in both directions iscalled a bidirectional  shift register.

Page 69: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 69/75

Shift registers

Page 70: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 70/75

Counters

A register that can go through a

 predetermined sequence of states upon the

application of input pulses is called a counter .

Counters are widely used in digital systems

for counting number of occurrences of events,

generating timing and control information etc.

Page 71: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 71/75

Binary Counters

A binary counter is one which follows a

simple binary sequence.

A n-bit binary counter can count from 0 to 2n

 - 1.

A down counter counts in the reverse order.

Page 72: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 72/75

Capacity of Memory

Total number of bytes that can be stored in the

memory.

Capacity = no. of words X no. of bytes perword.

Address lines are used to select one particular

word in memory. A memory with 2k  locations requires k

address lines.

Page 73: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 73/75

Examples

(i) How many address and data lines* are needed for a 64k X8 bit memory.

64k = 26 X 210 = 216.

So, 16 address lines are needed.

wordlength = 8 bits. So, 8 data lines are needed.

(ii) How many address and data lines are needed for a 16M X4 byte memory.

16M = 24 X 220 = 224.

So, 24 address lines are needed.

wordlength = 4 bytes = 32 bits. So, 32 data lines are needed

*Assume the entire word is accessed as a unit.

Page 74: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 74/75

Random Access Memory (RAM)

Memory cells from any location can be

accessed directly.

Process of locating a word in memory is thesame and takes the same amount of time for

each location.

RAM is capable of both READ and WRITEoperations.

St f i l ti

Page 75: Computer Rchitecture

8/11/2019 Computer Rchitecture

http://slidepdf.com/reader/full/computer-rchitecture 75/75

Steps for accessing a memory location

in a RAM

1) Apply address to address lines

 2) Apply data bits to input data lines (for

WRITE operation only) 3) Activate READ/WRITE control line

4) Read data from data output lines (for

READ operation only)