Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Learning Objectives
§ Computer
§ Data processing
§ Characteristic features of computers
§ Computers’ evolution to their present form
§ Computer generations
§ Characteristic features of each computer generation
Computer
Data Processing
Capture Data
Manipulate Data
Output Results
Information
Data is raw material used as input and information is
processed data obtained as output of data processing
Characteristics of Computers
Characteristics of Computers
(Continued from previous slide..)
Characteristics of Computers
(Continued from previous slide..)
Evolution of Computers
Evolution of Computers
(Continued from previous slide..)
Computer Generations
Computer Generations
(Continued from previous slide..)
Computer Generations
(Continued from previous slide..)
Third § ICs with SSI and § Timesharing § Faster, smaller, more § IBM 360/370
(1964-1975) MSI technologies operating reliable, easier and § PDP-8
§ Larger magnetic system cheaper to produce § PDP-11
cores memory § Standardization § Commercially, easier § CDC 6600
§ Larger capacity of high-level to use, and easier to
disks and programming upgrade than
magnetic tapes languages previous generation
secondary § Unbundling of systems
storage software from § Scientific, commercial
§ Minicomputers; hardware and interactive on-
upward line applications
compatible family
of computers
Computer Generations
(Continued from previous slide..)
Fourth § ICs with VLSI § Operating systems for § Small, affordable, § IBM PC and
(1975-1989) technology PCs with GUI and reliable, and easy its clones
§ Microprocessors; multiple windows on a to use PCs § Apple II
semiconductor memory single terminal screen § More powerful § TRS-80
§ Larger capacity hard § Multiprocessing OS and reliable § VAX 9000
disks as in-built with concurrent mainframe
programming systems and § CRAY-1
secondary storage
languages supercomputers § CRAY-2
§ Magnetic tapes and
floppy disks as portable § UNIX operating system § Totally general § CRAY-X/MP
storage media with C programming purpose machines
§ Personal computers language § Easier to produce
§ Supercomputers based § Object-oriented design commercially
on parallel vector and programming § Easier to upgrade
processing and § PC, Network-based, § Rapid software
symmetric and supercomputing development
multiprocessing applications possible
technologies
§ Spread of high-speed
computer networks
Computer Generations
(Continued from previous slide..)
Fifth § ICs with ULSI § Micro-kernel based, § Portable computers § IBM notebooks
(1989- technology multithreading, § Powerful, cheaper, § Pentium PCs
Present) § Larger capacity distributed OS reliable, and easier § SUN
main memory, § Parallel to use desktop Workstations
hard disks with programming machines § IBM SP/2
RAID support libraries like MPI & § Powerful
PVM § SGI Origin 2000
§ Optical disks as supercomputers
portable read-only § JAVA § PARAM 10000
§ High uptime due to
storage media § World Wide Web hot-pluggable
§ Notebooks, § Multimedia, components
powerful desktop Internet § Totally general
PCs and applications purpose machines
workstations § More complex § Easier to produce
§ Powerful servers, supercomputing commercially,
supercomputers applications easier to upgrade
§ Internet § Rapid software
§ Cluster computing development
possible
Electronic
Electronic Devices
Devices Used
Used in
in Computers
Computers of
of Different
Different Generations
Generations
Key Words/Phrases
Learning Objectives
Learning Objectives
(Continued from previous slide..)
§ Computer as a system
Storage Unit
Secondary
Storage
Control
Unit
Indicates flow of
instructions and data
Arithmetic Indicates the control
Logic Unit exercised by the
control unit
Central Processing Unit (CPU)
Input Unit
Output Unit
Storage Unit
§ Primary storage
§ Secondary storage
Arithmetic Central
Logic Unit Control Unit = Processing
+ (CU)
(ALU) Unit (CPU)
Key Words/Phrases
Learning Objectives
Learning Objectives
(Continued from previous slide..)
Number Systems
§ Characteristics
§ Use symbols such as I for 1, II for 2, III for 3, IIII
for 4, IIIII for 5, etc
§ Each symbol represents the same value regardless
of its position in the number
§ The symbols are simply added to find out the value
of a particular number
§ Difficulty
§ It is difficult to perform arithmetic with such a
number system
§ Characteristics
Characteristics
§ A positional number system
§ Has 10 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7,
8, 9). Hence, its base = 10
§ The maximum value of a single digit is 9 (one
less than the value of the base)
§ Each position of a digit represents a specific
power of the base (10)
§ We use this number system in our day-to-day
life
Example
= 2000 + 500 + 80 + 6
Characteristics
§ A positional number system
§ Has only 2 symbols or digits (0 and 1). Hence its
base = 2
§ The maximum value of a single digit is 1 (one less
than the value of the base)
§ Each position of a digit represents a specific power
of the base (2)
§ This number system is used in computers
Example
= 16 + 0 + 4 + 0 + 1
= 2110
101012 = 2110
Bit
Characteristics
§ A positional number system
§ Has total 8 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7).
Hence, its base = 8
§ The maximum value of a single digit is 7 (one less
than the value of the base
§ Each position of a digit represents a specific power of
the base (8)
Example
= 1024 + 0 + 40 + 7
= 107110
Characteristics
§ A positional number system
§ Has total 16 symbols or digits (0, 1, 2, 3, 4, 5, 6, 7,
8, 9, A, B, C, D, E, F). Hence its base = 16
§ The symbols A, B, C, D, E and F represent the
decimal values 10, 11, 12, 13, 14 and 15
respectively
§ The maximum value of a single digit is 15 (one less
than the value of the base)
Example
1AF16 = (1 x 162) + (A x 161) + (F x 160)
= 1 x 256 + 10 x 16 + 15 x 1
= 256 + 160 + 15
= 43110
Method
Example
47068 = ?10
Common
values
multiplied
47068 = 4 x 83 + 7 x 82 + 0 x 81 + 6 x 80 by the
corresponding
= 4 x 512 + 7 x 64 + 0 + 6 x 1 digits
= 2048 + 448 + 0 + 6 Sum of these
products
= 250210
Division-Remainder Method
Step 1: Divide the decimal number to be converted by
the value of the new base
Note that the last remainder thus obtained will be the most
significant digit (MSD) of the new base number
Example
95210 = ?8
Solution:
8 952 Remainder
119 s 0
14 7
1 6
0 1
Method
Example
5456 = ?4
Solution:
Step 1: Convert from base 6 to base 10
5456 = 5 x 62 + 4 x 61 + 5 x 60
= 5 x 36 + 4 x 6 + 5 x 1
= 180 + 24 + 5
= 20910
4 209 Remainders
52 1
13 0
3 1
0 3
Method
Step 1: Divide the digits into groups of three starting
from the right
Example
11010102 = ?8
0012 = 0 x 22 + 0 x 21 + 1 x 20 = 1
1012 = 1 x 22 + 0 x 21 + 1 x 20 = 5
0102 = 0 x 22 + 1 x 21 + 0 x 20 = 2
Method
Step 1: Convert each octal digit to a 3 digit binary
number (the octal digits may be treated as
decimal for this conversion)
Example
5628 = ?2
Method
Example
1111012 = ?16
0011 1101
Method
Example
2AB16 = ?2
Fractional Numbers
Binary Point
Position 4 3 2 1 0 . -1 -2 -3 -4
Quantity 16 8 4 2 1 1/
2
1/
4
1/
8
1/
16
Represented
Example
Octal Point
Position 3 2 1 0 . -1 -2 -3
Quantity 512 64 8 1 1/
8
1/
64
1/
512
Represented
Example
Key Words/Phrases
Learning Objectives
§ Computer data
§ Computer codes: representation of data in binary
§ Most commonly used computer codes
§ Collating sequence
Data Types
Computer Codes
Computer Codes
(Continued from previous slide..)
BCD
Example
Show the binary digits used to record the word BASE in BCD
Solution:
B = 110010 in BCD binary notation
A = 110001 in BCD binary notation
S = 010010 in BCD binary notation
E = 110101 in BCD binary notation
Example
Using octal notation, show BCD coding for the word DIGIT
Solution:
D = 64 in BCD octal notation
I = 71 in BCD octal notation
G = 67 in BCD octal notation
I = 71 in BCD octal notation
T = 23 in BCD octal notation
Hence, BCD coding for the word DIGIT in octal notation will be
64 71 67 71 23
D I G I T
EBCDIC
Example
Using binary notation, write EBCDIC coding for the word BIT. How
many bytes are required for this representation?
Solution:
B = 1100 0010 in EBCDIC binary notation
I = 1100 1001 in EBCDIC binary notation
T = 1110 0011 in EBCDIC binary notation
Hence, EBCDIC coding for the word BIT in binary notation will be
ASCII
A 0100 0001 41
B 0100 0010 42
C 0100 0011 43
D 0100 0100 44
E 0100 0101 45
F 0100 0110 46
G 0100 0111 47
H 0100 1000 48
I 0100 1001 49
J 0100 1010 4A
K 0100 1011 4B
L 0100 1100 4C
M 0100 1101 4D
(Continued on next slide)
Example
Write binary coding for the word BOY in ASCII-7. How many bytes are required
for this representation?
Solution:
Since each character in ASCII-7 requires one byte for its representation and
there are 3 characters in the word BOY, 3 bytes will be required for this
representation
Example
Write binary coding for the word SKY in ASCII-8. How many bytes are
required for this representation?
Solution:
Since each character in ASCII-8 requires one byte for its representation
and there are 3 characters in the word SKY, 3 bytes will be required for
this representation
Unicode
§ Why Unicode:
§ No single encoding system supports all languages
§ Different encoding systems conflict
§ Unicode features:
§ Provides a consistent way of encoding multilingual
plain text
§ Defines codes for characters used in all major
languages of the world
§ Defines codes for special characters, mathematical
symbols, technical symbols, and diacritics
Unicode
Collating Sequence
Sorting in EBCDIC
Example
Solution:
A1 < 1A < 23
Sorting in ASCII
Example
Solution:
Therefore, the sorted sequence will be: 1A, 23, 2a, A1, Aa, a2, and
aA
Key Words/Phrases
§ Alphabetic data
§ Alphanumeric data
§ American Standard Code for Information Interchange (ASCII)
§ Binary Coded Decimal (BCD) code
§ Byte
§ Collating sequence
§ Computer codes
§ Control characters
§ Extended Binary-Coded Decimal Interchange Code (EBCDIC)
§ Hexadecimal equivalent
§ Numeric data
§ Octal equivalent
§ Packed decimal numbers
§ Unicode
§ Zoned decimal numbers
Learning Objectives
Bulb
Switch
Circuit
Pulse
Binary Arithmetic
Binary Addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 plus a carry of 1 to next higher column
Solution
Binary Decimal
carry 11 carry 1
10011 19
+1001 +9
11100 28
In this example, carry are generated for first and second columns
Example
Solution
The addition of three 1s
Binary Decimal can be broken up into two
steps. First, we add only
carry 11111 carry 1 two 1s giving 10 (1 + 1 =
10). The third 1 is now
100111 39
added to this result to
+11011 +27 obtain 11 (a 1 sum with a 1
carry). Hence, 1 + 1 + 1 =
1000010 66 1, plus a carry of 1 to next
higher column.
Binary Subtraction
0 - 0 = 0
0 - 1 = 1 with a borrow from the next column
1 - 0 = 1
1 - 1 = 0
Example
Solution
12
0202
10101
-01110
00111
Complement of a Number
Number of digits
in the number
C = Bn - 1 - N
Example
Solution
Example
Find the complement of 68
Solution
Since the number has 1 digit and the value of
base is 8,
(Base)n - 1 = 81 - 1 = 710 = 78
Now 78 - 68 = 18
Hence, complement of 68 = 18
Example
Complement of 1 0 1 1 0 1 0 is
0 1 0 0 1 0 1
Example:
Subtract 5610 from 9210 using complementary method.
Solution
Step 1: Complement of 5610
= 102 - 1 - 56 = 99 – 56 = 4310 The result may be
verified using the
Step 2: 92 + 43 (complement of 56) method of normal
= 135 (note 1 as carry) subtraction:
Result = 36
Example
Subtract 3510 from 1810 using complementary method.
Solution
18 - 35 = -17
Example
Subtract 01110002 (5610) from 10111002 (9210) using
complementary method.
Solution
1011100
+1000111 (complement of 0111000)
10100011
0100100
Example
Subtract 1000112 (3510) from 0100102 (1810) using
complementary method.
Solution
010010
+011100 (complement of 100011)
101110
Binary Multiplication
0x0=0
0x1=0
1x0=0
1x1=1
Solution
1010 Multiplicand
x1001 Multiplier
1010
x1001
1010
1010SS (S = left shift)
1011010
Binary Division
Example
Example
4 x 8 = 8 + 8 + 8 + 8 = 32
Example
Divide 3310 by 610 using the method of addition
Solution:
33 - 6 = 27
27 - 6 = 21 Since the result of the last
21 - 6 = 15 subtraction is less than zero,
15 - 6 = 9
9-6= 3 Quotient = 6 - 1 (ignore last
3 - 6 = -3 subtraction) = 5
Key Words/Phrases
Ref. Page Chapter 6: Boolean Algebra and Logic Circuits Slide 1/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Learning Objectives
§ Boolean algebra
§ Fundamental concepts and basic laws of Boolean
algebra
§ Boolean function and minimization
§ Logic gates
§ Logic circuits and Boolean expressions
§ Combinational circuits and design
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 2/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Boolean Algebra
Ref. Page 60 Chapter 6: Boolean Algebra and Logic Circuits Slide 3/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 61 Chapter 6: Boolean Algebra and Logic Circuits Slide 4/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Operator Precedence
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 5/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Operator Precedence
(Continued from previous slide..)
X + Y ⋅ Z
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 6/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Postulate 1:
(a) A = 0, if and only if, A is not equal to 1
(b) A = 1, if and only if, A is not equal to 0
Postulate 2:
(a) x + 0 = x
(b) x ⋅ 1 = x
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 7/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Postulate 6:
(a) x + x = 1
(b) x ⋅ x = 0
Ref. Page 62 Chapter 6: Boolean Algebra and Logic Circuits Slide 8/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
For example, in the table below, the second row is obtained from
the first row and vice versa simply by interchanging ‘+’ with ‘.’
and ‘0’ with ‘1’
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 9/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
2 x+1=1 x⋅0=0
4 x =x Involution Law
5 x⋅x +y=x⋅y x +x ⋅ y = x + y
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 10/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 11/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Proving a Theorem by Using Postulates
(Example)
Theorem:
x+x·y=x
Proof:
L.H.S.
= x+x⋅y
= x⋅1+x⋅y by postulate 2(b)
= x ⋅ (1 + y) by postulate 5(a)
= x ⋅ (y + 1) by postulate 3(a)
= x⋅1 by theorem 2(a)
= x by postulate 2(b)
= R.H.S.
Ref. Page 64 Chapter 6: Boolean Algebra and Logic Circuits Slide 12/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Proving a Theorem by Perfect Induction
(Example)
Theorem:
x + x ·y = x
=
x y x⋅y x+x⋅y
0 0 0 0
0 1 0 0
1 0 0 1
1 1 1 1
Ref. Page 64 Chapter 6: Boolean Algebra and Logic Circuits Slide 13/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
x+x=x
Proof:
L.H.S.
=x+x
= (x + x) ⋅ 1 by postulate 2(b)
= (x + x) ⋅ (x + X) by postulate 6(a)
= x + x ⋅X by postulate 5(b)
=x+0 by postulate 6(b)
=x by postulate 2(a)
= R.H.S.
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 14/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Dual Theorem:
x⋅x=x
Proof:
L.H.S.
=x⋅x
=x⋅x+0 by postulate 2(a) Notice that each step of
the proof of the dual
= x ⋅ x+ x⋅X by postulate 6(b)
theorem is derived from
= x ⋅ (x + X ) by postulate 5(a) the proof of its
=x⋅1 by postulate 6(a) corresponding pair in
=x by postulate 2(b) the original theorem
= R.H.S.
Ref. Page 63 Chapter 6: Boolean Algebra and Logic Circuits Slide 15/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Boolean Functions
§ Binary variables
§ An algebraic expression, or
§ A truth table
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 16/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Representation as an
Algebraic Expression
W = X + Y ·Z
§ Variable W is a function of X, Y, and Z, can also be
written as W = f (X, Y, Z)
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 17/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
X Y Z W
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 18/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 67 Chapter 6: Boolean Algebra and Logic Circuits Slide 19/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 68 Chapter 6: Boolean Algebra and Logic Circuits Slide 20/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
F1 = x ⋅ y ⋅ z + x ⋅ y ⋅ z + x ⋅ y
F1 has 3 literals (x, y, z) and 3 terms
F2 = x ⋅ y + x ⋅ z
F2 has 3 literals (x, y, z) and 2 terms
Ref. Page 68 Chapter 6: Boolean Algebra and Logic Circuits Slide 21/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
x y z F1 F2
0 0 0 0 0
0 0 1 1 1
0 1 0 0 0
0 1 1 1 1
1 0 0 1 1
1 0 1 1 1
1 1 0 0 0
1 1 1 0 0
Ref. Page 68 Chapter 6: Boolean Algebra and Logic Circuits Slide 22/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
(a ) x + x ⋅ y
(
(b ) x ⋅ x + y )
(c) x ⋅ y ⋅ z + x ⋅ y ⋅ z + x ⋅ y
(d ) x ⋅ y + x ⋅ z + y ⋅ z
(e) ( x + y ) ⋅ ( x + z ) ⋅ ( y +z )
Ref. Page 69 Chapter 6: Boolean Algebra and Logic Circuits Slide 23/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A +A +A +...+A = A ⋅ A ⋅ A ⋅...⋅ A
1 2 3 n 1 2 3 n
A ⋅ A ⋅ A ⋅...⋅ A = A +A +A +...+A
1 2 3 n 1 2 3 n
Ref. Page 70 Chapter 6: Boolean Algebra and Logic Circuits Slide 24/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
F = x ⋅ y ⋅ z+ x ⋅ y ⋅ z
1
( x + y +z ) ⋅ ( x + y + z )
Now we complement each literal giving
F = ( x+ y +z) ⋅ ( x+ y+ z )
1
Ref. Page 71 Chapter 6: Boolean Algebra and Logic Circuits Slide 25/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 71 Chapter 6: Boolean Algebra and Logic Circuits Slide 26/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
0 0 0
x ⋅y ⋅z m 0 x+y+z M 0
0 0 1
x ⋅y ⋅z m 1 x+y+z M 1
0 1 0
x ⋅y ⋅z m 2 x+y+z M 2
0 1 1
x ⋅y ⋅z m 3 x+y+z M 3
1 0 0
x ⋅y ⋅z m 4 x+y+z M 4
1 0 1
x ⋅y ⋅z m 5 x+y+z M 5
1 1 0
x ⋅y ⋅z m 6 x+ y+z M 6
1 1 1
x ⋅y ⋅z m 7 x+y+z M 7
Note that each minterm is the complement of its corresponding maxterm and vice-versa
Ref. Page 71 Chapter 6: Boolean Algebra and Logic Circuits Slide 27/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
x x+ y
x+ y ⋅ z x ⋅ y+z
x⋅y + x⋅y x⋅y + x⋅ y⋅z
Ref. Page 72 Chapter 6: Boolean Algebra and Logic Circuits Slide 28/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Steps to Express a Boolean Function
in its Sum-of-Products Form
Ref. Page 72 Chapter 6: Boolean Algebra and Logic Circuits Slide 29/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Expressing a Function in its
Sum-of-Products Form (Example)
x y z F1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Ref. Page 73 Chapter 6: Boolean Algebra and Logic Circuits Slide 30/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Expressing a Function in its
Sum-of-Products Form (Example)
(Continued from previous slide..)
x ⋅ y ⋅ z, x ⋅ y ⋅ z, and x ⋅ y ⋅ z
§ Taking the OR of these minterms, we get
F1 =x ⋅ y ⋅ z+ x ⋅ y ⋅ z+ x ⋅ y ⋅ z=m1+m 4 + m7
F1 ( x ⋅ y ⋅ z ) = ∑ (1,4,7 )
Ref. Page 72 Chapter 6: Boolean Algebra and Logic Circuits Slide 31/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
x ( x+ y )⋅( x+ y )⋅( x+ y )
x+ y ( x + y )⋅( x+ y+z )
( x+ y ) ⋅ z ( x+ y )⋅( x+ y )
Ref. Page 74 Chapter 6: Boolean Algebra and Logic Circuits Slide 32/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 74 Chapter 6: Boolean Algebra and Logic Circuits Slide 33/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Expressing a Function in its
Product-of-Sums Form
x y z F1
0 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Ref. Page 73 Chapter 6: Boolean Algebra and Logic Circuits Slide 34/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Expressing a Function in its
Product-of-Sums Form
(Continued from previous slide..)
( x+y+ z ) , ( x+ y+ z ), ( x+ y+ z ) ,
( x+y+ z ) and ( x+ y+ z )
§ Taking the AND of these maxterms, we get:
F1 ( x,y,z ) = Π( 0,2,3,5,6 )
Ref. Page 74 Chapter 6: Boolean Algebra and Logic Circuits Slide 35/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Conversion Between Canonical Forms (Sum-of-
Products and Product-of-Sums)
Example:
( ) ( ) (
F x,y,z = Π 0,2,4,5 = Σ 1,3,6,7 )
F( x,y,z ) = Σ (1,4,7 ) = Σ ( 0,2,3,5,6 )
Ref. Page 76 Chapter 6: Boolean Algebra and Logic Circuits Slide 36/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Logic Gates
Ref. Page 77 Chapter 6: Boolean Algebra and Logic Circuits Slide 37/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
AND Gate
Ref. Page 77 Chapter 6: Boolean Algebra and Logic Circuits Slide 38/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A
C= A⋅B
B
Inputs Output
A B C=A⋅B
0 0 0
0 1 0
1 0 0
1 1 1
Ref. Page 77 Chapter 6: Boolean Algebra and Logic Circuits Slide 39/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
OR Gate
Ref. Page 77 Chapter 6: Boolean Algebra and Logic Circuits Slide 40/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A
C=A+B
B
Inputs Output
A B C=A +B
0 0 0
0 1 1
1 0 1
1 1 1
Ref. Page 78 Chapter 6: Boolean Algebra and Logic Circuits Slide 41/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
NOT Gate
Ref. Page 78 Chapter 6: Boolean Algebra and Logic Circuits Slide 42/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A A
Input Output
A A
0 1
1 0
Ref. Page 79 Chapter 6: Boolean Algebra and Logic Circuits Slide 43/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
NAND Gate
Ref. Page 79 Chapter 6: Boolean Algebra and Logic Circuits Slide 44/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A
B C= A ↑ B= A ⋅B=A +B
Inputs Output
A B C = A +B
0 0 1
0 1 1
1 0 1
1 1 0
Ref. Page 79 Chapter 6: Boolean Algebra and Logic Circuits Slide 45/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
NOR Gate
§ Complemented OR gate
Ref. Page 79 Chapter 6: Boolean Algebra and Logic Circuits Slide 46/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A
B C= A ↓ B=A + B=A ⋅ B
Inputs Output
A B C =A ⋅ B
0 0 1
0 1 0
1 0 0
1 1 0
Ref. Page 80 Chapter 6: Boolean Algebra and Logic Circuits Slide 47/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Logic Circuits
§ The three logic gates (AND, OR, and NOT) are logically
complete because any Boolean expression can be
realized as a logic circuit using only these three gates
Ref. Page 80 Chapter 6: Boolean Algebra and Logic Circuits Slide 48/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A
A
NOT D= A ⋅ (B + C )
B B+C AND
C
OR
Ref. Page 80 Chapter 6: Boolean Algebra and Logic Circuits Slide 49/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Finding Boolean Expression
of a Logic Circuit (Example 2)
OR
A A +B
B
(
C= ( A +B ) ⋅ A ⋅ B )
A ⋅B A ⋅B AND
AND NOT
Ref. Page 81 Chapter 6: Boolean Algebra and Logic Circuits Slide 50/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Boolean Expression = A ⋅B + C
AND
A A ⋅B
B
A ⋅B + C
C
OR
Ref. Page 83 Chapter 6: Boolean Algebra and Logic Circuits Slide 51/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Boolean Expression = A ⋅B + C ⋅D + E ⋅F
AND NOT
A A ⋅B A ⋅B
B
AND AND
C C ⋅D
D A ⋅B + C ⋅D + E ⋅F
AND
E E ⋅F E ⋅F
F NOT
Ref. Page 83 Chapter 6: Boolean Algebra and Logic Circuits Slide 52/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 84 Chapter 6: Boolean Algebra and Logic Circuits Slide 53/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A ⋅A = A + A = A
A
(a) NOT gate implementation.
A A ⋅B A ⋅ B = A ⋅B
B
(b) AND gate implementation.
Ref. Page 85 Chapter 6: Boolean Algebra and Logic Circuits Slide 54/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A ⋅A = A
A
A ⋅B = A + B = A + B
B ⋅B = B
B
(c) OR gate implementation.
Ref. Page 85 Chapter 6: Boolean Algebra and Logic Circuits Slide 55/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 85 Chapter 6: Boolean Algebra and Logic Circuits Slide 56/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Boolean Expression = A ⋅ B + C ⋅ ( A + B ⋅D )
A A ⋅B
A ⋅ B + C ⋅ ( A + B ⋅D )
B
B B ⋅D
D A +B ⋅D
A
C C ⋅ ( A +B ⋅D )
Ref. Page 87 Chapter 6: Boolean Algebra and Logic Circuits Slide 57/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
AND
A A ⋅B OR
1
B
5
AND OR
B B ⋅D
2
D A+B ⋅D
A ⋅ B + C⋅ ( A+B ⋅D)
3
AND
C⋅ ( A+B ⋅D)
4
C
Ref. Page 87 Chapter 6: Boolean Algebra and Logic Circuits Slide 58/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A
1
B A ⋅ B + C ⋅ ( A +B ⋅D )
5
B
2
D
3
A
4
C
Ref. Page 87 Chapter 6: Boolean Algebra and Logic Circuits Slide 59/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 89 Chapter 6: Boolean Algebra and Logic Circuits Slide 60/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A + A = A ⋅A = A
A
A A +B A + B = A +B
B
Ref. Page 89 Chapter 6: Boolean Algebra and Logic Circuits Slide 61/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A A +A=A
A + B = A ⋅B = A ⋅B
B + B =B
B
(c) AND gate implementation.
Ref. Page 89 Chapter 6: Boolean Algebra and Logic Circuits Slide 62/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 89 Chapter 6: Boolean Algebra and Logic Circuits Slide 63/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Boolean Expression A ⋅ B + C ⋅ ( A +B ⋅D )
=
A A ⋅B
B A ⋅ B + C ⋅ ( A +B ⋅D )
B B ⋅D
D A +B ⋅D
A
C C ⋅ ( A +B ⋅D )
(a) Step 1: AND/OR implementation.
Ref. Page 90 Chapter 6: Boolean Algebra and Logic Circuits Slide 64/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
AN
A D
A ⋅B
1
OR
A ⋅ B + C ⋅ ( A +B ⋅D )
B
5 6
AN
B D
B ⋅D
2
D OR
AN
3 D
A
C ⋅ ( A +B ⋅D )
4
C
A +B ⋅D
(b) Step 2: Substituting equivalent NOR functions.
(Continued on next slide)
Ref. Page 90 Chapter 6: Boolean Algebra and Logic Circuits Slide 65/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A 1
B A ⋅ B + C ⋅ ( A +B ⋅D )
5 6
B 2
D
3
A
4
C
(c) Step 3: NOR implementation.
Ref. Page 91 Chapter 6: Boolean Algebra and Logic Circuits Slide 66/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Exclusive-OR Function
A ⊕ B =A ⋅ B + A ⋅ B
A C = A ⊕ B = A ⋅B+ A ⋅B
B
A ⊕ C = A ⊕ B = A ⋅B+ A ⋅B
B
Also, ( A ⊕ B ) ⊕ C = A ⊕ (B ⊕ C ) = A ⊕ B ⊕ C
Ref. Page 91 Chapter 6: Boolean Algebra and Logic Circuits Slide 67/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Inputs Output
A B C =A ⊕B
0 0 0
0 1 1
1 0 1
1 1 0
Ref. Page 92 Chapter 6: Boolean Algebra and Logic Circuits Slide 68/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A € B = A ⋅ B+ A ⋅ B
A C = A € B = A ⋅B+ A ⋅B
B
Also, (A € B) € = A € (B € C) = A € B € C
Ref. Page 91 Chapter 6: Boolean Algebra and Logic Circuits Slide 69/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Inputs Output
A B C=A€B
0 0 1
0 1 0
1 0 0
1 1 1
Ref. Page 92 Chapter 6: Boolean Algebra and Logic Circuits Slide 70/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 93 Chapter 6: Boolean Algebra and Logic Circuits Slide 71/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Inputs Outputs
A B C S
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
S = A ⋅B+ A ⋅B
Boolean functions for the two outputs.
C = A ⋅B
Ref. Page 93 Chapter 6: Boolean Algebra and Logic Circuits Slide 72/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A A ⋅B
A
S = A ⋅B+ A ⋅B
B
B A ⋅B
A
B C = A ⋅B
Ref. Page 94 Chapter 6: Boolean Algebra and Logic Circuits Slide 73/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 94 Chapter 6: Boolean Algebra and Logic Circuits Slide 74/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref. Page 95 Chapter 6: Boolean Algebra and Logic Circuits Slide 75/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A A ⋅B ⋅ D
B
D
A A ⋅B ⋅ D
B
D
S
A
B A ⋅B ⋅ D
D
A A ⋅B ⋅ D
B
D
Ref. Page 95 Chapter 6: Boolean Algebra and Logic Circuits Slide 76/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
A A ⋅B
B
A A ⋅D C
D
B B⋅D
D
(b) Logic circuit diagram for carry
Ref. Page 95 Chapter 6: Boolean Algebra and Logic Circuits Slide 77/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Key Words/Phrases
§ Absorption law § Equivalence function § NOT gate
§ AND gate § Exclusive-OR function § Operator precedence
§ Associative law § Exhaustive enumeration § OR gate
§ Boolean algebra method § Parallel Binary Adder
§ Boolean expression § Half-adder § Perfect induction
§ Boolean functions § Idempotent law method
§ Boolean identities § Involution law § Postulates of Boolean
§ Canonical forms for § Literal algebra
Boolean functions § Logic circuits § Principle of duality
§ Combination logic § Logic gates § Product-of-Sums
circuits § Logical addition expression
§ Cumulative law § Logical multiplication § Standard forms
§ Complement of a § Maxterms § Sum-of Products
function § Minimization of Boolean expression
§ Complementation functions § Truth table
§ De Morgan’s law § Minterms § Universal NAND gate
§ Distributive law § NAND gate § Universal NOR gate
§ Dual identities
Ref. Page 97 Chapter 6: Boolean Algebra and Logic Circuits Slide 78/78
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Learning Objectives
Cache
Memory
Accumulato
Decode r register
r I/
Program General- O
control register purpose register
D
Instruction General- E
register purpose V
register I
Memory
address register C
E
Memory buffer
S
register
Input/Output
register
General- General-purpose
purpose register register
Instruction Set
Registers
Sr.
Name of Register Function
No.
Holds address of the active memory
1 Memory Address (MAR)
location
Holds contents of the accessed
2 Memory Buffer (MBR)
(read/written) memory word
Holds address of the next instruction to
3 Program Control (PC)
be executed
Holds data to be operated upon,
4 Accumulator (A)
intermediate results, and the results
Holds an instruction while it is being
5 Instruction (I)
executed
Used to communicate with the I/O
6 Input/Output (I/O)
devices
Processor Speed
Types of Processor
Type of
Features Usage
Architecture
§ Large instruction set
CISC (Complex § Variable-length instructions Mostly used in
Instruction Set § Variety of addressing modes personal
Computer) § Complex & expensive to computers
produce
§ Small instruction set
RISC (Reduced
§ Fixed-length instructions Mostly used in
Instruction Set
§ Reduced references to workstations
Computer)
memory to retrieve operands
Types of Processor
(Continued from previous slide..)
Type of
Features Usage
Architecture
§ Allows software to
communicate explicitly to the
processor when operations
are parallel
EPIC (Explicitly
§ Uses tighter coupling Mostly used in
Parallel
between the compiler and the high-end servers
Instruction
processor and workstations
Computing)
§ Enables compiler to extract
maximum parallelism in the
original code, and explicitly
describe it to the processor
Types of Processor
(Continued from previous slide..)
Type of
Features Usage
Architecture
§ Processor chip has multiple
cooler-running, more energy-
efficient processing cores
§ Improve overall performance
Mostly used in
Multi-Core by handling more work in
high-end servers
Processor parallel
and workstations
§ can share architectural
components, such as memory
elements and memory
management
Main Memory
Primary Secondary
Property Desirable
storage storage
Storage
Large storage capacity Small Large
capacity
0
1
2
3
4
Addresses of The words
a memory 5
of a memory
(total N words)
N-2
N-1 Each word
contains the same
number of bits =
Bit 1 Bit 2 word length
(Continued on next slide)
1024
4096 4096
Memory Capacity
Types of ROMs
Type Usage
Data is burnt by the manufacturer
Manufacturer-programmed
of the electronic equipment in
ROM
which it is used.
User-programmed ROM
or The user can load and store
“read-only” programs and data in
Programmable ROM it
(PROM)
Types of ROMs
(Continued from previous slide..)
Type Usage
Electrically EPROM
(EEPROM) A type of EPROM chip in which the
or stored information is erased by
using high voltage electric pulses
Flash memory
Cache Memory
Key Words/Phrases
Key Words/Phrases
(Continued from previous slide..)
Learning Objectives
Learning Objectives
(Continued from previous slide..)
Secondary Storage
Magnetic Tape
Flash Memory
Floppy Hard CD-ROM Card
WORM CD-RW DVD Drive
Disk Disks
(CD-R)
0 12 3 4 5 6 7 8 9 A B C D E F G
Parity bit 7
6 Each vertical
Zone
line represents
5
a binary 1 bit
4
Numeric 3
Illustrates the concepts of frames, tracks, parity bit, and character-by-character data
storage
0 1 2 3 4 5 6 7 8 9 A B Each vertical
8’s digit line represents
9
a binary
Track 2’s digit 8
1 bit
representation Added zone 7
Added zone 6
Zone 5
Parity bit 4
Zone 3
Unit’s digit 2
4’s digit 1
Illustrates the concepts of frames, tracks, parity bit, and character-by-character data
storage
Tape motion
Tape motion
(b) A tape which uses a blocking factor of two. There is an IBG after every two records.
Tape motion
(c) A tape which uses a blocking factor of three. There is an IBG after every three records.
Illustrates the concepts of blocking of records, inter-block gap (IBG), and blocking factor
File header
File header File trailer label of next
label label file
Tape motion
Block of Block of
IBG IBG IBG IBG
records records
Tape header
label File trailer
label of
BOT File header File trailer
label last file
marker label
Tape motion
EOT marker
Write tape header label used to update the contents of tape header label
Back space one block rewinds the tape to the beginning of previous block
Read/write
head assembly
Vacuum
columns
Tape loops
varying in
length
7
8
Write head B
Read head A
Spinning
Read head B
helical
scan
Write head A
Moving tape
Shaft
Track
§ The number of tracks on a
… …
199 disk may be as few as 40 on
small, low-capacity disks, to
several thousand on large,
high-capacity disks
A sector
Access arms
Surface - 4
assembly
Surface - 5
Lower surface
not used
One read/write
head per surface Central shaft
Direction of
movement of
access arms
assembly
Access arms
assembly
Vertical cross section of a disk system. There is one read/write head per
recording surface
Disk Formatting
Disk Formatting
(Continued from previous slide..)
Magnetic Disks
Floppy Disks
Floppy Disks
(Continued from previous slide..)
Drive spindle
hole in disk
5¼ - inch
5¼ - inch
A 5¼-inch floppy disk enclosed within jacket. The drive mechanism clamps
on to a portion of the disk exposed by the drive access opening in the jacket
Sliding metal
piece cover
3½” - inch
User’s label for
identification
Write-protect
plastic tab
3½” - inch
(b) A 3½ - inch floppy disk.
Hard Disks
Zip/Bernoulli Disks
Disk Packs
Winchester Disks
Winchester Disks
(Continued from previous slide..)
§ Has one long spiral track, which starts at the outer edge
and spirals inward to the center
§ Track is divided into equal size sectors
(a) Track pattern on an optical disk (b) Track pattern on a magnetic disk
= Number of sectors
× Number of bytes per sector
Laser Laser
beam beam
source source
Prism Prism
Sensor Sensor
Laser beam gets Laser beam gets
scattered by a pit reflect by a land
(represents 0) (represents1)
Land Land
Pit Land
Pit Pit
CD-ROM
CD-Read/Write (CD-RW)
Disk Array
Disk Array
A RAID Unit
Multiple
disks
RAID Controller
Computer
CD-ROM Jukebox
Storage Hierarchy
As a single type of storage is not superior in speed of access, capacity, and
cost, most computer systems make use of a hierarchy of storage
technologies as shown below.
Key Words/Phrases
Key Words/Phrases
(Continued from previous slide..)
§ QIC Standard
§ Record
§ Redundant Array of Inexpensive Disks (RAID)
§ Secondary storage
§ Sector
§ Seek time
§ Sequential access device
§ Storage hierarchy
§ Tape controller
§ Track
§ Transaction file
§ Winchester disk
§ WORM disk
§ Zip disk
Learning Objectives
I/O Devices
Input Results of
data CPU processing
Input Output
from and in human
Devices Devices
external Memory acceptable
world form
§ Keyboard devices
§ Point-and-draw devices
§ Data scanning devices
§ Digitizer
§ Electronic cards based devices
§ Speech recognition devices
§ Vision based devices
Keyboard Devices
← Q W E R T Y U I O P { } |
Delete
Page Down 7 8 9
→ ↑
Tab [ ] \ End Pg Up
Home
A S : 4 6
Caps Lock D F G H J K L “ ← Enter 5
; ← →
‘
< > ? ? 1 2 3
Z X C V B N M Shift ↑
Shift , . / / End ↓ Pg Dn
Enter
0 .
Ctrl Alt Alt Ctrl ← ↓ → Ins
Del
Point-and-Draw Devices
Mouse
Trackball
Click buttons
Ball to be
rolled with
fingers
Joystick
Click button
Stick
Light
Ball
indicator Socket
Electronic Pen
Touch Screen
Image Scanner
Bar-code Reader
21000 67520
Manufacturer/supplier
identification number Specific product code
number
Digitizer
A Digitizer
Digitizing tablet
Stylus in the form
of cross-hair cursor
Table top
Electronic-card Reader
Vision-Input Systems
§ Monitors
§ Printers
§ Plotters
§ Screen image projector
§ Voice response systems
Types of Output
§ Soft-copy output
§ Not produced on a paper or some material that can be touched
and carried for being shown to others
§ Temporary in nature and vanish after use
§ Examples are output displayed on a terminal screen or spoken out
by a voice response system
§ Hard-copy output
§ Produced on a paper or some material that can be touched and
carried for being shown to others
§ Permanent in nature and can be kept in paper files or can be
looked at a later time when the person is not using the computer
§ Examples are output produced by printers or plotters on paper
Monitors
Monitors
Monitor
Keyboard
Types of Monitors
Printers
Dot-Matrix Printers
ABCDEFGHIJKLMNO
PQRSTUVWXYZ
0123456789-.,
&/$*#%@=(+)
Inkjet Printers
Inkjet Printers
(Continued from previous slide..)
An Inkjet Printers
Drum Printers
WW W WWWWWWWWWWW
V V V V V V V V V V VV V V
Solid U U U U U U U U U U U U U U
cylindrical T T T T T T T T T T T T T T
S S S S S S S S S S S S S S
drum with R R R R R R R R R R R R R R
embossed QQ Q Q Q Q Q Q Q Q Q Q Q Q
characters P P P P P P P P P P P P P P
O O O O O O O O O O O O O O
N N N N N N N N N N NN N N
Chain/Band Printers
Chain/Band Printers
Laser Printers
Laser Printers
(Continued from previous slide..)
A Laser Printers
Plotters
A Drum Plotter
Paper
Design drawn
on the paper
A Flatbed Plotter
Design
drawn on
the paper
Paper
Speech Synthesizers
Key Words/Phrases
Key Words/Phrases
(Continued from previous slide..)
§ Soft-copy output
§ Speech synthesizer
§ Stylus
§ Touch Screen
§ Trackball
§ Universal Product Code (UPC)
§ Video Display Terminal (VDT)
§ Vision-input system
§ Voice recognition device
§ Voice reproduction system
§ Voice response system
Learning Objectives
Software
Types of Software
System Software
Application Software
HARDWARE
(Physical devices/components
of the computer system)
SYSTEM SOFTWARE
(Software that constitute the operating and
programming environment of the computer system)
APPLICATION SOFTWARE
(Software that do a specific task or solve a specific problem)
USERS
(Normally interact with the system via the user
interface provided by the application software)
Firmware
Middleware
Key Words/Phrases
Ref Page Chapter 11: Planning the Computer Program Slide 1/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Learning Objectives
Ref Page 183 Chapter 11: Planning the Computer Program Slide 2/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 183 Chapter 11: Planning the Computer Program Slide 3/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Algorithm
Ref Page 184 Chapter 11: Planning the Computer Program Slide 4/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 184 Chapter 11: Planning the Computer Program Slide 5/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Step 8: Stop.
Ref Page 184 Chapter 11: Planning the Computer Program Slide 6/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 185 Chapter 11: Planning the Computer Program Slide 7/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 185 Chapter 11: Planning the Computer Program Slide 8/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Representation of Algorithms
§ As programs
§ As flowcharts
§ As pseudocodes
Ref Page 185 Chapter 11: Planning the Computer Program Slide 9/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Flowchart
Ref Page 186 Chapter 11: Planning the Computer Program Slide 10/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 187 Chapter 11: Planning the Computer Program Slide 11/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Yes A=B
Ref Page 188 Chapter 11: Planning the Computer Program Slide 12/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
I=?
=0 =1 =2 =3 =4 =5 = Other
Ref Page 188 Chapter 11: Planning the Computer Program Slide 13/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 188 Chapter 11: Planning the Computer Program Slide 14/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Percentage = Total / 10
Stop
Ref Page 189 Chapter 11: Planning the Computer Program Slide 15/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 189 Chapter 11: Planning the Computer Program Slide 16/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Start (contd…)
Percentage = Total / 10
Ref Page 190 Chapter 11: Planning the Computer Program Slide 17/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Count = 0
Percentage = Total/10
Yes
Stop
Ref Page 191 Chapter 11: Planning the Computer Program Slide 18/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Yes
Is Rollno = 0000000?
Generalized flowchart
No for the solution of
Add marks of all subjects Example 4 using the
Stop
giving Total concept of trailer
record. Here the
process loop is
Percentage = Total / 10 terminated by detecting
a special non-data
record.
Write output data
Ref Page 191 Chapter 11: Planning the Computer Program Slide 19/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 192 Chapter 11: Planning the Computer Program Slide 20/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Yes
Is Rollno = 9999999?
No Write Count
Add marks of all subjects giving Total Stop
Percentage = Total/10
Yes
Write output data
Add 1 to Count
Ref Page 193 Chapter 11: Planning the Computer Program Slide 21/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 193 Chapter 11: Planning the Computer Program Slide 22/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Count = 0
Yes 2
Is Sexcode = Z?
No
1 No Is Sexcode = F?
Yes
Add marks of all subjects giving Total
Percentage = Total / 10
Ref Page 195 Chapter 11: Planning the Computer Program Slide 23/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
No
1 Is Percentage = > 45?
Yes
2
No
1 Is Percentage < 60?
Write Count
Yes
Write output data
Stop
Add 1 to Count
Ref Page 195 Chapter 11: Planning the Computer Program Slide 24/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Levels of Flowchart
Ref Page 196 Chapter 11: Planning the Computer Program Slide 25/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Part of a macro 1
flowchart
I=1 A micro
Flowchart
Total = 0
No
Is I > 10?
Yes
1
Ref Page 196 Chapter 11: Planning the Computer Program Slide 26/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Flowcharting Rules
Ref Page 196 Chapter 11: Planning the Computer Program Slide 27/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Flowcharting Rules
(contd…)
§ Be consistent in using names and variables in the
flowchart
Ref Page 197 Chapter 11: Planning the Computer Program Slide 28/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Advantages of Flowchart
§ Better Communication
§ Proper program documentation
§ Efficient coding
§ Systematic debugging
§ Systematic testing
Ref Page 197 Chapter 11: Planning the Computer Program Slide 29/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Limitations of Flowchart
Ref Page 198 Chapter 11: Planning the Computer Program Slide 30/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Pseudocode
Ref Page 198 Chapter 11: Planning the Computer Program Slide 31/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
1. Sequence logic,
2. Selection logic, and
3. Iteration (or looping) logic
Ref Page 199 Chapter 11: Planning the Computer Program Slide 32/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Sequence Logic
Process 1
Process 1
Process 2
Process 2
Ref Page 199 Chapter 11: Planning the Computer Program Slide 33/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Selection Logic
Ref Page 200 Chapter 11: Planning the Computer Program Slide 34/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Yes No IF Condition
IF (condition)
THEN Process 1
THEN ELSE ELSE Process 2
Process 1 Process 2
ENDIF
Ref Page 200 Chapter 11: Planning the Computer Program Slide 35/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Yes No
IF (condition)
IF Condition
THEN
THEN Process 1
Process 1
ENDIF
Ref Page 200 Chapter 11: Planning the Computer Program Slide 36/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Yes
Type 1 Process 1
No
Yes
Type 2 Process 2 CASE Type
Yes
Type n Process n
Case Type n: Process n
No
ENDCASE
(a) Flowchart
(b) Pseudocode
Ref Page 201 Chapter 11: Planning the Computer Program Slide 37/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
1. DO…WHILE
2. REPEAT…UNTIL
Ref Page 201 Chapter 11: Planning the Computer Program Slide 38/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Iteration (or Looping) Logic
(DO…WHILE Structure)
False
Condition?
True
Process 1 DO WHILE Condition
Process 1
Block
Process n
Process n ENDDO
Ref Page 202 Chapter 11: Planning the Computer Program Slide 39/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Process 1
REPEAT
Process 1
Process n
Process n
False
Condition? UNTIL Condition
True
(a) Flowchart (b) Pseudocode
Ref Page 202 Chapter 11: Planning the Computer Program Slide 40/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 203 Chapter 11: Planning the Computer Program Slide 41/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Advantages of Pseudocode
Ref Page 204 Chapter 11: Planning the Computer Program Slide 42/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Limitations of Pseudocode
Ref Page 204 Chapter 11: Planning the Computer Program Slide 43/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Key Words/Phrases
§ Algorithm
§ Basic logic structures
§ Control structures
§ Flowchart
§ Iteration logic
§ Looping logic
§ Micro flowchart
§ Macro flowchart
§ Pseudocode
§ Program Design Language (PDL)
§ Sequence logic
§ Selection logic
§ Sentinel value
§ Structured programming
§ Trailer record
Ref Page 204 Chapter 11: Planning the Computer Program Slide 44/44
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Learning Objectives
§ Machine language
§ Assembly language
§ High-level language
Machine Language
OPCODE OPERAND
(operation code) (Address/Location)
001000000000001100111001 10001471
001100000000010000100001 14002041
011000000000011100101110 30003456
101000111111011100101110 50773456
000000000000000000000000 00000000
In Binary In Decimal
(Difficult to read and understand) (Easier to read and understand)
Advantage
Limitations
§ Machine Dependent
§ Difficult to program
§ Error prone
§ Difficult to modify
Assembly/Symbolic Language
Assembler
One-to-one correspondence
(Source Program) (Object Program)
FRST 1000
SCND 1001
ANSR 1002
§ Machine dependent
§ Knowledge of hardware required
§ Machine level coding
High-Level Languages
§ Machine independent
§ Do not require programmers to know anything about the
internal structure of computer on which high-level
language programs will be executed
§ Deal with high-level coding, enabling the programmers
to write instructions using English words and familiar
mathematical symbols and expressions
Compiler
Compiler
One-to-many correspondence
(Source (Object
Program) Program)
Compiler
Program P1 in
Compiler for
high-level Machine code
language L1
language L1 for P1
Compiler
(Continued from previous slide..)
Compiler for
language L1 Machine code for Executed on
on computer A P1 that will run computer A
on computer A
Program P1 in high-
level language L1 Same results
obtained
Syntax Errors
§ Illegal characters
§ Illegal combination of characters
§ Improper sequencing of instructions in a program
§ Use of undefined variable names
Edit
source program
Source program
Compile
source program
Syntax
errors No Generate
detected? object program
Linker
Linker
(Continued from previous slide..)
Interpreter
Role of an Interpreter
Interpreter
(translates and
High-level language executes
program Input Output Result of
statement-by-
(Source Program) program
statement)
execution
§ Machine independent
§ Easier to learn and use
§ Fewer errors during program development
§ Lower program preparation cost
§ Better documentation
§ Easier to maintain
FORTRAN
COBOL
IDENTIFICATION DIVISION.
PROGRAM_ID. SUMUP.
AUTHOR. P K SINHA.
* THIS PROGRAM COMPUTES AND PRINTS
* THE SUM OF GIVEN NUMBERS.
ENVIROMENT DIVISION.
CONFIGURATION SECTION.
SOURCE_COMPUTER. BURROUGHS_6700.
OBJECT_COMPUTER. BURROUGHS_6700.
INPUT_OUTPUT SECTION.
FILE_CONTROL.
SELECT DATA_FILE ASSIGN TO DISK.
SELECT OUTPUT_FILE ASSIGN TO PRINTER.
DATA DIVISION.
FILE SECTION.
FD DATA_FILE
RECORD CONTAINS 80 CHARACTERS
LABEL RECORD IS OMITTED
DATA RECORD IS INPUT_DATA_
RECORD.
01 INPUT_DATA_RECORD.
05 NPICTURE 9(6)V99.
05 FILLER PICTURE X(72).
FD OUTPUT_FILE
RECORD CONTAINS 132 CHARACTERS
LABEL RECORD IS OMITTED
DATA RECORD IS OUTPUT_RECORD.
01 OUTPUT_RECORD.
05 FILLER PICTURE X.
05TITLE PICTURE X(25).
05 SUM PICTURE 9(10)V99.
05 FILLER PICTURE X(94).
WORKING_STORAGE SECTION.
77MESSAGE PICTURE X(25)
VALUE IS “THE SUM OF GIVEN NUMBERS=”.
PROCEDURE DIVISION.
OPEN_FILES.
OPEN INPUT DATA_FILE.
OPEN OUTPUT OUTPUT_FILE.
INITIALIZATION.
MOVE SPACES TO OUTPUT_RECORD.
MOVE ZERO TO SUM.
PROCESS_LOOP.
READ DATA_FILE AT END GO TO
PRINT_PARA.
ADD N TO SUM.
GO TO PROCESS_LOOP.
PRINT_PARA.
MOVE MESSAGE TO TITLE.
WRITE OUTPUT_RECORD.
END_OF_JOB.
CLOSE DATA_FILE.
CLOSE OUTPUT_FILE.
STOP RUN.
BASIC
Pascal
(* DECLARATION OF VARIABLES *)
VAR SUM, N : REAL;
VAR I : INTEGER;
A Sample C Program
C++
Java
C# (C Sharp)
RPG
LISP
SNOBOL
§ Simplicity
§ Naturalness
§ Abstraction
§ Efficiency
§ Structured Programming Support
§ Compactness
§ Locality
§ Extensibility
§ Suitability to its environment
Subprogram
Structure of a Subprogram
Subprogram header
sqrt (x)
subprogram header 2 1
subprogram call statement
3
6 4 next statement
subprogram body 7
5
Key Words/Phrases
Key Words/Phrases
(Continued from previous slide..)
§ SNOBOL
§ Source program
§ Sub-procedure
§ Subprogram
§ Subroutine
§ Symbolic language
§ Syntax error
§ Syntax rules
§ Written subprograms
Ref Page Chapter 13: System Implementation and Operation Slide 1/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Learning Objectives
Ref Page 239 Chapter 13: System Implementation and Operation Slide 2/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 239 Chapter 13: System Implementation and Operation Slide 3/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
§ Syntax errors
§ Occurs when the rules or syntax of the programming
language are not followed
§ For example, incorrect punctuation, incorrect word
sequence, undefined terms, and misuse of terms
§ Syntax errors are detected by a language processor
§ Logic errors
§ Occurs due to errors in planning a program’s logic
§ Such errors cause the program to produce incorrect
output.
§ These errors cannot be detected by a language
processor
Ref Page 240 Chapter 13: System Implementation and Operation Slide 4/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Testing of a Program
Ref Page 240 Chapter 13: System Implementation and Operation Slide 5/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 241 Chapter 13: System Implementation and Operation Slide 6/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 241 Chapter 13: System Implementation and Operation Slide 7/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Difference Between Testing and
Debugging
Ref Page 242 Chapter 13: System Implementation and Operation Slide 8/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
§ Testing can begin in the § Debugging can begin only after the program
early stages of software is coded
development. § The approach used for debugging largely
§ Although the test runs of a depends on the personal choice of the
program can be done only programmer and the type of problem in the
4 after the program is coded, program
but the decision of what to
test, how to test, and with
what kind of data to test, can
and should be done before
the coding is started
Ref Page 242 Chapter 13: System Implementation and Operation Slide 9/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Documentation
§ Program comments
§ System manual
§ User manual
Ref Page 243 Chapter 13: System Implementation and Operation Slide 10/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Ref Page 245 Chapter 13: System Implementation and Operation Slide 11/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Cut-off date
Time
Ref Page 247 Chapter 13: System Implementation and Operation Slide 12/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Overlapping period of
complete operation of
Old system
both the old and the new
systems
New system
Time
(b) Parallel run
Ref Page 247 Chapter 13: System Implementation and Operation Slide 13/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.
K. Sinha
Sinha &
& Priti
Priti Sinha
Sinha
Old system
New system
Time
Ref Page 247 Chapter 13: System Implementation and Operation Slide 14/17
Computer
Computer Fundamentals:
Fundamentals: Pradeep
Pradeep K.