Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Computer Organization and Architecture: Chapter One Digital Logic and Digital Systems

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 50

Computer Organization and

Architecture
Chapter One

Digital logic and digital systems


12/17/2020 1
1.1 Introduction
Computer Organization, Computer Architecture, Computer Design
Computer Organization
 is concerned with the way hardware components are operate and the way they
are connected together to form the computer system.

 In CO the various components are assumed to be in place. Hence


the task is to investigate the organizational structure to verify that
each parts operates as intended.
 The physical design of the computer system
Examples are things that are transparent to the programmer:
 Control line (signals)
 interfaces between computer and peripherals
12/17/2020 2
Computer Design
 is concerned with the hardware design of the computer.
 Once the computer specification is formulated, it is the
task of the designer to develop hardware for the system.
 Computer Design is concerned with the determination of
what hardware should be used and how the parts should
be connected.
 This aspect of computer hardware is sometimes referred
to as computer implementation.
12/17/2020 3
Computer Architecture
• Computer Architecture is concerned with the structure and behavior
of the computer as seen by the users.
•The logical design of the computer system
Examples:
 It includes the information formats(operation and operand),
 the instruction set (what operations can be performed?)
 the number of bits used to represent various data types
 I/O mechanisms
 memory addressing techniques(how is data accessed?)
 Data storage (where is data located?)

12/17/2020 4
Structure and Function
• Structure is the way in which components are relate to each other
Example: the structure of a computer

• Function is the operation of individual components


as part of the structure
- Basic computer functions are:
- Data processing
- Data storage
- Data movement
- Control
5
Organization of the Computer
•The general organization of computers

12/17/2020 6
• Central Processing Unit (CPU)
– Controls the operation of the computer and performs its
data processing functions.
• Memory System
– Stores data and programs.
• input and output device:
– Moves information between the computer and its external
environment
– connected to the computer include keyboards, printers,
terminals, magnetic disk drives and other communication
devices.
• System Interconnection(Input Output processor)
– Some mechanism that provides for communication among
the CPU, main memory and the I/O sub-systems.

12/17/2020 7
Digital Logic Circuits
• It introduces the fundamental knowledge needed for the
design of digital systems
• it constructed with the individual gates and flip – flops.
• The manipulation of binary information in a computer is
done using logic circuits called gates
• It covers Boolean algebra, combinational circuits and
sequential circuits.
Logic Gates
• Gates are the fundamental building block of all digital logic
circuits.
• Logical functions are implemented by the interconnection of
gates.
• Binary information is represented in digital computers using
12/17/2020 8
Examples of gate:
AND, OR, Inverter, Buffer, NAND, NOR, X-OR, X-NOR

Each gate is defined in three ways:


• graphic symbol,
• algebraic notation/function, and
• truth table

12/17/2020 9
Fig 1.2
A. AND Gate

The truth table

12/17/2020 10
OR Gate
A
X =A+ B
B

The truth table

12/17/2020 11
C. Inverter
X = A’

Buffer

X =A

12/17/2020 12
NAND

12/17/2020 13
NOR
A

Exclusive-OR (XOR)

A
x = A⊕ B
B or
x=A’B+AB’

H. Exclusive-NOR

X = (A⊕ B)’

12/17/2020 14
Boolean Algebra
- Boolean algebra is an algebra that deals with binary variables
and logic operations.
- Variables are designated by letters such as A, B, x, and y.
- The result of a Boolean function is either 0 or 1.
Basic Identities of Boolean algebra
(1) x+0=x (3) x+1=1
(2) x*1=x (4) x*0=0
(5) x+x=x (6) x*x=x
(7) x + x' = 1 (8) x * x' = 0
(9) x+y=y+x (10) xy = yx
(11) x + (y + z) = (x + y) + z (12) x(yz) = (xy)z
(13) x(y + z) = xy + xz (14) x + yz = (x + y)(x + z)
(15) (x + y)' = x'y' (16) (xy)' = x' + y‘
(17) (x')' = x
12/17/2020 15
Example 1

12/17/2020 16
Example 2

12/17/2020 17
Show that a. A + A.B = A
b

12/17/2020 18
Map Simplification
- In addition to using Boolean algebra to simplify a Boolean function, we
use map simplification techniques/methods.

- The map method is known as the Karnaugh map or K-map.

- Each combination of the variables in a truth table is called a minterm.

- There are 2n minterms for a function of n variables.

- The Boolean algebra can simplify by those two methods:

1. Sum-of- Products simplifications (SOP)

2. Product-of-sum simplifications (POS)

12/17/2020 19
Variable Maps

12/17/2020 20
CONT…
- The variable names are listed across both the sides of the diagonal
line into the corner of the map.

- The 0’s and the 1’s marked along each row and each column
designate the value of the variables.

- Each variable under the brackets contain half of the squares in the
map where that variable appears unprimed.

- Here the min term 5 the three variable maps are 101 of the second
column. This minterm represents a value for the binary variables A, B
and C with A and C being unprimed and B being primed.

12/17/2020 21
Sum-of-Products Simplification ((SOP)
- A Boolean function represented by a truth table is plotted into the map
by inserting 1's into those squares where the function is 1.
- Boolean functions can then be simplified by identifying adjacent squares
in the Karnaugh map that contain a 1.
- A square is considered adjacent to another square if it is next to, above,
or below it. In addition, squares at the extreme ends of the same
horizontal row are also considered adjacent. The same applies to the top
and bottom squares of a column.
- The objective to identify adjacent squares containing 1's and group them
together.
- Groups must contain a number of squares that is an integral power of 2.

12/17/2020 22
Cont.
- Groups of combined adjacent squares may share one or more squares
with one or more groups.

- Each group of squares represents an algebraic term, and the OR of


those terms gives the simplified algebraic expression for the function.

- To find the most simplified algebraic expression, the goal of map


simplification is to identify the least number of groups with the largest
number of members or elements.

Example: We will simplify the Boolean function.

F(A,B,C) 12/17/2020
= Σ(0,2,4,5,6) 23
Cont…
Map for F(A,B,C) = Σ(0,2, 4, 5, 6)

The simplified expressions of the function is :


F = C’+AB’

12/17/2020 24
Maps for F(A,B,C,D)=Σ(0,1,2,6,8,9,10)

So the simplified function is:


F = B’D’ +12/17/2020
B’C’ + A’CD’ 25
Product-of-Sums Simplification (POS)
 
- This approach is similar to the Sum-of-Products simplification,
but identifying adjacent squares containing 0’s instead of 1’s
forms the groups of adjacent squares.

- Then, instead of representing the function as a sum of products,


the function is represented as a product of sums.

- Examples: F(A,B,C,D) (0,1,2,5,8,9,10)

- The 1’s marked in the map of fig represents the minterms that
produces a 1 for the function,

12/17/2020 26
Cont…

- The squares marked with 0’s represent the minterm not included in F
and therefore denote the complement of F.

- Combining the squares with 1’s gives the simplified function in sum-
of-products form: F = B’D’ +B’C’+A’C’D

- If the squares marked with 0’s are combined as shown in the


diagram, we obtain the simplified complement function:

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

12/17/2020 27
Cont…
F’=(A’+B’)(C’+D’)(B’+D)

12/17/2020 28
Cont…

12/17/2020 29
Combinational Circuits
- A combinational circuit is a connected arrangement of logic gates with a
set of inputs and outputs.

- At any given time, the binary values of the outputs are a function of the
binary values of the current inputs.

- The procedure involves the following steps:


o The problem is stated.
o The input and output variables are assigned letter symbols.
o The truth table that defines the relationship between inputs and
outputs is derived.
o The logic diagram is drawn

12/17/2020 30
Half-Adder
- The most basic digital arithmetic circuit.
- Performs the addition of two binary digits.
- The input variables of a half-adder are called the augends
- The output variables of a half-adder are called the sum and the carry.

fig 1.8
half adder
S = x’y+xy’=x ⊕ y
C=xy

12/17/2020 31
Full-Adder
A full-adder performs the addition of three binary digits.
Two half-adders can be combined to form a full-adder.
Full adder has three inputs and two outputs
The full adder circuit contains two half adders and an OR gate.

12/17/2020 32
12/17/2020 33
Additional examples of combinational circuits:
 Decoders
 Encoders
 multiplexers(MUL)

12/17/2020 34
Decoders
 
- A binary code of n bits is capable of representing up to distinct
elements of the coded information

- A decoder is a combinational circuit that converts binary information


from the n coded inputs to a maximum of unique outputs

- A decoder has n inputs and m outputs, where m ≤, and are called n-to-
m-line decoders

- Each output represents one of the combinations of the input variables

- An enable input controls operation of the decoder

12/17/2020 35
12/17/2020 36
Truth table for 3-to- 8 line Decoder

12/17/2020 37
Some decoders use NAND gates rather than AND gates causing
the outputs to be in their complemented form
 The circuit would then be enabled when E = 0

Encoders

An encoder is a digital circuit that performs the inverse of


a decoder
 An encoder has 2n (or less) input lines and n output lines
The output lines generate the binary code corresponding to
the input value

12/17/2020 38
Truth tables for Octal to Binary Encoder

12/17/2020 39
Cont.

 An encoder can be implemented with OR gates


 A0 = D1 + D3 + D5 + D7
 A1 = D2 + D3 + D6 + D7
 A2 = D4 + D5 + D6 + D7
 Multiplexers

A multiplexer (MUX) is a combinational circuit with 2n input data


lines, n input select lines, and one output line
 The input selection lines determine which input data line is
selected for the output

12/17/2020 40
Fig 1.23 4-to-1 line Multiplexers

12/17/2020 41
Cont.

 Rather than using a truth table to describe the circuit, we use


function table with 2n rows is used , example for the 4-to-1 line
multiplexer above we needs 64 rows, if we use truth table , then
instead we use function tables.
 One row for each combination of the selection inputs
 The MUX is also called a data selector
 Function table for 4-to- 1 line Multiplexers

12/17/2020 42
2. Sequential circuits

 the current output of a sequential circuit depends on the current input and
the current state of that circuit.
 Flip Flops
Is the simplest form of sequential circuit

There are a variety of flip flops,

all of which share two properties:


1. The flip-flop is a bistable device. It exists in one of two stable states
2. The flip-flop has two outputs, which are always the complements of each
other. These are generally labeled Q and Q’ (Q complement).
12/17/2020 43
Cont.
 A timing device called a clock pulse generator that produces a periodic
train of clock pulses achieves synchronization.
 The difference in the types of flip flops is in the number of inputs and the
manner in which the inputs affect the binary state.

The most common types of flip flops are:


 SR Flip-Flop

 D Flip-Flop

 JK Flip-Flop
 T Flip-Flop

12/17/2020 44
SR Flip-Flop or S-R Latch
 Has 3 Inputs: Graphic symbol
 S (for set)
 R (for reset)
 C(for Clock)
 Has 2 Outputs:
 Q
 Q'

12/17/2020 45
 The operation of the SR flip-flop is as follow.
 If there is no signal at the clock input C, the output of the circuit
cannot change irrespective of the values at inputs S and R.
 Only when the clock signals changes from 0 to 1 can the output be
affected according to the values in inputs S and R
 If S =1 and R = 0 when C changes from 0 to 1 output Q is set to 1.
 If S = 0 and R =1 when C changes from 0 to 1output Q is cleared to
0.
 If both S and R are 0 during the clock transition, output does not
change.
 When both S and R are equal to 1, the output is unpredictable and may
go to either 0 or 1, depending on internal timing that occur within the
circuit

12/17/2020 46
D Flip-Flop:

It is the slight modifications of SR flip-flops

Inputs: Graphics Symbol


D (for data)
C (for clock)
Outputs:
Q
Q'

12/17/2020 47
JK Flip-Flop : is the refinements of the SR flip-flops in that
indeterminate conditions of the SR type and is defined in the JK
types.
 if inputs J& K are both equal to 1 a clock transition
switches the outputs of the flip-flops to their complement
state.

Inputs: Graphics Symbol


J
K
C
Outputs:
Q &Q'

12/17/2020 48
T Flip-Flop : is obtained from a JK types when inputs J&
K are connected to provide single inputs designed by T.
 the T flip flops has only two conditions
I. When T=0(J=K=0) a clock transition does not
change the state of the flip-flops
II. When T=1(J=K=1) a clock transition
complements the state of the flip-flops

Inputs:
T (for toggle)
C (for clock)
Outputs:
Q &Q‘

12/17/2020 49
D! !
EN

12/17/2020 50

You might also like