Computer Defined, Features of a Modern Digital Computer, Application areas of Computers, Evolution of Computers, Building Blocks, Representation of Data, Number Systems, Computer Software, Computer Networks, Internet and WWW, Email
2024: Domino Containers - The Next Step. News from the Domino Container commu...
Computer Fundamentals
1. Mudit khetan
Computer Fundamentals
Mudit Khetan
khetan_mudit@yahoo.com
+91-99281-61320
Asst. Professor,
School of Computer and Systems Sciences,
Jaipur National University, Jaipur
2. Mudit khetan
•Computer Defined
•Features of a Modern Digital Computer
•Application areas of Computers
•Evolution of Computers
•Building Blocks
•Representation of Data
•Number Systems
•Computer Software
•Computer Networks
•Internet and WWW
•Email
Session Plan
3. Mudit khetan
•The word computer comes from the word ‘compute’, which means
‘to calculate’.
•A computer is a device that performs arithmetic operations at a
very high speed.
•It may sound like a calculator, but there is more to it as modern
computers are more used for data processing (65%-75%) rather than
number-crunching (35%-25%).
•A Computer takes input in form of data, processes and stores it and
gives back the results in form of information as output.
•Digital Computer - A Digital Computer is an electronic machine that
manipulates the data according to a set of well-defined instructions.
•Mechanical Computers were in use before the evolution of digital
computers around mid-20th century. E.g., Abacus or Analytical
Engine (of Charles Babbage)
Computer Defined
Cont...
5. Mudit khetan
1. Automatic – no human intervention needed once a job
is submitted in totality.
2. Fast Processing – modern PCs can process data in
microseconds (10-6) and nanoseconds (10-9)
3. Accurate – fairly and consistently accurate upto a
given degree. Works on GIGO principle (Garbage-In-
Garbage-Out)
4. Enormous Storage Space – the data once stored can be
retrieved as and when needed and does not get eroded
with time.
5. Diligent – unlike humans, free from monotony,
tiredness, and lack of concentration.
Features of Digital Computer
Cont...
6. Mudit khetan
6. Versatile – if a task is defined as series of well-defined
steps, then any task can be performed.
7. Obedient – does not have any I. Q. and cannot make
any decisions.
8. No Feelings – decisions based on the instructions
given in programs written by humans. Devoid of any
feelings.
Features of Digital Computer
7. Mudit khetan
Scientific Research
Space Exploration, Complex Computations, Nuclear
Reactors, Oil and Gas Explorations, Simulations
Business and Commercial
HR and Payroll, Customer relations, Supply chain,
Banking and Finance, Stock Markets
Defense and Military
Radar and Signals, Fighter jets, Tanks, Secure
Communication, Remote sensing
Entertainment
Television, Movies (Hanuman), Cartoons, Special Visual
Effects (Matrix), Modern mixing of music (A R Rehman)
Gaming
Online games, offline computer games, gaming consoles,
video games
Application Areas
Cont...
8. Mudit khetan
Education
Preparation and delivery of information (this lecture),
Multimedia for better understanding, Visual effects for more
impact
Medical and Life Sciences
Radiology, Patient monitoring, Nano-injectives and drug
carriers and cleaners, Custom drug design
Communications
Robust communications channels, faster data transfer,
secure networks, computing grids, mobile communications,
GPRS, GPS, WiFi, WiMax
Designing
Industrial design, product design, fashion designing,
architectural designing, interiors designing
Application Areas
Cont...
9. Mudit khetan
Publications
Page layout, simplified editing and preparation of content,
faster and efficient indexing, e-books, e-book readers, online
journals
Graphics and Imaging
Remote sensing, Publishing, Digital photography, Mapping,
Navigational systems
Automobile
Computer controlled fuel injection, security of vehicle,
positioning, sensors to detect malfunctioning, sensors to
avoid accidents, sensors to check the health and condition of
driver
Application Areas
10. Mudit khetan
Pre-Modern Computers
•Blaise Pascal invented mechanical adding machine in 1642.
•Baron Gottfried invented first calculator in 1671.
•Charles Babbage – considered father of modern computing – first gave
idea of a programmable computer and proposed a mechanical
computer “Difference Engine” in 1822. He also proposed an
improved and fully automatic “Analytical Engine” in 1837. Both his
works did not conceptualised until after his death.
•Machines with keyboards (for input) originated in USA around
1880s.
•Herman Hollerith introduced punched cards around same time
(1880s) as input and storage media – very popular until late 1970s.
Evolution of Computers
Cont...
11. Mudit khetan
Modern Digital Computer generations
Five generations of modern computers based on a fundamental
change in design of components or architecture used.
•1st Generation – early-1940s to mid-1950s
•2nd Generation – mid-1950s to mid-1960s
•3rd Generation – mid-1960s to mid-1970s
•4th Generation – mid-1970s to late-1980s
•5th Generation – early-1990s to Present
Evolution of Computers
Cont...
12. Mudit khetan
1st Generation Computers – 1942 to 1955
Key Technologies
Vacuum tubes, Electromagnetic relay memory, Punched cards
secondary storage
Key Software Technologies
Stored program concept, Machine and assembly languages, Mostly
scientific applications
Key features
Bulky, highly unreliable, very costly, higher power consumption,
higher heat dissipation, very high maintenance cost, limited
commercial use, difficult to use/operate, difficult to mass-produce
Representative systems
ENIAC, EDVAC, EDSAC, UNIVAC-I, IBM 701
Evolution of Computers
Cont...
13. Mudit khetan
2nd Generation Computers – 1955 to 1964
Key Technologies
Transistors, Magnetic core memory, Magnetic tape, magnetic disks
Key Software Technologies
Batch Operating Systems, High-level programming languages,
Scientific and commercial applications
Key features
Faster, smaller, more reliable and easier to program that
predecessors; commercial production still difficult and costly
Representative systems
Honeywell 400, IBM 7030, CDC 1604, UNIVAC LARC
Evolution of Computers
Cont...
14. Mudit khetan
3rd Generation Computers – 1964 to 1975
Key Technologies
ICs with SSI and MSI technologies, Larger magnetic core memory,
Larger magnetic tapes and disks, Minicomputers – capable of being
upgraded to mainframes
Key Software Technologies
Timesharing OS, Standardization of HLLs, Unbundling of software
from hardware
Key features
Faster, reliable, smaller, and easier to produce and use;
Commercially easier to use, produce and upgrade; Scientific,
commercial and online-interactive applications
Representative systems
IBM 360/370, PDP-8, PDP-11, CDC-6600
Evolution of Computers
Cont...
15. Mudit khetan
4th Generation Computers – 1975 to 1989
Key Technologies
ICs with LSI and VLSI, Microprocessor based semiconductor memory,
Larger capacity hard-disks as built in secondary storage, magnetic tapes and
floppy disks as portable secondary storage, Advent of PCs, Supercomputers
based on parallel and vector processing, evolution and spread of computer
networks
Key Software Technologies
OS for PCs with GUI, Multiprocessing OS, UNIX with C the most popular
combo, Object-oriented design and programming, Network-based and
supercomputer oriented applications
Key features
Small, affordable, reliable, and easy to use PC; More powerful mainframes
and supercomputers; Totally general purpose machines and programming
languages; easier to upgrade; rapid application development
Representative systems
IBM PC with its clones, Apple II, TRS 80, VAX 9000, Cray-1, Cray-2, Cray-
x/MP
Evolution of Computers
Cont...
16. Mudit khetan
5th Generation Computers – 1989 to Present
Key Technologies
ICs with ULSI; Multi-core processors for PCs; larger capacity maim
memory; RAID HDDs; Optical discs; Notebooks, laptops, smart phones;
Powerful server and supercomputers; Internet; cluster computing.
Key Software Technologies
Micro-kernel based multi-threaded OS; Distributed OS; Parallel
programming libraries like MPI and PVM; Java; WWW; Multimedia and
Internet applications.
Key features
Portable computers; Powerful, cheaper, easier to use and more reliable
desktops; plug-and-play devices; high up-time;
Representative systems
Pentium PCs, IBM notebooks, SUN Workstations, IBM SP/2, PARAM
10000, SGI Origin 2000.
Evolution of Computers
Cont...
18. Mudit khetan
The System Concept
1. A System has more than one component
2. All components of a system are logically related and
inter-dependent on each other
3. Components try to achieve a common goal under
common supervision and control
4. The system interacts with its environment and receives
input from it and sends output
Building Blocks of a Computer
Cont...
20. Mudit khetan
Five basic operations
• Inputting – Process of entering data and instructions.
• Storing – Saving data and instructions in primary
memory for making them available for processing
unit; saving data and instructions on secondary
storage for later use.
• Processing – Performing arithmetic and logical
operations on data to convert them to useful
information.
• Outputting – Producing information for consumption
by the user in hard copy or soft copy.
• Controlling – Directing the manner and sequence in
which all above operations will be performed.
Building Blocks of a Computer
Cont...
21. Mudit khetan
Input Unit
• Inputs or reads data and instructions from the
environment.
• Converts the input into computer understandable
format.
• Supplies converted data and instructions to primary
memory for further operations.
• Many types of input devices
Character input – keyboard
Point-and-click input – mouse, joystick, track ball
Optical input – digital cameras, scanner
Audio input – microphone
Building Blocks of a Computer
Cont...
22. Mudit khetan
Building Blocks of a Computer
Cont...
Output Unit
• Accepts results from the computer system in encoded
form (not understandable by humans).
• Converts these encoded results into human
understandable format.
• Supplies converted information to output devices.
• Many types of output devices
Visual display – monitor, projector
Hard copy output – printer, plotter
Audio output – speakers
23. Mudit khetan
Storage Unit – stores:
• input data and instructions;
• intermediate results of processing; and
• final results after processing, before they are released
to output devices
Three type of storage
• Primary (or main) memory
• Secondary (or direct-access) memory
• Tertiary (or archival) memory
Building Blocks of a Computer
Cont...
24. Mudit khetan
Primary Memory
• Holds instructions of a running program
• Input data, intermediate results, and final results
• Only memory system directly accessible by the CPU
• Built using semiconductor based microchips
• Fast in operations
• Expensive
• Volatile – looses contents on power cut
Some Forms
• RAM – Random access memory (read/write)
• ROM – Read-only memory (it is also RAM)
• Cache – a faster and more expensive memory to reduce
speed mismatch between processor and main memory
• CPU registers – private memory of CPU
Building Blocks of a Computer
Cont...
25. Mudit khetan
Building Blocks of a Computer
Cont...
Secondary Memory
• Holds stored program instructions
• Holds data and information regarding stored
programs
• Large in capacity
• Built using magnetic discs
• Slower in operations compared to main memory
• Cheap
• Non-Volatile
• On-demand direct-access storage unit
Some Forms
• HDD
• Floppy disks
26. Mudit khetan
Tertiary Storage
• Holds data and programs that are rarely used
• Very cheap
• Very slow access – requires manual intervention to
load memory unit onto system
• Very large amount of data
• External Magnetic tape drive – sequential access
storage
• Optical discs – like CD, DVD, BluRay discs provide
direct access storage
Building Blocks of a Computer
Cont...
28. Mudit khetan
Building Blocks of a Computer
Cont...
Central Processing Unit – CPU
• Brain of the computer
• Responsible for executing instructions and controlling
functions of other components of the computer system
• Comprises of ALU and CU
ALU – Arithmetic and Logic Unit
• Performs arithmetic and logical computations
CU – Control Unit
• Responsible for overall control of the functioning of
the computer system
ALU + CU = CPU
29. Mudit khetan
Non-positional Number Systems
•Roman Number System – I, II, IX, XXI, XIL, ...
Positional Number Systems
•Decimal Number System – base 10 – digits 0 to 9
1 = 100
10 = 101
100 = 102
...
100000 = 105
1234 = 1000 + 200 + 30 + 4 = (1 x 103) + (2 x 102) + (3 x 101)
+ (4 x 100)
•Binary Number System – base 2 – binary digits (bits) 0 and 1
•Octal Number System – base 8 – octal digits 0 to 7
•Hexadecimal Number System – base 16 – hex-digits 0 to 9
and A to F (for values 10 to 15)
Number Systems
Cont...
30. Mudit khetan
Steps of conversion from Decimal to Binary
Ex. Convert decimal 12 to binary (base 2)
• Divide the decimal number by the other base and store the remainder
and quotient: (% operator denotes integer division to compute
remainder)
12 % 2 = 0 remainder
12 / 2 = 6 quotient
2. Repeat the same process, this time with the quotient as new dividend
until 0 results in quotient:
6 as dividend
6 % 2 = 0 remainder
6 / 2 = 3 quotient
3 as dividend
3 % 2 = 1 remainder
3 / 2 = 1 quotient
1 as dividend
1 % 2 = 1 remainder
1 / 2 = 0 quotient
Cont...
Number Systems
31. Mudit khetan
Steps of conversion from Decimal to Binary – cont...
3.Arrange all the remainders in reverse order starting from the last one:
1100
The above value is the binary equivalent of decimal 12, written as
(12)10 = (1100)2
Steps of conversion from Decimal to Other bases (octal and
hexadecimal)
•Same steps are repeated for conversion to base 8 and base 16.
•When arranging remainder values, in case of base 16, replace remainder 10
by A, 11 by B, and so on till 15 by F.
Cont...
Number Systems
32. Mudit khetan
Steps of conversion from Binary to Decimal
Ex. Convert binary 10101 to decimal
Re-write the number with each digit separately being multiplied by a power
of its base. The powers start at 0 from the right most binary-digit (or bit).
(10101)2 = (1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 20)
= (1 x 16) + (0 x 8) + (1 x 4) + (0 x 2) + (1 x 1)
= 16 + 0 + 4 + 0 + 1
= (21)10
Steps of conversion from other bases to Decimal
Steps remain the same, with the only difference that in case of hexadecimal
numbers replace A with 10, B with 11 and so on till F with 15.
Cont...
Number Systems
33. Mudit khetan
Equivalent Decimal, Binary, Octal and Hexadecimal values
Cont...
Number Systems
Decimal Binary Octal Hexadecimal
0 00000 00 0
1 00001 01 1
2 00010 02 2
3 00011 03 3
4 00100 04 4
5 00101 05 5
6 00110 06 6
7 00111 07 7
8 01000 10 8
9 01001 11 9
10 01010 12 A
11 01011 13 B
12 01100 14 C
13 01101 15 D
14 01110 16 E
15 01111 17 F
16 10000 20 10
34. Mudit khetan
Converting Binary to Octal
Ex.: Convert (1101011)2 to Octal
Arrange the bits of the number into groups of 3 starting from right (pad leading zeros
in the left-most group if necessary):
001 101 011
Write the appropriate octal digit as per the binary value:
Binary: 001 101 011
Octal : 1 5 3
(153)8 is the desired result
Converting Binary to Hexadecimal
Ex.: Convert (1101011)2 to hexadecimal
Arrange the bits of the number into groups of 4 starting from right (pad leading zeros
in the left-most group if necessary):
0110 1011
Write the appropriate hexadecimal digit as per the binary value:
Binary : 0110 1011
Hexadecimal : 6 B
(6B)16 is the desired result
Cont...
Number Systems
35. Mudit khetan
Converting Octal to Binary
Ex.: Convert (23)8 to binary
Replace each of the octal digits with three bits representing that number.
Octal : 2 3
Binary: 010 011
The equivalent binary value is, therefore, (010011)2. We can leave the leading zeros, if
any.
Converting Hexadecimal to Binary
Ex.: Convert (A2C)16 to binary
Replace each of the hexadecimal digits with three bits representing that number.
Hexadecimal : A 2 C
Binary : 1010 0010 1100
The equivalent binary value is, therefore, (101000101100)2. We can leave the leading
zeros, if any.
Number Systems
36. Mudit khetan
Type of Data in a Computer System
•Numeric Data: Consists of numeric values only – 0, -23, 127, ...
•Alphabetic Data: Consists of only the letters A-Z, in uppercase and
lowercase and blank space.
•Alphanumeric Data: Consists of a string of alphabets, digits, blank
spaces and other characters like operators (+, -, *, /,...), punctuation
symbols, and special characters.
•Binary Data: Other data like images, audio files, video files,
executable programs, etc.
Computer Codes
Cont...
37. Mudit khetan
Type of Data in a Computer System
•Numeric Data: Consists of numeric values only – 0, -23, 127, ...
•Alphabetic Data: Consists of only the letters A-Z, in uppercase and
lowercase and blank space.
•Alphanumeric Data: Consists of a string of alphabets, digits, blank
spaces and other characters like operators (+, -, *, /,...), punctuation
symbols, and special characters.
•Binary Data: Other data like images, audio files, video files,
executable programs, etc.
Computer codes are binary representation of various plain-
text data in a computer system. They provide a mapping from
the human-understandable representation to computer-
understandable representation of all plain-text data.
Computer Codes
Cont...
38. Mudit khetan
•A Computer code is a binary coding scheme having a unique
group (string) of bits to represent every symbol that appears in
the data.
•The bits are grouped together in groups of 8-bits, called a byte.
•A byte is also the minimum unit of data processing in most
computer systems.
•Most popular and widely used codes throughout the history of
digital computers have been BCD, EBCDIC, ASCII, and more
recently UNICODE.
•BCD and EBCDIC codes were mainly used until late-1980s.
•The ASCII code were proposed with the advent of the
microcomputer (or PC) as they were more easy to use and follow.
•UNICODE was proposed in 1992 and formalized in 1995 and is
best suited for internationalization and multi-lingual support,
due to rapidly growing impact of the Internet and WWW.
Computer Codes
Cont...
39. Mudit khetan
ASCII Code
•American Standard Code of Information Interchange
•ASCII-7 uses 7 bits to represent data – upto 27 or 128
different symbols
•ASCII-8 uses 8 bits to represent data – upto 28 or 256
different symbols
•First 128 characters are same in both
Computer Codes
Cont...
40. Mudit khetan
ASCII Code
Coding scheme for decimal digits and uppercase alphabets in
ASCII-7 and ASCII-8
For ex.:
1) the value 12 will be written as 00110001 00110010 in ASCII.
2) the value DATA will be written as 01000100 01000001 01010100
01000001 in ASCII.
In case of ASCII-7 only the right most 7 bits are used and the MSB is
always 0.
Computer Codes
Cont...
Zone Digit
0 0000 30
to to to
9 1001 39
A 0001 41
to to to
O 1111 4F
P 0000 50
to to to
Z 1010 5A
0100
0101
Character
ASCII-7/ASCII-8 Hexadecimal
Equivalent
0011
41. Mudit khetan
UNICODE : UTF-8, UTF-16 and UTF-32
•Needed to support international applications in multiple languages
•No existing coding system was capable of representing all major
languages of the time
•Consistent way of encoding multilingual plain text
•Defines codes for almost all major languages of the world
•Defines codes for special characters, mathematical and scientific
symbols, technical symbols and phonetic symbols.
•A 16-bit code – can define more than a million characters
•Each character has a unique numeric value and a name
•Compatible with ASCII as similar characters have same numeric
code values
•Support for bi-directional presentation of data with a simplistic
algorithm.
Computer Codes
Cont...
42. Mudit khetan
Collating Sequence
•Defines an intrinsic ordering of characters in the coding scheme
•Required to order the actual data
•The same characters may have different ordering depending on the
computer code used
•The natural order:
•Letters are considered in alphabetic order: A < B < C ... < Z
•Digits are considered in numeric order: 0 < 1 < 2 ... < 9
•The relative ordering of digits and alphabets is dependent on the
code used
•In EBCDIC letters come before digits, thus: A1 < 1A < 12
•In ASCII digits come before alphabets, thus: 12 < 1A < A1
Computer Codes
Cont...
43. Mudit khetan
Reason for using binary instead of decimal numbers
•Data handled in electronic and electrical components
•Easier of such components to work in dual state rather than
multiple states
•Binary numbers (0 and 1) can emulate the dual state of a
digital computer absence or presence of a signal
•It leads to:
• Simpler circuit design
• Lesser cost of design
and production
• More reliable circuits
•Normal decimal arithmetic rules
can be applied on binary numbers
•Binary arithmetic is simple to learn
as only two digits – 0 and 1
Computer Arithmetic
Cont...
44. Mudit khetan
Rules for binary addition
0 + 0 = 0
0 + 1 = 1
1 + 0 = 1
1 + 1 = 0 plus a carry of 1 to the next higher column
Rules for binary subtraction
0 - 0 = 0
0 - 1 = 1 with a 1 borrow from the next higher column
1 - 0 = 1
1 - 1 = 0
Computer Arithmetic
Cont...
45. Mudit khetan
Examples of binary addition
1) Add binary 10011 and 1001 in both binary and decimal forms:
Binary Decimal
Carry 11 1
10011 19
+01001 +09
11100 28
2) Add binary 100111 and 11011 in both binary and decimal forms:
Binary Decimal
Carry 11111 1
100111 39
+011011 +27
1000010 66
Computer Arithmetic
Cont...
46. Mudit khetan
Examples of binary addition
Subtract binary 1110 from 10101 in both forms:
Binary Decimal
12
0202 1
10101 21
-01110 -14
00111 07
Computer Arithmetic
Cont...
Borrow
47. Mudit khetan
Complement of a Number (or 1’s Complement)
C = Bn – 1 – N
Here,
C is the complement of the number
B is the base (binary, decimal, etc.) of the number
n is the number of digits in the number
N is the number
Ex. 1) Find complement of (37)10
C = 102 – 1 – 37
= 100 – 1 – 37
= 62
Ex. 2) Find complement of (6)8
C = 81 – 1 – 6
= 8 – 1 – 6
= 1
Computer Arithmetic
Cont...
48. Mudit khetan
Complement of a Binary Number
1’s complement of a binary number can be obtained by using the
formula stated or more easily by converting all 1s in the number to
0s and all 0s to 1s.
Ex: Find the complement of binary 101010
C = 26 – 1 – 101010
= 1000000 – 1 – 101010 (because 26 = 6410 = 1000000)
= 010101
Computer Arithmetic
Cont...
49. Mudit khetan
Complementary method of subtraction - An additive approach
to the subtraction
Step 1: find the complement of the subtrahend
Step 2: add this complement result to the minuend
Step 3: (a) if there is a carry of 1, add it to the result; the result is a +ve
number
(b) if there is no carry, then recomplement the resultant sum;
attach a minus sign to the result as it is –ve.
Ex. 1) Subtract 5610 from 9210 using complementary method
(1) Complement of 56 = 102 – 1 – 56 = 43
(2) 92 + 43 = 135 (here leftmost 1 is the carry)
(3) 35 + 1 = 36 => 92 – 56 = 36
Ex. 2) Subtract 3510 from 1810 using complementary method
(1) Complement of 35 = 102 – 1 – 35 = 64
(2) 18 + 64 = 82
(3) Complement of 82 = 102 – 1 – 82 = 17 (as no carry in last step)
(4) Attach a – symbol to get the result as -17.
Computer Arithmetic
Cont...
50. Mudit khetan
Complementary method of binary subtraction
Ex. 1) Subtract 01110002 (5610) from 10111002 (9210) using complementary
method
(1) Complement of 0111000 = 26 – 1 – 0111000 = 1000111
(2) 1011100 + 1000111 = 10100011 (here leftmost 1 is the carry)
(3) 0100011 + 1 = 100100 (equal to 3610)
Ex. 2) Subtract 1000112 (3510) from 0100102 (1810) using complementary
method
(1) Complement of 100011 = 26 – 1 – 100011 = 011100
(2) 010010 + 011100 = 101110
(3) Complement of 101110 = 26 – 1 – 101110 = 010001 (as no carry in
last step)
(4) Attach a – symbol to get the result as -010001 or -17 in decimal.
Computer Arithmetic
Cont...
51. Mudit khetan
Rules for binary multiplication
0 x 0 = 0
0 x 1 = 1
1 x 0 = 1
1 x 1 = 1
Ex.: Multiply 10102 (1010) by 10012 (910)
1010
x1001
1010
1010XX
1011010
Computer Arithmetic
Cont...
52. Mudit khetan
Rules for binary division
0 ÷ 0 = Divide by zero error
0 ÷ 1 = 0
1 ÷ 0 = Divide by zero error
1 ÷ 1 = 1
Rules:
1) Start from the left of the dividend
2) Perform a series of subtractions in which the divisor is
subtracted from the dividend
3) If a subtraction is possible, then put a 1 in quotient and
subtract
4) If subtraction is not possible, then put a zero in the quotient
and use one more digit form the right hand side of the
dividend
5) Bring down the next digit to add to the remainder and
repeat the process.
Computer Arithmetic
Cont...
54. Mudit khetan
Additive method of multiplication and division
Most computers use additive method of multiplication and division.
Multiplication: 8 x 4 = 8 + 8 + 8 + 8 = 32
Division: 1) Subtract the divisor repeatedly from the dividend until the
result of the subtraction becomes less than or equal to zero
2) If the result of subtraction is zero, then:
(a) quotient = total number of times subtraction was
performed
(b) remainder = 0
3) If the result of the subtraction is less than zero, then:
(a) quotient = total number of times subtraction was
performed minus 1
(b) remainder = result of the subtraction previous to the last
subtraction
Computer Arithmetic
Cont...
55. Mudit khetan
Additive method of multiplication and division
Ex.: divide 1510 by 710 using additive method
15 – 7 = 8
8 – 7 = 1
1 – 7 = -6
Total subtractions = 3
Quotient = 3 – 1 = 2 (ignore last subtraction as it resulted in negative
result)
Remainder = 1 (result of previous subtraction)
Computer Arithmetic
56. Mudit khetan
•Algebra to deal with binary number systems
•George Boole (1815 -1864), an English mathematician,
developed it.
•Used extensively in designing electronic circuits used in
computers
•Use of binary digits: two possible values 0 or 1
•Logical addition: symbol ‘+’, called logical OR, is used for
binary addition
•Logical multiplication: symbol ‘.’, called logical AND, is used
for binary multiplication
•Complementation: symbol ‘-’ or a bar or ‘!’, called logical
NOT, is used for complementation
Boolean Algebra
Cont...
57. Mudit khetan
Precedence Rules
•Each operator has a precedence level
•Higher precedence operators are evaluated first
•Expressions are evaluated from left to right
•Parenthesis or () can be used to override default precedence
•Precedence (decreasing order): NOT > AND > OR
Boolean Algebra
Cont...
58. Mudit khetan
Postulates of Boolean algebra
Postulate 1:
(a) A = 0, iff A is not equal to 1
(b) A = 1, iff A is not equal to 0
Postulate 2:
(a) A + 0 = A
(b) A . 0 = 0
Postulate 3:
(a) A + 1 = 1
(b) A . 1 = A
Postulate 4: Commutative Law
(a) A + B = B + A
(b) A . B = B . A
Postulate 5: Associative Law
(a) A + (B + C) = (A + B) + C
(b) A . (B . C) = (A . B) . C
Boolean Algebra
Cont...
59. Mudit khetan
Postulates of Boolean algebra – cont...
Postulate 6: Distributive Law
(a) A . (B + C) = (A . B) + (A . C)
(b) A + (B . C) = (A + B) . (A + C)
Postulate 7:
(a) A + !A = 1
(b) A . !A = 0
The Principle of Duality
There is a precise duality between the operators AND and OR and
boolean values 0 and 1. Therefore, if a particular theorem is proved,
its dual theorem need not to be proved separately.
Boolean Algebra
Cont...
61. Mudit khetan
Boolean Functions
•A boolean function is an expression formed with:
• Binary variables
• Boolean operators (AND, OR, NOT)
• Parentheses and equal sign
•The value of a boolean function can be either 0 or 1
•A boolean function may be represented as:
• An algebraic expression, or
• A truth table
Boolean Algebraic Function
W = X + !Y . Z
• Variable W is a function of X, Y and Z and can be written as
W = f (X, Y, Z)
• X, Y and Z are literals in the function
• A given boolean function can have more than one algebraic
expressions
Boolean Algebra
Cont...
62. Mudit khetan
Truth Table for a Boolean Function
For the following boolean expression the truth table represents all the
possible combinations of the literals in the expression and the
resultant outcome
W = X + !Y . Z
•The number of rows in the truth table is equal to 2n, where n is the number of
the literals in the function.
•The combinations in the table can be listed easily by counting from 0 to 2n -1
Boolean Algebra
Cont...
63. Mudit khetan
Logic Gates
•These are electronic circuits that operate on one or more input
signals to produce a standard output signal
•Building block of all circuits in a computer system
•Most basic and useful of logic gates are AND, OR, NOT, NAND,
NOR and XOR
Boolean Algebra
Cont...
The AND Gate
The logical AND operation
Output is 1 iff all inputs are 1
The OR Gate
The logical OR operation
Output is 1 if any of the inputs is 1
64. Mudit khetan
Boolean Algebra
Cont...
The NAND Gate
The complement of AND operation
Output is 1 if any of the input is 0
Output is 0 iff all inputs are 1
The NOR Gate
The complement of OR operation
Output is 1 iff all inputs are 0
Output is 0 if any one of input is 1
65. Mudit khetan
Boolean Algebra
Cont...
The NOT Gate
The logical NOT operation
Output is complement of input
The XOR Gate
The Exclusive-OR operation
Output is 1 iff only one of the inputs is 1
66. Mudit khetan
Hardware – Physical devices of a computer system
Software – Collection of programs
Program – Sequence of instruction written in a computer
language
Software Package – Group of programs that solve a specific
problem
Relationship between Hardware and Software
•Both are necessary; complementary to each other
•Same hardware can be made to do different jobs using different
software
•Hardware is one time expenditure (except for upgrades)
•Software is a continuing expenditure – one time purchases, annual
subscription, software upgrades, patches
Computer Software
Cont...
67. Mudit khetan
Types of Software
•System Software
•Applications Software
•System Utilities
System Software
•Critical to system being operational making system more effective
and efficient and easy to use
•Help hardware components work together
•Provide support for the development and execution of other
software
•Provide abstraction of hardware to other software and the user
•Examples include operating systems, device drivers, programming
language translators, communications software, etc.
•Developed by systems programmers
Computer Software
Cont...
68. Mudit khetan
Applications Software
•Solve a specific problem or do a specific task
•Developed by applications programmers
•Examples include word processors, internet browsers, electronic
spreadsheets, databases, inventory management, image processing,
special purpose applications software, etc.
System Utilities
•General purpose software that are not critical to system but add
value to it
•May be used to make system more efficient, more secure, more easy
to use, etc.
•Can be used by other software as background services or as
standalone software
•Examples are anti-virus software, speech recognition, narrator,
magnifiers, screen savers, etc.
Computer Software
Cont...
70. Mudit khetan
Computer Software
Cont...
Ways of acquiring software
•Buying off-the-shelf software – MS Office
•Ordering customized software – PNB ordered Finnacle to Infosys
•Developing customized software – The UoR Computer Centre
developed its own website and results server
•Downloading public-domain software – Open office or Linux OS
Each way has its own pros and cons
Firmware
•Firmware is software printed into the circuit (embedded) and
substitutes the specialized hardware
•Software programs are stored in the ROM that is always available
•The efficiency increases manifold
•Generally software size is limited by the size of the ROM
•Enabled production of cheap and smarter devices like automatic
washing machines, microwave ovens, ACs, etc.
71. Mudit khetan
Computer Software
Cont...
Computer Languages
•Machine Language
•Assembly Language
•High-level Language
Machine Language
•Only language understandable by hardware without translation
•Written as a string of 1s and 0s
•Very tedious to learn, use and understand
•Very error-prone and time consuming effort
•Non-portable and hardware dependent
•Very-very fast execution of instructions
72. Mudit khetan
Computer Software
Cont...
Assembly Language
•Also called symbolic language as it uses mnemonics
•Mnemonics are alphanumeric codes used instead of strings of binary
instructions (1s and 0s) – ADD used in place of 11002
•Uses very structured English constructs for giving instructions – SET
VAR_X1 TO MEM[100]
•Easy to use, understand and learn and fairly efficient
•Easy to modify the program
•Hardware dependent like machine language
•Uses an Assembler to translate code into machine language
73. Mudit khetan
Computer Software
Cont...
High-level Languages
•Machine independent
•Programmers need not bother anymore about computer’s
architecture
•Uses structured English and familiar mathematical symbols and
expressions
•Makes use of easier constructs to control the flow of execution
•Allows modularization and breaking of the code into manageable
pieces that can work together and stored in a library
•Make use of high-level language translators like interpreter and
compiler
•An interpreter translates the code on-the-fly and does not produce
object code for later use
•A compiler translates the complete program at one go and produces
object code for direct use later – faster than interpreted code
76. Mudit khetan
Bandwidth – Range of frequencies available for data
transmission; refers to data transmission rate.
Baud – Unit of measurement of data transfer; measured in bits
per second (bps).
Narrowband – Sub-voice grade channels; speed 45 to 300
baud; mainly used for telegraph lines or low-speed terminals.
Voiceband – Voice grade channels; upto 9600 baud; used for
ordinary telephone voice communication or slow I/O devices.
Broadband – High speed channels; atleast 1 million baud;
used for high-speed computer-to-computer communication or
for simultaneous transmission of data.
Computer Networks
Cont...
77. Mudit khetan
Communication Media
Wired
•Twisted-pair (UTP) cables
•Coaxial cables
•Copper wire
•Fiber optic cables
Wireless
•Microwave system (Radio Link)
•Satellite communication
•Infrared
•WiFi
•Bluetooth
•WiMax
Computer Networks
Cont...
78. Mudit khetan
•Conversion might also take place at any intermediate
nodes as well.
•Modulation – conversion from digital to analog signal.
•Demodulation – conversion from analog to digital
signal
•Modem – The device that can Modulate as well as
Demodulate.
•Digital transmission is preferred over analog
transmission due to lower cost, higher transmission
rates and lesser error rate.
Digital and Analog Data Transmission
•Analog Signal – Transmitted power varies over a continuous range; ex.
sound, light, and radio waves.
•Digital Signal – Sequences of voltage pulses of fixed time durations
represented in binary form.
•Computer generated data are in digital form, whereas most of the carriers are
capable of carrying only analog signals.
•Conversion is required at both the sender and the receiver from digital-to-analog
and analog-to-digital, respectively.
Computer Networks
Cont...
79. Mudit khetan
Types of Connections
•Dial-up line – similar to a regular telephone line.
•Leased Line – a dedicated telephone line to permanently connect
two remote machines.
•ISDN – Integrated Services Digital Network; telephone network
that provides digital (not analog) voice and data services
•VSAT – Very Small Aperture Terminal; provides direct satellite
communication
•ATM – Asynchronous Transmission Mode; may use coaxial cables
or optical fiber for digital transmission
•Radio Link – analog transmission using microwave over distances
upto a few hundred meters
Computer Networks
Cont...
80. Mudit khetan
Multiplexing
•Dividing physical channel into many logical channels to allow a
number of independent transfers to take place
•Multiplexer converges multiple sources transmissions to a single
physical output media
•Demultiplexer splits multiple entwined signals and send them over
to respective output lines
•FDM – Frequency Division Multiplexing; bandwidth is divided
into non-overlapping frequencies treating each as a separate line.
•TDM – Time Division Multiplexing; total time is divided into equal
sized slots (time-slice) and each source is given full bandwidth upto
its slice and then next source uses the channel
Computer Networks
Cont...
82. Mudit khetan
Transmission Modes
•Asynchronous Transmission Mode – sender can send data at any time and
receiver will accept it; character-by-character irregular transmission; well
suited to remote keyboard terminals.
•Synchronous Transmission Mode – Sender and receiver must synchronize
and agree to communicate; blocks of characters framed together and sent as
a single unit; well suited for bulk data transmission like in buffered I/O
devices.
Computer Networks
Cont...
83. Mudit khetan
Switching Techniques
•Often intermediate nodes are present between the ultimate source
and sink
•Switching techniques provide a method to establish a link between
the sender and the receiver in a network
•Circuit Switching – dedicated physical path is established for
complete duration of communication
•Message Switching – receiver’s address is appended to the
complete message and forwarded through either store-and-forward
method or broadcast.
•Packet Switching – message is split into packets of almost equal
size; each packet treated like an individual message for the purpose
of transmission and each has receiver’s address attached; destination
host is responsible for reassembling of packets back to original
message.
Computer Networks
Cont...
87. Mudit khetan
Network Topologies
•Way in which nodes of a network are connected together
•Physical topologies define physical connections
•Logical topologies allow logical connections over a physical topology
Types of Network Topologies
•Star topology
•Ring Topology
•Completely connected topology
•Multi-access bus network
Computer Networks
Cont...