Computer Organization and Architecture: Chapter One Digital Logic and Digital Systems
Computer Organization and Architecture: Chapter One Digital Logic and Digital Systems
Computer Organization and Architecture: Chapter One Digital Logic and Digital Systems
Architecture
Chapter One
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
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
12/17/2020 9
Fig 1.2
A. AND Gate
12/17/2020 10
OR Gate
A
X =A+ B
B
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.
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.
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)
12/17/2020 24
Maps for F(A,B,C,D)=Σ(0,1,2,6,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
- 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.
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 has n inputs and m outputs, where m ≤, and are called n-to-
m-line decoders
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
12/17/2020 38
Truth tables for Octal to Binary Encoder
12/17/2020 39
Cont.
12/17/2020 40
Fig 1.23 4-to-1 line Multiplexers
12/17/2020 41
Cont.
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
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:
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.
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