Chapter 1
Chapter 1
Code: SEng3022
Set by :
Molla K.
Computer Organization and Architecture
Chapter One
2
Outline
Basic Concepts of digital systems
Logic gates
Boolean Algebra
Combinational circuit
Flip Flops
Sequential circuits
3
Basic Concepts of Digital Systems
Digital Systems is a system in which signals have a finite number of discrete values.
Analog system has values from a continuous set and mixed signal system has both Digital
and Analog parts.
Generally, signals are represented by two methods, i.e., Digital and Analog System.
Digital systems are designed to store, process, and communicate information in digital
form.
They are found in a wide range of applications, including process control, communication
systems, digital instruments, and consumer products.
4
Computer Organization Vs Architecture
Computer Organization : The way the hardware components are
connected to form a computer system.
Computer Architecture : Structure and behavior of the various functional
units of the computer and their interactions.
The digital computer is a digital system that performs various computational
tasks.
A digital implies that the information in the computer represented by the
variables that take a limited number of discrete values.
5
Cont.
Digital computer use the binary number system which has two digits 0 and 1.
A binary digit is called a bit.
Computer design is concerned with the development of hardware for the computer.
It is concerned with structure and function of computer system.
It is called computer implementation.
7
Cont.
There has two major functional entities of a computer:
1. System Hardware : consists all of the electronic components and electro mechanical devices
3. Input output processor (IOP): contains electronic circuit for communicating and controlling
2. System Software : consists all instructions and data that the computer manipulate to perform
It consists all collection of the program whose purpose is to make effective use of the computer.
It compensate for the difference between user need and capability of computer hardware.
9
Cont.
10
Logic Gates
Logic Gates
A logic gate is an electronic device that produces a result based on input values.
Logic gates are the basic building blocks of a digital computer.
Binary information in digital computers represented by physical quantities called signal.
Logic gates are digital circuits that have two or more logic inputs (except for NOT gate)
and produce a single output with a logic level based on the inputs.
The manipulation of binary information is done by logic circuit called gate.
Gate is the fundamental building block of hardware that produce signal of binary 1 or 0.
The basic gates used in digital logic are AND, OR, NOT, NAND, NOR, and XOR.)
11
Cont.
1. AND gate : produce the AND logic function. It concatenate variables.
o The output is 1 if and only if both input A and B are otherwise, the output is 0.
2. OR gate: Produce the inclusive or function.
o The output is 1 if input A or B or both inputs are 1.
o Algebraic symbol is „+‟ similar to Arithmetic addition.
3. Inverter : the inverter circuit inverts the logic sense of a binary signal.
o It produce the NOT or complement function.
12
Cont.
4. NAND gate : Is the complement of AND function, is NOT-AND.
14
Boolean Algebra
Boolean Algebra : is an algebra that deals with binary variables and logic operations.
The possible values for a logical variable are either TRUE or FALSE.
The logical operators of Boolean algebra are AND, OR, and NOT,
which are symbolically represented by dot (∙), plus sign (+), and over
bar (¯).
Example
16
Cont.
Example, F= x +y’z
17
Cont.
3.Dominance Laws:
1.Idempontency
x+1=1
x+x = x x.0=0
Example:1. Simplify the logic expression Example 2: show the following logic expression
A. x’y’+xy+x’y = X’ + xy
=x+xy’+xy+yy’
Exercises
=x(1+y) + xy+0
B. x’y +xy’+xy+x’y’ =1
=x+xy
C. x’+xy+xz’+xy’z’ = x’+xy+xz’
=x(1+y) =x D. A’BC+AB’C’+A’B’C’+AB’C+ABC = BC+B’C’+AB’
20
Sum-of-Products and Product-of-Sums expressions
21
Sum-of-Products and Product-of-Sums expressions
Canonical Sum of Products
A SOP expression is referred to as canonical sum of products expression if every product term involves
every literal or its complement.
Example: F=ABC+ABC+ACB+ABC , where ABC,ABC,ACB and ABC are the product terms involves all the
literals A, B and C.
Canonical Product of Sums
A POS expression is referred to as canonical product of sums expression if every sum term involves every
literal.
Example :F= (A‟ +B ‟ +C ‟ +D ‟ )(A+B+C+D ‟ )
(A ‟ +A‟ B+C+D)(A+B+C‟ +D‟ )
Where (A ‟ +B ‟ +C ‟ +D ‟ );(A+B+C+D ‟ ); (A ‟ +B+C+D);
(A+B+C ‟ +D ‟ ) are sum terms involves all the literals A, B, C and D. 22
Sum-of-Products and Product-of-Sums expressions
Minterm :
A product term which contains each of „n‟ variables as factors in either complemented or in
complemented form is called a Minterm.
A minterm is a logical expression of n variables that employs only the complement operator
and the product operator.
Maxterm :
o A sum term which contains each of „n‟ variables as factors in either complement form is called
a Maxterm.
o A maxterm is a logical expression of n variables that employs only the complement operator
and the sum operator. 24
Sum-of-Products and Product-of-Sums expressions
Two or more sum terms are ANDed together to form a product of sums expression.
Example: f(A,B,C)= (A+B) (A+B+C) (C+B) (B)
o f(A,B,C)= (A+B)(A+B+C)(C+B)(B) where A+B; A+B+C; C+B; and B are sum terms
26
Sum-of-Products and Product-of-Sums expressions
27
Two Types of Logic Circuits
Combinational Logic Circuit [CLC]
Combinational circuit is an interconnected set of gates whose output at any
time is a function only of the input at that time.
They serve as a basic building blocks for the construction of more complicated
arithmetic circuits.
Common combinational circuit are, Adders (Half Adder, Full Adder & Multiple-
Bit Adder). 28
Cont.
Half Adder :A digital arithmetic circuit that carries out the addition of two bits is called a half adder.
29
Cont.
Full Adder: adds two n-bit numbers along with a carry from a previous bitwise addition (performs addition of three
bits).
30
Cont.
Multiple-Bit Adder: By combining a number of full adders, we can have the necessary
logic to implement a multiple-bit adder.
The output from each adder depends on the carry from the previous adder.
31
Sequential Logic Circuit [SLC]
In case of combinational circuits, the value of each output depends on the values of
signals applied to the inputs.
However, in case of Sequential Circuits, the values of the outputs depend not only on
the present values of the inputs but also on the past behavior of the circuit.
Such circuits include storage elements that store the values of logic signals.
A SLC consists of CLC and memory which stores the input data.
E.G. Counter, flip-flops.
32
Flip-flops
The simplest form of sequential circuit is the flip- flops.
The flip-flop is a bistable device, i.e. has two stable states.
It exists in one of two states and, in the absence of input- function as a 1-bit memory.
There are basically 4 types of flip-flops:
SR Flip-Flop
JK Flip-Flop
D Flip-Flop
T Flip-Flop
33
SR Flip Flop
This is the most common flip-flop among all.
This simple flip-flop circuit has a set input (S) and a reset input (R).
In this system, when you Set “S” as active, the output “Q” would be high, and “ Q‘ ” would
be low.
Once the outputs are established, the wiring of the circuit is maintained until “S” or “R” go
high, or power is turned off.
34
Cont.
As shown below, it is the simplest and easiest to understand.
The two outputs, as shown below, are the inverse of each other.
In this circuit diagram, the output is changed (i.e. the stored data is changed) only when you give an active clock
signal. Otherwise, even if the S or R is active, the data will not change.
35
Cont.
AND NOR
A B Out put A B Out put clk S R S’ R’ Q Q’ Out put
0 0 0 0 0 1
0 x x 0 0 0 1 No Change
0 1 0 0 1 0
1 0 0 1 0 0
1 0 0 0 0 0 1 Memory
1 1 1 1 1 0
1 1 0 1 0 1 0 Set Q=1
1 0 1 0 1 0 1 Reset Q=0
S’ R’ Out put
0 0 No change
1 1 1 1 1 0 0 Not Allowed
1 0 Set Q=1
0 1 Rest Q=0
1 1 Not allowed
36
Cont.
Since 0 input has no effect on its output, the Flip-Flop retains its previous
state. Hence Q remains unchanged.
The second input condition R=0, S=1 forces the output of NOR gate2 low.
This low output will reach NOR gate1 and when both inputs of NOR gates1
is low, its inputs Q will be high.
Thus, a 1 at the S input will SET the flip-flop and Q will be equal to 1.
37
Cont.
The third input condition R=1, S=0 will force the output of NOR gate1 to
low.
This low will reach NOR gate2 and forces its outputs to high. Hence, when
R=1, S=0, then Q=0, Q=1. Thus, the flip-flop is RESET.
The last input condition in the table R=1, S=1 is forbidden since it forces
both the NOR gates to the low state, means both Q=0, and Q=0 at the
same time, which violets the basic definition of flip-flop that requires Q to
be the complement of Q.
39
Cont.
Clock Input:
For synchronization of operation of multiple flip-flop, an additional signal is added to all types of flip-flop
which is called clock signal, generally abbreviated as CLK.
Addition of CLK signal ensures that, whatever may be the input to the flip-flop, it effects the output only
when CLK signal is given. Fig. 1.16 shows a clocked RS flip-flop.
40
D Flip-flop
It is a modification of RS flip-flop.
In RS flip-flop when both the inputs are high i.e., R=1, S=1, the output becomes unpredictable and this
input combination is termed as forbidden.
To avoid this situation, the RS flip-flop is modified so that both the inputs can not be same at a time.
The modified flip-flop is called D flip-flop. Fig 1.17 shows a clocked D flip-flop.
41
Cont.
In D flip-flop both inputs of RS flip-flop are combined together to make it one by a NOT
gate so that inputs can not be same at a time.
Hence in D flip-flop there is only one input. The truth table is:
42
Cont.
In a clocked D flip-flop the value of D cannot reach the output Q when the clock pulse
is low. During a low clock, both AND
Gates are disabled. Therefore, D can change value without affecting the value of Q. On
the other hand, when the clock is high , both AND gates are enabled.
In another way we can say that in the D flip-flop above, Q follows the value of D while the
clock is high.
43
JK Flip-Flop
In RS flip-flop, the input R= S=1 is called
forbidden as it causes an unpredictable
output.
45
Cont.
The inputs J and K are called control inputs because their combinations decide what the
output of JK flip-flop will be when a +ve clock pulse arrives.
When J and K are both low, both the AND gates are disabled. Therefore, the CLK pulse
has no effect.
The first input combination of the truth table shows this and under this case the output Q
retains its last state.
When J is low, K is high , the upper AND gate is disabled while the lower AND gate is
enabled. Hence the flip-flop cannot be set; instead it is reset, i.e. Q=0. This is shown by the
second entry in the truth table.
46
Cont.
When J is high, K is low the upper AND gate is enabled while the lower one is disabled. So the flip-flop is set there by
making Q =1.
When J and K are both high , then the flip-flop is set or reset depending on the previous value of Q.
If Q is high previously, the lower AND gate sends a RESET trigger to the flip-flop on the next clock pulse.
Then Q becomes equal to 0. On the other hand, if Q is low previously, the upper AND gate sends a SET trigger on the
So, when J = K = 1, Q changes its value from 0 to 1 or 1 to 0 on the positive clock pulse. This changing of Q to Q is
called toggle.
48
T Flip-Flop
A T flip-flop is like a JK flip-flop. These are basically single-input versions of JK flip-flops.
These flip-flops are called T flip-flops because of their ability to complement their state i.e. Toggle, hence they
are named Toggle flip-flops.
49
Chapter Summary Examples
Simplify Boolean function
1.
50
Simplify Boolean function
51
3. Convert ABC+A'BC+AB'C+A'B'C+ABC„ to its simplest form
52
4. Simplify CLC via Boolean Algebra
53
CON…
54
5. Simplify the following circuits
55
Con….
56
Con….
57