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

Chapter 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 58

Chapter 1

Introduction to Digital
system
Computer organization and architecture
(SEng3022)
Topics to be discussed
• Introduction
• Logic gates
• Boolean Algebra
• Combinational circuit
• Sequential circuits
• Flip Flops

2
Introduction
• What is Computer?
 Electronic device operating under the control of instructions stored in
its own memory

Digital Computer contains = H/W + S/W


The basic elements of a digital computer, as we know, must perform data storage,
movement, processing, and control functions

Why Digital?
• Digital describes electronic technology that generates, stores, and processes
data in terms of two states: positive and non-positive.
• Positive is expressed or represented by the number 1 and non-positive by
the number 0.
• Thus, data transmitted or stored with digital technology is expressed as a
string of 0's and 1's.
• Each of these state digits is referred to as a bit (and a string of bits that a
computer can address individually as a group is a byte)
3
Digital signal.
 are a discrete series of pulses - either high or low - on or off -
sometimes expressed as binary code 1s and 0s.
 It counts but not measures.
 Discrete pluses of data transmission rather than continues wave
 More prevalent in computer based devices
 Light switch and Volume control on a radio are examples of on-off
and high-low pulses in digital systems respectively.
 The physical restriction of components are on and off. The
digital component are constrained to take only two Values and
are said to be binary. Bit = binary digit: 0/1
4
Introduction
• What is Program (S/W) ?
A sequence of instruction or codes
S/W = Program + Data
Application S/W = DB, word processor,
System S/W = OS, Firmware, Compiler, Device
Driver
• What is Computer Hardware(H/W) ?
CPU
Memory
I/O Device

5
Introduction
Computer Organization:
Organization It concerned with the way the HW
components operate and the way they are connected together to from
the computer system.
Computer Design:
Design Is concerned with the hardware design of the
computer. It determines what hardware should be used and how the
parts should be connected
Computer Architecture: Is concerned with the structure and
behavior of the computer. It is the specification of the various
functional modules such as processors and memories and structuring
them together into a computer system.
6
Logic gates
• manipulation of binary information is done by logic-
circuits called Gates.
Gates
• logic gates are commonly used in digital computer systems.
Logic
a branch of mathematics that deals with true and false values instead
of numbers
In the mid-19th century, George Bool
deals with equations where the operators are “AND” or “OR” instead
of “add” and “multiply”.
Electric Logic
Logical values can easily be expressed by an electrical circuit
“True” or “1”:- voltage on a wire while “False” or “0” :- no voltage
Electrical devices called “gates” can implement the logical circuit.
7
Cont.…
Gate
The fundamental building block of all digital logic circuits
Is a device that implement a single Boolean or logical
operation.
A gate is an electronic circuit that produces an output signal
that is a simple Boolean operation on its input signals.
are blocks of hardware that produce signals of binary 1 or 0
when input logic requirements are satisfied.
Logical functions are implemented by the interconnection of
8
gates.
Logic gates
• basic gates used in digital logic are :
AND
OR
NOT
NAND
NOR and
XOR (exclusive-OR)
Each gate is defined in three ways:
graphic symbol: IEEE Std91
algebraic notation, and
truth table.

9
Logic gates
Logic gates

•When one or more of the values at the input are changed, the correct output
signal appears almost instantaneously, delayed only by the propagation time

of signals through the gate known as the gate delay.

•To assert a signal is to cause signal line to make a transition from its logically
false (0) state to its logically true (1) state.

•The true (1) state is either a high or low voltage state, depending on the type
of electronic circuitry.

10
Cont.…
• Design and fabrication are simpler if only one or two
types of gates are used.
• important to identify functionally complete sets of
gates. This means that any Boolean function can be
implemented using only the gates in the set.
• The following are functionally complete sets:
AND, OR, NOT
AND, NOT
OR, NOT
NAND
NOR

11
Contd..
• It should be clear that AND, OR, and NOT gates constitute a
functionally complete set, because they represent the three
operations of Boolean algebra.
• For the AND and NOT gates to form a functionally complete
set, there must be a way to synthesize the OR operation from
the AND and NOT operations.
• This can be done by applying DeMorgan’s theorem:

• Similarly, the OR and NOT operations are functionally


complete because they can be used to synthesize the AND
operation.

12
Contd..
• A logical gate can be defined in three ways:
• Truth table: For each of the 2 power n possible
combinations of input signals, the binary value of each of
the m output signals is listed.
• Graphical symbols: The interconnected layout of gates
is depicted.
• Boolean equations: Each output signal is expressed as a
Boolean function of its input signals.

13
Logic gates
Logic gates
AND
The same as the multiplication symbol of ordinary
arithmetic
1 if input A and B are both equal to 1 ,otherwise the
output is 0.
 Logic notation AB = C (Sometimes AB = C)

x x•y
y

14
Logic gates
OR
The same as the arithmetic addition
1 if input A or B or both are equal to 1 ,otherwise the
output is 0.
 Logic notation A+B = C

x x+y
y

15
Logic gates
NOT (Inverter)
inverts the logic sense of a binary signal. It produces
the NOT or complement function.
 Logic notation x’ or
x x

Buffer
Input same as output
Used merely for power amplification

x x
16
Logic gates
NAND (not-AND)
 Complement of the AND function
x y NAND
x x•y 0 0 1
y 0 1 1
NOR (not-OR) 1 0 1
 Complement of the AND function 1 1 0

x x+y
y

17
Logic gates
XOR (Exclusive-OR)
x xÅ y
y xy+xy

XNOR (Exclusive-NOR) (Equivalence)

x xÅ y xy+xy
y x y

18
Boolean Algebra
Boolean Algebra
•uses Boolean variables and Boolean operators
Boolean variables: A, B, C, a, b, c, X, Y, and Z
Boolean operators: AND, OR, and NOT
•A Boolean expression is a combination of Boolean
variables and Boolean operators.
•Equivalent expressions: Boolean expressions that are
logically equivalent to one another.
•A Boolean function has one or more input variables and
produces a result that is based on these input values. The
result can have a value of 0 or 1.

19
Boolean Algebra
Boolean Algebra
•The relationship between a function and its binary
variables can be represented in a truth table. we need a
list of the 2n combinations of the n binary variables.
•Example: equation F= x + y ’ z.

x F
y
z

20
Class Activity

F3 F3 = x' y' z + x' y z + x y'

F4 F4 = x y' + x' z

21
Class activity…

Draw the gates with two and three input values and show the truth table

22
Boolean Algebra

Boolean Algebra
• The purpose of Boolean algebra is to facilitate the
analysis and design of digital circuits.
• It provides a convenient tool to:
Express in algebraic form a truth table relationship
between binary variables.
Express in algebraic form the input-output
relationship of logic diagrams.
Find simpler circuits for the same function.

23
Boolean Algebra

24
Boolean Algebra
• Commutative Law
x•y=y•x x+y=y+x
• Identity Element
x•1=x x+0=x
• Complement
x • x’ = 0 x + x’ = 1

25
Boolean Algebra
• Duality
The dual of a Boolean algebraic expression is obtained by
interchanging the AND and the OR operators and replacing the 1’s
by 0’s and the 0’s by 1’s.
Example1: a+(bc)=(a + b)(a + c)
Form the replacement of the expression
a(b + c) = ab + ac
Example2: 100101110= 011010001
Distributive law
 x•(y+z)=(x•y)+(x•z)
 x+(y•z)=(x+y)•(x+z)
• Theorem 1
 x•x=x x+x=x
• Theorem 2
 x•0=0 x+1=1
26
Boolean Algebra
• Theorem 3: Involution
 ( x’ )’ = x (x)=x
• Theorem 4: Associative & Distributive
 (x•y)•z=x•(y•z)
 (x+y)+z=x+(y+z)
 x•(y+z)=(x•y)+(x•z)
 x+(y•z)=(x+y)•(x+z)
• Theorem 5: DeMorgan
 ( x • y )’ = x’ + y’ ( x + y )’ = x’ • y’
• Theorem 6: Absorption
 x•(x+y)=x x+(x•y)=x

27
simplification.

28
Contd..

29
Contd..

30
Boolean Algebra
Exercise:
 List the truth table of the function:
F = xy + xy’ + y’z
 Draw the logic diagram

31
Boolean Algebra
Home Work:
1) Reduce the following Boolean expressions to the indicated
number of literals:
 (x’y’+ z)’ + z + xy + wz to three literals
A’B (D’ + C’D) + B (A + A’CD) to one literal
2) Given the Boolean function
F = xy’z + x’y’z + w’xy + wx’y + wxy
(a) Obtain the truth table of the function.
(b) Draw the logic diagram using the original Boolean
expression.
(c) Simplify the function to a minimum number of literals
using Boolean algebra

32
Combinational Circuit
Combinational Circuit
A connected arrangement of logic gates with a set of inputs and outputs.

The n binary input variables come from an external source, the m binary
output variables go to an external destination, and in between there is an
interconnection of logic gates.
A combinational circuit can be described by the truth table or a Boolean
function
Some of the characteristics of combinational circuits is.
 A combinational circuit can have an n number of inputs and m number of
outputs.
 The output of combinational circuit at any instant of time depends only on the33
levels present at input terminals.
Combinational Circuit
Combinational Circuit
The previous state of input does not have any effect on the present
state of the circuit.
The Combinational circuits do not use any memory.
Implementation of Boolean Functions
Any Boolean function can be implemented in electronic form as a
network of gates.
gates
For any given function, there are a number of alternative realizations.
Consider the Boolean function represented by the truth table in Table
1.3.We can express this function by simply itemizing the combinations
of values of A, B, and C that cause F to be 1:

There are three combinations of input values that cause F to be 1, and


if any one of these combinations occurs, the result is 1

34
Contd..

Table 1.3 A Boolean Function of Three Variables

Figure 1.4 Sum-of-Products Implementation of Table 1.3 35


Contd..

Figure 1.4 Sum-of-Products Implementation of Table 1.3


36
Cond…

Q? draw combination circuit and truth


table for the following Boolean
expression

37
Combinational Circuit
Combinational Circuit
Half Adder
•A combinational circuit that performs the athematic
addition of two bits
•The input variable of a half adder is called the augend and
addend bits. the output variables sum and carry.
•A half adder circuit has one significant drawback: since
pair of bits can produce an output carry, in addition to the
inputs A and B, we need to account for a possible carry over
from a bit of the lower order of magnitude.
Unfortunately, half adder has no support for such carry over
input by design.
38
Combinational Circuit
Half Adder

39
Combinational Circuit
Full Adder
•Full adder is developed to overcome the drawback of Half Adder
circuit.
•It can add two one-bit numbers A and B, and carry c.
•The Full Adder is a three input and two output combinational
circuit.

40
Contd..

41
Combinational Circuit
Full Adder

 The output is equal to 1 when only one input is equal to 1 or when all
three inputs are equal to 1.
 The output has a carry 1 if two or three inputs are equal to 1

42
SEQUENTIAL CIRCUITS
• It is an Interconnection of flip-flops and gates.
• have input, present state, next state and output. Next state depends upon
present state and input. Output depends upon present state and input

43
clock
Clock
•A clock is a circuit that emits a series of pulses with a precise pulse width
and a precise interval between consecutive pulses.
•This interval is called the clock cycle time. Clock speed is generally
measured in megahertz (MHz), or millions of pulses per second.
•A clock is used by a sequential circuit to decide when to update the state
of the circuit

44
SEQUENTIAL CIRCUITS
SEQUENTIAL CIRCUITS
•Sequential circuits can be divided into
1. Synchronous
2. Asynchronous
Synchronous: responds to the inputs only at discrete time
intervals.
Asynchronous: immediately responds to input level changes
•In synchronous sequential circuit, all flip-flops are moved by the
same clock pulse so that all flip-flops involved change
simultaneously.
•In asynchronous circuit, the change of flip-flop condition depends
on the change that occurs on the input and the late time that is in
the circuit.

45
Cond…

Fig 1.6 Asynchronous Circuits


46
Contd..

Fig 1.7 Synchronous circuit 47


Flip Flops
Flip Flops
•A kind of logic circuit that is capable of exhibiting 2 stable
conditions.
•1-bit memory element
•used to make computer components
 registers,
counters,
memory etc.
•share two properties:
 is a bistable device either 0 or 1. It exists in one of two states
and, in the absence of input, remains in that state.
The flip-flop has two outputs, which are always the
complements of each other. These are generally labeled Q and
Q’.
48
Flip Flops

Types of flip-flops:
SR (set_reset)
D
JK
T (toggle)

49
SR (set_reset)
SR (set_reset)
•It has three inputs labeled S (for set), R (for reset) and C (for clock).
•It has an output Q and sometimes the flip-flop has a complemented
output,
•There is an arrow head-shaped symbol in front of the letter C to
designate a dynamic input.
•The dynamic indicator symbol denotes the fact that the flip-flop
responds to a positive transition (from 0 to 1) of the input clock signal.

50
SR (set_reset)

51
SR (set_reset)

SR (set_reset)
• The S and R columns give the binary values of the two inputs.
• Q (t) is the binary state of the Q output at a given time (referred to
as present state).
• Q (t + 1) is the binary state of the Q output after the occurrence of a
clock transition (referred to as next state).
• If S=R=0 a clock transition produces no change of state [i.e. Q (t + 1)
=Q (t)].
• If S=0 and R=1 the flip-flop goes to the 0 (clear) state.
• If S=1 and R=0 the flip-flop goes to the 1 (set) state.
• The SR flip-flop should not be pulsed when S = R = 1 since it
produces an indeterminate next state. This indeterminate condition
makes the SR flip-flop difficult to manage and therefore it is seldom
used in practice. 52
D Flip Flop
• A slight modification of the SR flip-flop.
• The D input is sampled during the occurrence of a clock transition from 0 to 1.
• If D = 1, the output of the flip-flop goes to the 1 state, but if D = 0, the output
of the flip-flop goes to the 0 state.

53
D Flip Flop

D Flip Flop
• is very suitable to be used as memory element and this flip-flop is
mostly used to make registers and computer memory (RAM).
• Q (t + 1) = D. This means that the Q output of the flip-flop receives
its value from the D input every time that the clock signal goes
through a transition from 0 to 1.

• The advantage of D flip-flop is having only one input


• disadvantage that its characteristics table does not have a “no
change “condition Q (t +1) = Q (t).

54
J-K Flip Flop
• The function of clock is same as S‑R flip-flop. Unlike S‑R flip-flop, J‑K flip-flop
allows all combination of inputs.

55
J-K Flip Flop
If J = 0 and K = 0, it will maintain the flip-flop condition like before
If J = 0 and K = 1, it will cause flip-flop to change to condition 0 (reset).
If J = 1 and K = 0, it will cause flip-flop to change to condition 1 (set).
If J = 1 and K = 1, it will change the flip-flop condition, that is it will become
complementary to the initial or prior condition

56
T Flip Flop
• It is obtained from a JK type when inputs J and K are connected to provide a
signal input designated by T.

57
T Flip Flop
• When T = 0 (J = K = 0) a clock transition does not change the state of the flip-
flop.
• When T = 1 (J = K = 1) a clock transition complements the state of the flip-flop.
These conditions can be expressed by a characteristic equation: Q (t + 1) =Q(t)
+T

58

You might also like