Chapter -I
Computer SYSTEM
Introduction to Computer
Architecture and Organization
What are the components of The Computer System?
Abstract view of computer system components
Computer System Components
1. Hardware – provides basic computing resources (CPU, memory,
I/O devices). “The hardware is the primary focus of this course.”
2. Operating system – controls and coordinates the use of the
hardware among the various application programs for the various
users
3. Applications programs – define the ways in which the system
resources are used to solve the computing problems of the users
(compilers, database systems, video games, business programs)
4. Users (people, machines, other computers)
What is computer?
A computer is a machine that performs computational tasks using
stored instructions
Digital computers use the binary number system (two digit values)
Binary number system: Has two digits: 0 and 1
A computer hardware consist of three major parts:
1) Central processing unit (CPU)
2) Memory (RAM: Random Access Memory)
3) Input-output processors (IOP) interface
What is computer Architecture?
Computer architecture is concerned with the structure and behavior
of the various functional modules of the computer and how they
interact to provide the processing needs of the user
Computer Architecture = Instruction Set Architecture(ISA)
+ Machine Organization
ISA = attributes of the computing system as seen by the programmer
Organization of programmable storage
Data types & data structures
Instruction set
Instruction formats
Modes of addressing (memory addressing),
Exception handling
CPU, I/O, memory
What is computer Organization?
Computer organization(CO) is concerned with the way the hardware
components are connected together to form a computer system. It is
about how the hardware components are actual connected and
interoperate with in the system
Machine organization:
Capabilities & performance characteristics of principal functional units
(e.g., Registers, ALU, logic units, shifters)
Ways in which these components are interconnected
Information flow between components
Logic and means by which such information flow is controlled
CO shows how different parts of a computer system work in-line with
the architectural specification
Fig. Different parts of computer system
Computer Hardware
CPU
Memory
Program memory(ROM)
Data memory(RAM)
I/O devices
Interfaces
Input devices(keyboard, mouse..)
Output devices(printer, display…)
Storage devices
*These devices communicate to each other through a set
of electric wires called bus
Central Processing Unit (CPU)
The part of the computer performs the bulk of data
processing operations is called the central processing
unit
It’s the “brain” of a computer
It executes programs by:
Fetching and decoding the next instruction from memory
Execute it
The CPU is made up of three major parts:
Control Unit
Arithmetic Logic Unit (ALU)
Registers (high-speed memory)
Central Processing Unit (CPU)
Register set: Stores intermediate data during the
execution of instructions;
Fast, small memory for temporary storage during
mathematical operations
Arithmetic logic unit (ALU): Performs the required
micro-operations for executing the instructions;
Executes arithmetic (addition, multiplication,...) and logical
(AND, OR, NOT...) operations
Control unit: supervises the transfer of information
among the registers and instructs the ALU as to which
operation to perform by generating control signals
Generates a sequence of control signals telling the ALU how
to operate; reads and executes microprograms stored in a
read only memory (ROM)
Central Processing Unit (CPU)
CPU
Fig. Simple Diagram of Computer
Organization
How does the computer run a program?
“The control unit (CU) reads each instruction of a
program from memory (RAM) and places it in a
control register.
It then interprets the binary code of the instruction
and proceeds to execute it by issuing a sequence
of microoperations; the famous fetch-decode-
execute cycle.”
Digital Computer
Devices capable of solving problems by processing information in
discrete form
The word digit implies that the information in the computer is
represented by variables that takes a limited number of discrete values.
In the modern world of electronics, the term Digital is generally
associated with a computer because the term Digital is derived from the
way computers perform operation, by counting digits.
Digital Computer
It operates on data, including magnitudes, letters, and symbols, that
are expressed in binary code(only two possible states, off and on,
usually symbolized by 0 and 1)—i.e., using only the two digits 0
and 1.
In practice digital computers function more reliably if only two states
are used.
Digital computers use the binary number system (two digit values)
Binary number system: Has two digits: 0 and 1
Digital Computer…
In contrast to analog computers, digital computers represent
information in discrete form, generally as sequences of 0s and 1s
(binary digits, or bits)
But, analog computers use continuous physical magnitudes to
represent quantitative information
Digital Computer…
Random Access Memory
(RAM)
Central Processing Unit
(CPU)
Input Input-Output-Processor Output
devices (IOP) devices
Block-diagram of Digital computer
Logic Gates
A gate is a circuit with one or more input and a
single output
A logic gate is a circuit that switches between
precisely two states (high/1 or low/0)
Logic Gates
Formal logic: In formal logic, a statement (proposition) is a
declarative sentence that is either true (1) or false (0)
It is easier to communicate with computers using formal logic
Boolean variable: Takes only two values – either true (1) or false (0).
There is no such thing as "in between" or "it has no value". If a
variable is not TRUE, then it must be FALSE
They are used as basic units of formal logic
Gates refer to the hardware to implement Boolean operators
Logic Gates
The digital computer processes binary information represented by
physical quantities called signals
In the digital computer, electrical signals such as voltages exist in
either one of two recognizable states (say either +3 volt to represent
binary 1 or 0.5volt to represent binary 0)
But, as far as manipulation and processing of binary information is
concerned we can treat the two distinct voltage levels to be equal to
1or 0
The manipulation of binary information is done by logic circuits called
gates
Logic Gates
The input-output relationship of the binary variables for each gate can
be represented in tabular form by a Truth table.
Logic Gates
There are a variety of logic gates with distinct
truth tables
There are 3-basic gates are:
AND
OR
Inverter (NOT)
Variety of logic gates with distinct truth tables
Variety of logic gates with distinct truth tables
Note: Buffer is used to temporarily hold (store) data which it is
being moved from one place to another place
The following gates are inverse of each other;
NAND=AND’
NOR=OR’
XNOR=XOR’
Both NAND and NOR gates may have more than two inputs, and the
output is always the complement of the AND or OR function
respectively
Boolean Algebra
Boolean algebra: is an algebra that deals with binary variables and
logic operations operating on those variables. The variables are
designed by letters such as A, B, x, and y.
Boolean variable: Takes only two values – either true (1) or false (0)
They are used as basic units of formal logic
Boolean function: can be expressed algebraically with binary
variables, the Boolean function can be either 1 or 0.
Eg F=x + y’z
Mapping from Boolean variables to a Boolean value
Boolean Algebra
Boolean Algebra deals with binary variables (F, x,y, z… ) and logic
operations (AND, OR, NOT…)
Logic diagram: Composed of graphic symbols for logic gates
A simple circuit sketch that represents inputs and outputs of Boolean
functions
Boolean Function: variable + operation
F (x, y, z) = x + y’z
The relationship between F and x, y and z can be put in table form.
This table is called the truth table of F
Boolean Algebra
Truth table:
Represents relationship between a Boolean function and its binary variables
To represent a function in truth table we need a list of the 2n combination of
the n binary variables
e.g. Boolean Function: F (x, y, z) = x + y’z
Truth table: Relationship between a function and
variables
Boolean Algebra
Postulates:
There are only two values: 0 and 1
Algebra based the set {0,1}
0 & 1 are called Boolean constants
There are three basic Boolean operations:
OR (+)
AND (.) Binary operations
Unary operation: NOT (’)
Boolean Algebra
Boolean expressions: are made up of the Boolean constants 0, 1 and the three
operations shown above
Boolean Algebra
A Boolean function can be transformed from an algebraic
expression into a logic diagram composed of AND, OR
and inverter(NOT) gates
Logic diagram: Composed of graphic symbols for logic
gates. A Boolean function can be transformed from an
algebraic expression into a logic diagram composed of
AND, OR and Inverter gates. Example F= x + y’z
Boolean Algebra
A simple circuit sketch that represents inputs and
outputs of Boolean functions
E.g. F (x, y, z) = x + y’z
Fig. Logic diagram
BASIC IDENTITIES OF BOOLEAN ALGEBRA
Function Minimization using Boolean algebra:
Examples:
(a) x + xy = x(1+y)=x
(b) x(x + y) = x.x +xy=x+xy=x(1+y)=x
What did we gain by simplifying the original expression?
Cost, Latency
Example: Simplify the following expression and draw its original and
simplified expression logic gates
F= ABC+ ABC’ +A’C
Function Minimization using Boolean algebra:
F= ABC+ ABC’ +A’C
=AB(C + C’) + A’C =>Remember i.e C+C’ = 1
=AB + A’C
Combinational circuits
Is a connected arrangement of logic gates (AND,
OR, NOT, NAND etc.) with a set of inputs and
outputs
Combinational circuit = Gate
Fig. Block diagram of combinational
circuit
Combinational circuits
The combinational circuits are employed in digital computer for
generating binary control decisions and for providing digital
components required for data processing
To demonstrate the design of the combinational circuits, we represent
two examples of simple arithmetic circuits.
Half Adder
Full Adder
Combinational circuits…
Half Adder
The most basic digital arithmetic circuit is the addition of two binary
digits
A combinational circuit that performs the arithmetic addition of two
bits is called a Half-adder
The input variables of half-adder are called the augend and addend
bits
The output variables sum and carry
Combinational circuits…
Half Adder
It is necessary to specify two output variables because the sum of 1
+ 1 is binary 10, which has two digits.
S= x’y + xy’ =x⊕Y => exclusive-OR gate
C= xy => AND gate
Fig. Half-Adder
Combinational circuits…
Full Adder
A full adder is a combinational circuit that forms the arithmetic sum of
three input bits
It consists of three inputs and two outputs
Two outputs are necessary because the arithmetic sum of three
binary digits ranges from in values from 0 to 3 and binary 2 or 3
needs two digits.
Combinational circuits…
Full Adder
S= x⊕y ⊕z
C= xy + (x⊕y)z
Fig. Full Adder
Flip-Flops
Digital circuits
Combinational digital components
Decoder
Encoder
Multiplexer
Demultiplexer
Decoder
A combinational circuit that converts
binary information from the n coded
inputs to a maximum of 2n unique
outputs
n-to-m line decoder = n × m decoder
n inputs, m output (e.g. 2 × 4 dec, 3 × 8 dec, 4 × 16 dec
etc.)
Encoder (ENC)
Inverse operation of a decoder
2 input, n output
n
m inputs, n output (e.g. 4 × 2 enc, 8 ×
3 enc, 16 × 4 enc etc)
Multiplexer (MUX)
A combinational circuit that receives binary
information from one of 2n input data lines and directs
it to a single output line
Has a multiple inputs(sources) and a single
output(destination )
A 2n to 1 multiplexer has 2n input data lines and n
input selection lines (Data selector)
(e.g. 2 × 1 MUX, 4 × 1 MUX, 8 × 1 MUX etc.)
MUX types:
2-to-1 (has 1 select line)
4-to-1 (has 2 select lines)
8-to-1 (has 3 select lines)
16-to-1 (has 4 select lines)
Fig. Block diagram of
MUX
Multiplexer (MUX)
Example of 4-to1 Multiplexer (MUX)
Uses of Multiplexer
Computers:
Networking, USB, SATA , etc.
All utilizes different forms of multiplexing in order to
carry a lot of information on very few wires
This makes connecting of these devices very easy
Stereo systems:
CD-Players utilizes multiplexing in order to transfer
data/music digitally to a digital input
Amplifiers with digital output utilize multiplexing
This makes it easily possible to carry 6 channels of
sound in only one fiber cable
Demultiplexer (DEMUX)
A DEMUX is a digital switch with a single
input(source) and a multiple outputs
The select lines determine which output the input is
connected to
1 input to 2n outputs
(e.g. 1 × 2 DEMUX, 1 X 4 DEMUX, 1 x 8 DEMUX etc.)
DEMUX types:
1-to-2 (has 1 select line)
1-to-4 (has 2 select lines)
1-to-8 (has 3 select lines)
1-to-16 (has 4 select lines)
Demultiplexer (DEMUX)
A example of 1-to-4 Demultiplexer (DEMUX)
Typical Application of a DEMUX
Sequential circuits (SC)
Sequential circuits consist of a combinational circuit and some memory
elements(flip-flops)
Flip-flop is the storage elements employed in clocked sequential circuits
Flip-flop has a binary cell capable of storing one bit of information
The memory elements are used to store information about the past
Therefore, in sequential circuits, the present inputs and the history of
the circuit determine the outputs
The history of the circuit is a summary of the past inputs
Sequential circuits (SC)
The memory elements used in sequential circuits are called flip-flops
(F/F)
Flip-flops can store or remember a 0 or a 1 (a Boolean value)
So, flip-flops can store a one-bit data (information)
The value stored in a flip-flop is called the state of the flip-flop
Sequential circuits (SC)
A sequential circuit is an interconnection of Flip-flops(F/F) and gates
Sequential circuit= Gate + Flip-flop(F/F)