COA Chapter One
COA Chapter One
Chapter One
Introduction to Digital Systems
• Computer organization and architecture
• Basic components of Digital system
• Logic Gates
• Combinational Circuits
• Flip-Flops
• Sequential Circuits
• Common Digital Components
1
Computer Architecture and Organization
What is Computer Architecture?
• It is concerned with behavior of various functional modules (HW
and SW) of a digital computer as well as how these modules
interact to meet the requirement of the user
• Deals with interface between hardware and software
• Computer Architecture helps us to understand the functionalities
of a system. (deals with high-level design issues)
Describes WHAT the computer does (logical view)
• Examples:
4
Basic Components of Computer
• The digital computer is a digital system that performs
various computational tasks.
• Computer is made up of the following HW components:
– A Central Processing Unit
• Arithmetic & Logic Unit
• Control Unit
• Registers
– Memory
• any physical device capable of storing information
temporarily or permanently
– Primary Memory (Usually called RAM)
– Secondary Memory or Mass Storage (Disk drives)
– Input and Output Devices
• allow the computer system to interact with the outside world by
moving data into and out of the system.
5
Organization of the computer
C=A’B+AB’
Logic Gates
7. The Exclusive NOR gate
Boolean Algebra
- Boolean Notation is a annotation 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.
- 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.
- The objective to identify adjacent squares containing 1's and group them together.
- 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.
F(A,B,C) = Σ(0,2,4,5,6)
Cont…
NH Read about
don’t care condition
Deriving Logical Expressions
(cont.)
• 3-input majority function • SOP logical expression
A B C F • Four product terms
0 0 0 0 – -Because there are 4 rows with a 1
0 0 1 0 output
0 1 0 0
0 1 1 1
1 0 0 0 F=ABC + ABC+
1 0 1 1
1 1 0 1 ABC+ABC
1 1 1 1
Deriving Logical
Expressions (cont.)
• 3-input majority function • POS logical expression
A B C F • Four sum terms
– Because there are 4 rows with
0 0 0 0 a 0 output
0 0 1 0
0 1 0 0
0 1 1 1 F = (A + B + C) (A + B + C)
1 0 0 0 ( A + B + C) ( A + B + C)
1 0 1 1
1 1 0 1
1 1 1 1
Combinational Circuits
• A combinational circuit is a connected arrangement of logic
gates with a set of inputs and outputs.
• The output is dependent upon combination of input
variable.
• The state of the output at any instant is entirely
determined by the states of the inputs at that time.
• Gates are basic combinational circuits themselves, and gates
used to construct more complex combinational functions.
• Combinational circuits are employed in digital computers:
– For generating binary control decisions and
– For providing digital components required for data
processing
Combinational logic
where the outputs are determined solely(only)
by the current states of the inputs
Examples
• Adders (Half adder and Full adder)
• Decoders /Encoders
• Multiplexers/ Demultiplexers
• Comparator
Used to implement comparison operators (= , > , < , , )
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 (S) and
the carry (C).
half adder
S = x’y+xy’=x ⊕ y
C=xy
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.
Decoder
• A decoder is a combinational circuit that converts binary
information from the n coded inputs to a maximum of 2n unique
outputs.
• Consists of: n Inputs and 2n Outputs (numbered from 0 - 2n - 1)
• The truth table of 3-to-8 Decoder is shown below:
Decoder
Logic Diagram for 3-to-8 Decoder
• Selection input
determines the
input that should
be connected to
the output
Multiplexers
• Like encoders, Multiplexers can have an enable
input to control the operation of the unit.
Function Table
4-to-1 multiplexer
Flip-Flops
• It is a binary cell capable of storing just one bit of
information (it contains 0 or 1)
• Flip flops are the smallest temporary storage units
/memory/of a computer
• It is a bistable device (i.e. it has two stable states: its
output remains either high (1) or low (0))
• The high state ,i.e, 1 is called Set and the low state, i.e,
0 is called the Reset or clear state
Flip-Flops
All flip flops have two outputs, one for the normal
value (Q) and other giving a value opposite to the
value stored in the flip flop (Q’)
Flip flops are of many types depending on the
number of inputs they have and how these inputs
affect the outputs.
The most common types of flip flops are:
• SR Flip- Flop
• D Flip- Flop
• JK Flip- Flop
• T Flip- Flop
Flip-Flops
• SR (set-reset) Flip- Flop
– Can be constructed using two NOR gates
– There are two inputs (S & R) and two outputs (Q &
Q’)
S R Q
R Q 0 0 hold
0 1 0
1 0 1
S Q' 1 1 disallow
Flip-Flops
• SR Flip Flops S R Q0 Q Q’
0 0 0 0 1
Q = Q0
0 0 1 1 0
0 1 0 0 1
R 1
Q=0
10 0 1 1 0 1
Q 1 0 0 1 0
Q=1
1 0 1 1 0
1 1 0 0 0 Q = Q’
1 1 1 0 0 Q = Q’
S Q
1 0
Flip-Flops
• SR Flip- Flop
Flip-Flops
• Disadvantages of SR flip flop
1. It needs two data inputs a high S to store a 1 bit
and a high R to store 0 bit
• Generation of two signals to drive a flip flop is difficult in
many applications
2. The SR flip flop puts a forbidden(invalid)
condition that both S and R can not be high at the
same time
Flip-Flops
D Flip Flop
• The D (Data) flip flop is a slight modification of SR flip flop
• SR flip flop is converted to D flip flop by inserting an
inverter b/n S and R and assigning the symbol D to the
signal input
Flip-Flops
JK Flip Flop
• Is a refinement of the SR flip flop in that the
indeterminate condition of the SR type is define
in the JK type
• Inputs J and K behave like inputs S and R to set
and clear the flip flop, respectively
• When inputs J and K are both equal to 1, a clock
transition switches the outputs of the flip flop to
their complement state.
Flip-Flops
JK Flip Flop
• Instead of the indeterminate condition, the JK
flip flop has a complement condition
T Flip Flop
Flip-Flops
• T(Toggle) flip flop is obtained from a JK flip flop when
inputs J and K are connected to provide a signal input
designated by T. (both J and K inputs are always equal)
• 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
Sequential Circuits
• Is an interconnection of flip flops and gates
/combinational circuits/
• the current output of a sequential circuit depends on the
current input and the current state of that circuit.
• Remembering the past is the key feature of
sequential circuits.
Sequential Circuits
The two major uses of Sequential circuits in digital
systems are:
As memories to store information while processing
As control circuits to generate control signals which
are essential to select and enable a sequence of data
transfer or data processing steps in the execution of
multistep tasks
Examples
Registers
Counter
Registers
• An n-bit register has a group of n flip-flops and is capable
of storing any binary information of n bits.
• In addition to flip-flops, registers can have combinational
gates that perform certain data-processing tasks.
– The gates control how and when new information is
transferred into the registers.
• The transfer of new information into a register is referred
to as a loading the register.
• If the loading occurs simultaneously at a common clock
pulse transition, we say that the load is done in parallel.
Registers
• The load input in a register determines the action to be
taken with each clock pulse.
• When the load input is 1, the data from the input lines is
transferred into the register's flip-flops.
• When the load input is 0, the data inputs are inhibited and
the flip-flop maintains its present state.
• 4 bit register
Counter
• Counter is a sequential circuit consisting of a
set of flip-flops which can go through
sequence of states.
• It is used to count the number of clock cycles.
Since the clock pulses occur at known
intervals.
• The counter can be used for measuring time
such as period or frequency.
Integrated Circuits (IC)
• Digital circuits are constructed with integrated circuits
• The various gates are interconnected inside the chip to form
the required IC
• An IC is a piece (also called a chip) of silicon on which
multiple gates or transistors have been embedded
• These silicon pieces are mounted on a plastic or ceramic
package with pins along the edges that can be soldered onto
circuit boards or inserted into appropriate sockets