Unit 1 Basic Structure of Computers: Deepa.T.P
Unit 1 Basic Structure of Computers: Deepa.T.P
Unit 1 Basic Structure of Computers: Deepa.T.P
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.1, PAGE NO: 2 PREPARED BY: DEEPA.T.P.
Personal Computers: Desktop Computers: used Personal Notebook
used in homes, schools, in homes, schools, Computer: compact
businesses businesses version of personal Enterprise system and server- low
computer end ,Mainframes, large, powerful,
business data at large corporations,
more storage capacity
Types of Computers
Supercomputer: communication
support, high end of servers, large
data
Workstation: Engineering
applications
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.1, PAGE NO: 2 PREPARED BY: DEEPA.T.P.
Functional Units
Keywords to Remember
1. Input Unit
2. Output Unit
3. Memory Unit
4. Arithmetic Logic Unit
(ALU)
5. Control Unit
6. Processor
7. Instructions
8. Data
9. Program
10. Stored Program
11. Object Program Basic Function Units of Computer
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.2, PAGE NO: 3-7, Fig: 1.1 PREPARED BY: DEEPA.T.P.
Basic Operational
Concepts
Keywords to Remember
1. Instruction Register (IR)
2. Program Counter (PC)
3. Memory Address Register (MAR)
4. Memory Data Register (MDR)
5. Interrupt Service Routine (ISR)
Video
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.3, PAGE NO: 7-9. Fig: 1.2(page:8) PREPARED BY: DEEPA.T.P.
Bus Structures
Keywords to Remember
1. Bus
2. Data Bus
3. Address Bus
4. Control bus
5. Single Bus
6. Multi Bus
7. Buffer Register
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.4, PAGE NO: 9-10. Fig: 1.3(page:10) PREPARED BY: DEEPA.T.P.
Softwares
Set of instructions with deliverables
Types of Software
System Software
Application software
System software is a collection of programs to perform the following functions-
• Receiving and executing user commands
• Editing application programs and storing them in secondary memory.
• Managing and retrieving files from secondary storage.
• Running standard application programs.
• Controlling Input-Output devices.
• Translation of programs to machine instructions
• Linking and running user programs
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.4, PAGE NO: 9-10. Fig: 1.3(page:10) PREPARED BY: DEEPA.T.P.
Softwares (Contd…)
Activity 1
Source: https://www.thecrazyprogrammer.com/2016/04/difference-system-software-application-software.html PREPARED BY: DEEPA.T.P.
Softwares (Contd…)
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.5, PAGE NO: 9-10. Fig: 1.4(page:12) PREPARED BY: DEEPA.T.P.
Performance
Main Performance Measure
1. Speed
2. Elapsed time
3. Processor Time
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.1, PAGE NO: 14. PREPARED BY: DEEPA.T.P.
Source: http://www.tambelanblog.com/2007/11/definitions-of-kilo-mega-giga-tera-peta.html
Basic Performance Equation
𝑵𝑿𝑺
𝑻=
𝑹
Where,
T is the processor time required to execute high level language program.
N is actual number of instructions in execution.
S is the average number of basic steps needed to execute one machine instruction.
R is the clock rate.
N,R,S are dependent parameters.
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.1, PAGE NO: 14. PREPARED BY: DEEPA.T.P.
Instruction set – CISC and RISC
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.5, PAGE NO: 16-17. PREPARED BY: DEEPA.T.P.
Instruction set – CISC and RISC
1. Need for instruction set which has less steps for performing operations.
2. Two approaches to increase CPU performance
A. CISC – Complex Instruction set
Minimizes number of instructions per program but increases number of cycles per
instruction.
B. RISC- Reduced Instruction set
Reduces cycles per instructions but increases number of instructions per program.
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.6, PAGE NO: 17. PREPARED BY: DEEPA.T.P.
Compiler
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.6, PAGE NO: 17. PREPARED BY: DEEPA.T.P.
Performance Measurement
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.7, PAGE NO: 17. PREPARED BY: DEEPA.T.P.
Performance Measurement
SPEC Rating is 50% means, computer under test is 50 times faster than UltraSPARC10 for this
particular program (benchmark)
IF SPECi is the rating for program I in the suite, the overall SPEC rating for the computer is given by-
𝟏
𝒏 𝒏
𝑨 = ෑ 𝑺𝑷𝑬𝑪𝒊
𝒊=𝟏
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.6.7, PAGE NO: 18. PREPARED BY: DEEPA.T.P.
SPEC Rating Example
SPEC ratios are shown for the Pentium and the Pentium Pro (Pentium+) processors. What can
we learn from this information?
processors.
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.7, PAGE NO: 18. PREPARED BY: DEEPA.T.P.
Multicomputer
Source: https://www.geeksforgeeks.org/computer-
architecture-multiprocessor-and-multicomputer/
Source: TEXT NO:1, CHAPTER NO:1, TOPIC NO:1.7, PAGE NO: 19. PREPARED BY: DEEPA.T.P.
Exercise 1
Give a short sequence of machine instructions for the task “Add the contents of memory-location A to those
of location B and place the answer in location C. Instructions available to transfer data between memory and
the general purpose registers –
Load LOC , Ri
Store Ri, LOC
Solution :
1. Load A into loc using Load A, R0 Instructions are-
2. Load B into loc using Load B, R1 Load A, R0
3. Add A and B values in Registers R0 and R1 using Add R0,R1 Load B, R1
4. Store the result in C using Store R1, C Add R0,R1
Store R1, C
Solution :
The program execution time is given by,
𝑵𝑿𝑺
𝑻=
𝑹
here, N= 1000, S=20, R=800 X 10-6, Applying this in T, T= 1000 X 20 / (800 X 10-6)
T= 25 X 10-6 = 25 micro seconds
PC MAR R1
ALU
R2
Command MEMORY
R1+R2 in ALU R3
Word MDR
PC ALU
MDR IR
ALU= ALU + 1 PC
Source: TEXT NO:1, PROBLEMS: 1.1, Page No: 22
Exercise 4
A program contains 1000 instructions. Out of that 25% instructions requires 4 clock cycles, 40% of
instructions requires 5 clock cycles and remaining require 3 clock cycles for execution. Find the total time
required to execute the program running in a 1 GHz machine.
Solution:
N=1000, R= 1 X 109, S is different for various values of N.
NXS can be computed as –
25 % of N required 4 clock cycles, means 250 instructions require 4 clock cycles, NXS= 250 X 4
40 % of N requires 5 clock cycles, 400 instructions require 5 clock cycles, NXS= 400 X 5
Remaining 35% of N requires 3 clock cycles, NXS= 350 X 3
Therefore, total clock cycles required for 1000 instructions, NXS= (250X4) + (400 X 5) + (350 X 3)
Performance Equation,
𝑵𝑿𝑺
𝑻=
𝑹
1. Give a short sequence of machine instructions for the task “Add the contents of memory-location A to
those of location B and place the answer in location C. Instructions available to transfer data between
memory and the general purpose registers –
Move location1, location2
Add location1, location2
– Positive Integers
– Zero included
– Unsigned Numbers
• 1 for negative
OR
± m X r±e
Where, m is mantissa
r is radix
e is exponent
There are 3 Zeroes in the left-most digits. This can be normalized by shifting 3 Zeroes towards
left and discarding leading zeroes. Along with 23 for 3 shifts.
The normalized form is 101010000
Lets represent the above number as 28 + 0.125, Now convert 28 into binary.
(28)10 = (11100)2
Therefore,
*Binary point is not physically present in the register, but its presence is
assumed.
31 30 15 0
Sign Integer Fraction
1-bit 15-bits 16-bits
Fixed Point Representation
In Fixed Point Notation, the number is stored as a signed integer in two’s complement
format.
Signed representation: range from
-(2(k-1)-1) to (2(k-1)-1), for k bits.
2’s complementation
representation: range from -(2(k-
1)) to (2(k-1)-1), for k bits.
Source: https://andybargh.com/fixed-and-floating-point-binary/#Fixed_Point_Representation
Text Books