Introduction to computer architecture
Introduction to computer architecture
Computer Architecture
(24CSE107)
M. Sankara Prasanna Kumar, B. Tech., M. Tech., Ph.D.
Assistant Professor, Department of AIDE
JAIN Deemed-to-be University, Global Campus
Exp: 17+ Years in Industry(2), Academia(15)
Module 1
Digital Logic Circuits: Basic Logic Functions, Synthesis of Logic Functions Using
AND, OR, and NOT Gates, Minimization of Logic Expression, Synthesis with NAND
• Primary Memory Primary memory, also called main memory, is a fast memory that operates at
electronic speeds.
• The number of bits in each word is referred to as the word length of the computer, typically 16,
32, or 64 bits.
• A memory in which any location can be accessed in a short and fixed amount of time after
specifying its address is called a random-access memory (RAM).
• The time required to access one word is called the memory access time. (MAT)
• This time is independent of the location of the word being accessed. It typically ranges from a
few nanoseconds (ns) to about 100 ns for current RAM units
Cache memory
• Smaller, faster RAM unit, called a cache, is stored between CPU and main memory.
• The cache is tightly coupled with the processor and is usually contained on the same
integrated-circuit chip.
• The purpose of the cache is to facilitate high instruction execution rates at faster execution
rates.
• As execution proceeds, instructions are fetched into the processor chip, and a copy of each is
placed in the cache.
• When the execution of an instruction requires data, located in the main memory, the data are
fetched and copies are also placed in the cache.
Secondary Storage
• Secondary Storage are additional, less expensive is used to store large amounts of data .
• Access times for secondary storage are longer than for primary memory.
• The devices available are including magnetic disks, optical disks (DVD and CD), and flash
memory devices.
Output Unit
• laser printers, or ink jet streams. Such printers may generate output at speeds of 20 or more pages
per minute.
• Graphic displays provide both an output function showing text and graphics and an input
function, through touchscreen capability.
Summarisation of Operations of a Computer
• The operation of a computer can be summarized as follows:
• The computer accepts information in the form of programs and data through an input unit and
stores it in the memory.
• Information stored in the memory is fetched and send to arithmetic and logic unit where it is
processed.
• Processed information leaves the computer through an output unit.
• All activities in the computer are directed by the control unit.
Basic operational Concepts
Types of special purpose Register
• PC (program Counter) Keep track of the program which are being executed.
• MDR(Memory Data Register) Data which is read from the main memory.
Arithmetic and Logic Unit(ALU)
• Computer operations are executed in the arithmetic and logic unit (ALU) of the processor.
• When operands are brought into the processor, operations are stored in high-speed storage
elements called registers.
• Access times to registers are even shorter than cache unit on the processor chip.
Control Unit
• The control unit controls and coordinate all the activities that sends control signals to other
units.
• Memory, arithmetic and logic, and I/O units store and process information and perform input
and output operations.
• Control units are responsible for generating the timing signals that govern the transfers.
• Data transfers between the processor and the memory are also managed by the control unit
through timing signals.
• A large set of control lines carries the signals used for timing and synchronization of events in
all units.
Registers
• Register serves as a quick memory for accepting, storing, and sending data and instructions to
the CPU .
• A register is a collection of flip-flops, Single bit digital data is stored using flip-flops.
• A flip-flop is a sequential digital electronic circuit having two stable states that can be used to
store one bit of binary data. Flip-flops are the fundamental building blocks of all memory
devices.
• By combining many flip-flops, the storage capacity can be extended to accommodate a huge
number of bits.
Operations performed in registers
• Fetch: The Fetch Operation is used to retrieve user-provided instructions that have been stored
in the main memory. Registers are used to fetch these instructions.
• Decode: The Decode Operation is used to interpret the Instructions, which means that the CPU
will determine which operation has to be carried out on the instructions after the Instructions
have been decoded.
• Execute: The CPU manages the execute operation. The results that the CPU generates are then
stored in the memory before being presented on the user screen.
Types of Registers
• Types of Registers:
• Status and control register report and allow the modification of the state of the processor and
of the program to be executed.
• Instruction Format: Address 0-11 bits & Opcode 12-14 bits & 14-15 bits
General-Purpose Data Registers
• General purpose registers are extra registers that are present in the CPU and are utilized anytime
data or a memory location is required.
• Memory pointers
BUS Structure
• A bus used to communicate between the major components of a computer is called a System bus.
Block Diagram of Bus Structure
Categories of Bus Structure
System bus contains 3 categories of lines used to provide the communication between the CPU,
memory and IO named as:
1. Address lines (AL) 2. Data lines (DL) 3. Control lines (CL)
1. Address Lines:
•Unidirectional.
• Based on the width of an address bus we can determine the capacity of a main memory
Data Lines
• 2. Data Lines:
• Used to carry the binary data between the CPU, memory and IO.
• Bidirectional.
• Based on the width of a data bus can determine the word length of a CPU.
• 3. Control Lines:
• Timing Signals are used to synchronize the memory and IO operations with a CPU clock.
• Typical Control Lines may include Memory Read/Write, IO Read/Write, Bus Request/Grant,
etc.
Performance
• Performance refers to the speed and efficiency at which a computer system can execute tasks and
process data.
1. Processor speed: The speed of the processor, measured in GHz (gigahertz), determines how quickly
the computer can execute instructions and process data.
2. Memory: The amount and speed of the memory, including RAM (random access memory) and
cache memory, can impact how quickly data can be accessed and processed by the computer.
3. Storage: The speed and capacity of the storage devices, including hard drives and solid-state
drives (SSDs), can impact the speed at which data can be stored and retrieved.
4. I/O devices: The speed and efficiency of input/output devices, such as keyboards, mice, and
displays, can impact the overall performance of the system.
5. Software optimization: The efficiency of the software running on the system, including operating
systems and applications, can impact how quickly tasks can be completed.
Factor for improving Performance
• Optimizing Software
• 1. Multiprocessor:
A Multiprocessor is a computer system with two or more central processing units (CPUs) share
full access to a common RAM.
• The main objective of using a multiprocessor is to boost the system’s execution speed, with other
objectives being fault tolerance and application matching.
• There are two types of multiprocessors, one is called shared memory multiprocessor and
another is distributed memory multiprocessor.
• In shared memory multiprocessors, all the CPUs shares the common memory but in a
distributed memory multiprocessor, every CPU has its own private memory.
Motherboard with Two Intel Quad-Core Xeon Processors
X
Multi Processor
Applications of Multi Processor
2. As a multiprocessor, such as single instruction, multiple data stream (SIMD), which is usually
used for vector processing.
3. Multiple series of instructions in a single perspective, such as multiple instruction, single data
stream (MISD), which is used for describing hyper-threading or pipelined processors.
4. Inside a single system for executing multiple, individual series of instructions in multiple
perspectives, such as multiple instruction, multiple data stream (MIMD).
Multi Computer
• It is a computer system with multiple processors that are connected together to solve a
problem.
• Each processor has its own memory and it is accessible by that particular processor and those
processors can communicate with each other via an interconnection network.
• 0 0 0 0 0 0 0 1 0 0 0
• 0 0 0 0 0 0 1 0 0 0 1
• 0 0 0 0 0 1 0 0 0 1 0
• 0 0 0 0 1 0 0 0 0 1 1
• 0 0 0 1 0 0 0 0 1 0 0
• 0 0 1 0 0 0 0 0 1 0 1
• 0 1 0 0 0 0 0 0 1 1 0
• 1 0 0 0 0 0 0 0 1 1 1
Implementation
Decoder
• The combinational circuit that change the binary information into 2N output lines is known
as Decoders.
• The binary information is passed in the form of N input lines. The output lines define the 2N-bit
code for the binary information
• In simple words, the Decoder performs the reverse operation of the Encoder.
• At a time, only one input line is activated for simplicity. The produced 2N-bit output code is
equivalent to the binary information.
8:3 Decoder
TRUTH TABLE
De-Multiplexers
• A De-multiplexer (De-Mux) can be described as a combinational circuit that performs the reverse
operation of a Multiplexer.
• A De-multiplexer has a single input, 'n' selection lines and a maximum of 2^n outputs.
• The following image shows the block diagram of a 1 * 4 De-multiplexer.
Function Table 4*1
Circuit Diagram
Implementation of 3AND and 1 OR
Programmable Logic Array(PLA)
• Programmable Logic Array(PLA) is a fixed architecture logic device with programmable AND
gates followed by programmable OR gates.
• Basic block diagram for PLA:
Truth Table
• F1 = AB’C’ + ABC’ + ABC
on simplifying we get : F1 = AB + AC
• F2 = A’BC + AB’C + ABC
on simplifying we get: F2 = BC + AC
Circuit Diagram
Digital Logic Circuits
• Digital logic circuits are the basis of digital systems. These logic circuits are a set of logic gates
that show logical equivalence between two different groups of binary numbers.
• These digital logic circuits use 1 and 0 for on/off conditions, where 1 represents on, and 0
represents off conditions.
• Digital Logic Circuits are digital devices that use logic gates, ALU’s, microprocessors, RAM,
ROM to control other circuits. It is a specific form of logic circuit that processes the numerical
values 0 and 1.
Logic Circuits
• Digital circuits are also called logical circuits because they perform logical operations on digital
signals. Digital circuits use logic gates like AND, OR, NOT, NAND, and NOR to perform the
required digital operations.
• A digital circuit is a circuit containing digital logic. Digital circuits are the most common physical
implementation of Boolean algebra and binary arithmetic and are the basis of all modern
computers.
• It is because digital circuits are mainly used to process data that has only two values, such as true
or false.
• In other words, it can be said that a digital circuit’s primary function is to process the information
that manages the binary system. Digital circuits are called logical circuits because they perform
logical operations and produce results that can be interpreted as True or False.
Types of Digital Logic Circuits:
• 1. Synchronous Systems:
• Synchronous systems include clocks, our circadian rhythms, and periodic phenomena such as tides and waves.
In electronics, an synchronous system is a system in which the temporal behaviour of di fferent elements is
related to each other. The timing of events in Synchronous systems depends on the signals clock.
• 2. Asynchronous Systems:
• Asynchronous systems send out messages and perform operations in parallel without the need to wait for a
response. This means that different processes can co-occur; that is, multiple functions can be running
simultaneously.
• 3. Combinational Logic Circuits:
• Combinational logic is a form of digital logic in which an input pattern is applied to a circuit, and the output
pattern depends only on this input pattern. Logic gates are undoubtedly one of the most basic and essential
building blocks of digital circuits.
• 4. Sequential Networks:
• The sequence network is a type of balance equivalent network that is used for the balance power system.
Invest and imagined working condition is set so that only one sequence component can be present in the voltage
and current.
Basics of Logic Gates
• Logic gates are used to carry out logical operations on single or multiple binary inputs and give
one binary output. In simple terms, logic gates are the electronic circuits in a digital system.
• Types of Basic Logic Gates
• There are several basic logic gates used in performing operations in digital systems. The common
ones are
• OR Gate
• AND Gate
• NOT Gate
• XOR Gate
• Additionally, these gates can also be found in a combination of one or two. Therefore, we get other
gates, such as NAND Gate, NOR Gate, and EXNOR Gate.
OR GATE
• OR Gate
• In an OR gate, the output of an OR gate attains state 1 if one or more inputs attain state 1.
A B Y A B Y
0 0 0 0 0 0
0 1 1 0 1 1
1 0 1 1 1 1
1 1 1 1 0 1
AND GATE
• AND Gate
• In the AND gate, the output of an AND gate attains state 1 if and only if all the
inputs are in state 1. The Boolean expression of AND gate is Y = A.B
A B Y A B Y
0 0 0 0 0 0
0 1 0 0 1 0
1 0 0 1 1 1
1 1 1 1 0 0
NOT GATE
• NOT Gate
• In a NOT gate, the output of a NOT gate attains state 1 if and only if the input does not attain state
1.
• The Boolean expression is
Y=A
• It is read as Y equals NOT A.
• The truth table of NOT gate is as follows
A Y
0 1
1 0
NAND GATE
• NAND Gate
• This basic logic gate is the combination of AND and NOT gates.
• The Boolean expression of the NAND gate is
• Y=A.B
• The truth table of a NAND gate is given as
A B Y
0 0 1
0 1 1
1 0 1
1 1 0
NOR GATE
• NOR Gate
• This gate is the combination of OR and NOT gates.
• The Boolean expression of the NOR gate is
• Y=A+B
A B Y
0 0 1
0 1 0
1 0 0
1 1 0
Exclusive-OR gate (XOR Gate)
• A.B+A.B or Y=A + B
A B Y
0 0 0
0 1 1
1 0 1
1 1 0
Synthesis of digital circuits
• Synthesis is the process of generating a circuit that realizes a functional behavior of a
logic system from a given description (stated in form of verbal statements, truth table,
K-map, state diagram, etc.)
• Example: Synthesize a logic function that realizes the following truth table. Use AND,
OR, and NOT gates
X1 X2 F(X1,X2)
0 0 1
0 1 1
1 0 0
1 1 1
Synthesis of Digital Circuits
• Two implementations of a function
•
Synthesis of Digital Circuits
Row F(X1,X2,
X1 X2 X3
Number X3)
0 0 0 0 0
1 0 0 1 1
2 0 1 0 0
3 0 1 1 0
4 1 0 0 1
5 1 0 1 1
6 1 1 0 1
7 1 1 1 0
Synthesis of Digital Circuits
Minimization of Logic EXPRESSIONS
• K-map can take two forms Sum of Product (SOP) and Product of Sum (POS)
according to the need of problem. K-map is table like representation but it
gives more information than TRUTH TABLE. We fill grid of K-map with 0’s and
1’s then solve it by making groups.
• Steps to solve expression using K-map-
1.Select K-map according to the number of variables.
2.Identify minterms or maxterms as given in problem.
3.For SOP put 1’s in blocks of K-map respective to the minterms (0’s elsewhere).
4.For POS put 0’s in blocks of K-map respective to the maxterms(1’s elsewhere).
5.Make rectangular groups containing total terms in power of two like 2,4,8 ..
(except 1) and try to cover as many elements as you can in one group.
6.From the groups made in step 5 find the product terms and sum them up for
SOP form.
SOP Form K-Map for 3 variable
Z=
∑A,B,C(1,3,6,7)
SOP Form K-Map for 4 Variable
F(P,Q,R,S)=∑(0,2,5,7,8,10,13,
15)
POS FORM K-Map for 3 variable
F(A,B,C)=π(0,3,6,7)
POS FORM K-Map for 4 variable
F(A,B,C,D)=π(3,5,7,8,10,11,12,
13)
Flip Flop
• Flip-flop is a circuit that maintains a state until directed by input to change the
state. A basic flip-flop can be constructed using four-NAND or four-NOR
gates. Types of flip-flops:
The "T Flip Flop" is designed by passing the AND gate's output as input
to the NOR gate of the "SR Flip Flop".
The simplest construction of a D Flip Flop is with JK Flip Flop. Both the
inputs of the "JK Flip Flop" are connected as a single input T.
Outcomes:
a. Discuss the theory functionality and basic architecture of
CPU
b. Discuss the Design Issues on the basis of speed,
Technology, cost and performance.
c. Illustrate the different Logic Gates and Minimization of
Logic gates.
Terminal Questions
1) What are the different types of Logic Gates?
2) What is Encoders?
Reference Links
• https://www.geekforgeeks.org/computer organization
Reference Material:
• William Stallings "Computer Organization and Architecture”,6Th
Edition,Pearson/PHIISBN:10:0-13-609704-9
Thank you