Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 1 Introduction.

Similar presentations


Presentation on theme: "Chapter 1 Introduction."— Presentation transcript:

1 Chapter 1 Introduction

2 What is a Computer? Electronic device that takes in data and instructions (input), works with the data (processing) and Put out the information (output)

3 Computer Components Hardware Software Input devices CPU
Storage devices Output devices Software System software Programs

4 Generations of Computers
First generation vacuum tube-based electronic computer. Use machine language. Very large and slow.

5 Generations of Computers
second generation transistor-based electronic computer. Reduction in size and cost. More faster Use assembly language.

6 Generations of Computers
Third generation integrated circuits replaced several individually wired transistors. Faster and smaller in size. Use programming languages such as: C Fortran Basic Cobol

7 Generations of Computers
Forth generation Use large-scale integration technology. the need to speed up the software development process Use friendly programming languages.

8 Generations of Computers
Fifth generation Very Large-Scale Integration technology (VLSI).. make use of parallel processing Artificial intelligence Prolog

9 Range of Computers Embedded Systems chips in washing machines,
laser printers hand calculators.

10 Range of Computers Microcomputers personal computers Multitasking
Networking PRICE: between $700 - $2000

11 Range of Computers Minicomputers
These perform multi-tasking and allow many terminals to be connected to their services. Business, to process large amount of data. PRICE: between $15,000 - $150,000

12 Mainframe Computers Mainframe computers are large general purpose
Large databases. government departments and the airline industry

13 Supercomputers very fast and have multiple processors.
developed for scientific applications usually involving complex arithmetic and mathematical operations.

14 Basic Computer System ALU Control Unit Registers internal bus.

15 Fetch and Execute

16 Input devices Keyboard Mouse Joystick Light pin ……

17 Introduction to Digital Concepts
Chapter 2 Introduction to Digital Concepts

18 Analog Representation
Voltage, current, movement

19 Digital Representation
Digital watch

20 Advantages of Digital Techniques
Easer to design. (processing limited values). Information storage is easy. More accuracy. Operation can be programmed. Less affected by noise.

21 Limitations of Digital Techniques
The real world is mainly analog need to be converted to digital (ADC) Process the digtal form Convert the digital output to analog (DAC).

22 Example

23 Digital Number System

24 Representing Binary Quantites

25 Digital Waveform

26 Pulse Types Periodic Pulse repeat itself at fixed intervals.
A frequency is the rate at which the waveform repeats

27 Pulse Types

28 Pulse Types Non periodic pulse
Does not repeat itself at fixed intervals.

29 Example

30 A Digital Waveform Carries Binary Information.

31 Timing Diagram Showing the relationship of all waveforms

32 Data Transfer Serial Form

33 Data Transfer Parallel form

34 Number System and Codes
Chapter 3 Number System and Codes

35 Decimal and Binary Numbers

36 Decimal and Binary Numbers

37 Converting Decimal to Binary
Sum of powers of 2

38 Converting Decimal to Binary
Repeated Division

39 Binary Numbers and Computers

40 Hexadecimal Numbers

41 Converting decimal to hexadecimal

42 Converting binary to hexadecimal
Converting hexadecimal to binary?

43 Hexadecimal numbers

44 Binary arithmetic Binary addition

45 Representing Integers with binary
Some of challenges:- Integers can be positive or negative Each integer should have a unique representation The addition and subtraction should be efficient.

46 Representing a positive numbers

47 Representing a negative numbers using Sign-Magnitude notation
-5 = bits sign-manitude -55= bits sign-magnitude

48 1’s Complement The 1’s complement representation of the positive number is the same as sign-magnitude. +84 =

49 1’s Complement The 1’s complement representation of the negative number uses the following rule:- Subtract the magnitude from 2n-1 For example: -36 = ??? +36 =

50 1’s Complement Example :- - 57 +57 = -57 =

51 Converting to decimal format

52 2’s Complement For negative numbers:-
Subtract the magnitude from 2n. Or Add 1 to the 1’s complement

53 Example

54 Convert to decimal value
Positive values:- = +89 Negative values

55 Two's Complement Arithmetic

56 Adding Positive Integers in 2's Complement Form
Overflow in Binary Addition

57 Overflow in Binary Addition

58 Overflow in Binary Addition

59 Overflow in Binary Addition

60 Adding Positive and Negative Integers in 2's Complement Form

61 Adding Positive and Negative Integers in 2's Complement Form

62 Subtraction of Positive and Negative Integers

63 Digital Codes Binary Coded Decimal (BCD)

64 BCD

65 BCD

66 4221 Code

67 Gray Code In pure binary coding or 8421 BCD then counting from 7 (0111) to 8 (1000) requires 4 bits to be changed simultaneously. Gray coding avoids this since only one bit changes between subsequent numbers

68 Binary –to-Gray Code Conversion

69 Gray –to-Binary Conversion

70 Gray –to-Binary Conversion

71 The Excess-3- Code

72 Parity The method of parity is widely used as a method of error detection. Extar bit known as parity is added to data word The new data word is then transmitted. Two systems are used: Even parity: the number of 1’s must be even. Odd parity: the number of 1’s must be odd.

73 Parity Example: Odd parity Even Parity 110010 110011 11001 111101
111100 11110 110001 110000 11000

74 Logic Gates and Boolean Algebra
Chapter 4 Logic Gates and Boolean Algebra

75 Introduction Logic gates are the actual physical implementations of the logical operators. These gates form the basic building blocks for all digital logic circuits. Logic gates process signals which represent true or false.

76 Switch S1 AND Switch S2 must be closed to light the lamp
Introduction Gates are identified by their function: NOT, AND, NAND, OR, NOR, EX-OR and EX-NOR. Switch S1 AND Switch S2 must be closed to light the lamp Switch S1 OR Switch S2 (or both of them) must be closed to light the lamp

77 Truth Table A truth table is a means for describing how a logic circuit's output depends on the logic levels present at the circuit's inputs.

78 Logic Gates and Circuit Diagrams
OR Gate

79 Logic Gates and Circuit Diagrams
AND Gate

80 Logic Gates and Circuit Diagrams
NOT Gate

81 Logic Gates and Circuit Diagrams
NOR Gate

82 Logic Gates and Circuit Diagrams
NAND Gate

83 Logic Gates and Circuit Diagrams
EX-OR gate The 'Exclusive-OR' gate is a circuit which will give a high output if either but not both, of its two inputs are high. EX-NOR gate is The inversion of EX-OR Gate

84 Describing Logic Circuits Algebraically

85 Describing Logic Circuits Algebraically

86 Evaluating Logic Circuit Outputs

87 Evaluating Logic Circuit Outputs

88 Determining Output Level from a Diagram

89 Implementing Circuits From Boolean Expression

90 Boolean Algebra Simplification of logical circuits.
One tool to reduce logical expressions is the mathematics of logical expressions. The rules of Boolean Algebra are simple and straight-forward, and can be applied to any logical expression.

91

92 Boolean Algebra

93 Boolean Algebra

94 Boolean Algebra (A’B)’(A+B) Solution: (A + B’) (A + B)
AA + B’A + AB + B’B A + B’A + AB A + AB A AB(A + B’C +C) Solution: ABA + ABB’C + ABC AB ABC AB + ABC AB

95 Boolean Algebra

96 Universality of NAND & NOR Gates

97 Universality of NAND & NOR Gates

98 Alternate Logic Gate Representations

99 Forms and Definitions of Boolean Expressions

100 Product of Sums Representation

101 Disjunctive Normal Form

102 Disjunctive Normal Form

103 Disjunctive Normal Form

104 Disjunctive Normal Form
Using truth tables, convert this expression into a sum of minterms

105 Flowcharts and programming Techniques
Chapter 5 Flowcharts and programming Techniques

106 Introduction A flowchart is a diagram consisting of labeled geometrical symbols together with rows connecting one symbol to another A program flowchart pictures the sequence of instructions for solving a particular problem ( usually by means of a computer program).

107 Introduction BOUNS = 0.03 * SALARY

108 Introduction The sequence of instructions for solving a particular problem is called algorithm. Express the algorithm through a flowchart Easier to draw the flowchart than to write the program directly. Easier to understand than program Easy for development. Flowcharts are independent of any particular programming language

109 VARIABLES ,DATA-NAMES, PROGRAMMING SATATEMENTS
a variable means a data item whose value may change during the execution of the program. Examples:- Salary Bouns AVERAGE Assignment Statements Salary = 500 Bouns = 0,03*Salary AVERAGE = ( T1+T2+T3)/3

110 VARIABLES ,DATA-NAMES, PROGRAMMING SATATEMENTS
HOURS = HOURS + 12 Counter = Counter + 1

111 Input/Output Statements
Read NUMBER, HOURS,RATE Write NUMBER, GROSS , NET

112 FLOWCHART SYMBLOS

113 FLOWCHART SYMBLOS Terminal symbol Input/Output symbol

114 FLOWCHART SYMBLOS process symbol

115 FLOWCHART SYMBLOS Decision symbol.

116 FLOWCHART SYMBLOS Example: A company plans to give a year-end 3% to each of its employees. However, if an employee has been working 10 or more years at the company , he is to get an additional $50.

117 FLOWCHART SYMBLOS

118 FLOWCHART SYMBLOS Example: The HP company plans to give a year-end 3% bonus to each of its employees earning $10,000 or more per year , and a fixed $300 bonus for the other employees.

119 FLOWCHART SYMBLOS

120 LOOPS AND THEIR CONTROL BY A COUNTER

121 LOOPS AND THEIR CONTROL BY A COUNTER

122 CONTROL OF LOOPS BY HEADER OF TRALIER RECORDS
Control by a Header Record

123 CONTROL OF LOOPS BY HEADER OF TRALIER RECORDS
Control by a Trailer Record

124 ACCUMULATORS

125 ACCUMULATORS Example : Suppose that a company wants to find the total salary paid to its employees of a company.

126 TWO SPECIAL ALGORITHMS:
The average of the salaries,

127 TWO SPECIAL ALGORITHMS:
The largest salary

128 DO LOOPS

129 DO LOOPS Example: A company has 80 employees . Draw a flowchart to find the average salary and the number of employees earning above the average salary

130

131 Example


Download ppt "Chapter 1 Introduction."

Similar presentations


Ads by Google