Presentation is loading. Please wait.

Presentation is loading. Please wait.

Topics covered Computers Fundamentals: Classification of Computers, Application of Computers, Basic organization of computer, Input and Output Devices,

Similar presentations


Presentation on theme: "Topics covered Computers Fundamentals: Classification of Computers, Application of Computers, Basic organization of computer, Input and Output Devices,"— Presentation transcript:

1 Topics covered Computers Fundamentals: Classification of Computers, Application of Computers, Basic organization of computer, Input and Output Devices, Binary Number System, Computer memory, Computer Software. Algorithms and Programming Languages: Algorithm, Flowcharts, Pseudo code, Generation of Programming Languages. 1

2 Classification of computers
Computers can be classified based on historical, purpose, technology and size/capability 2

3 3

4

5 5

6 6

7

8 8

9 9

10 Basis of purpose 10

11 11

12 12

13 Binary number system 13

14 14

15 Negative binary numbers: 2’s complement Flip zeros and ones and add 1
15

16 16

17 17

18 1101 into unsigned and signed
Unsigned (+): So 1101 = 13 in decimal Signed (+/-): If the most significant bit (MSB) is 1 then number is negative. So 1101 means a negative number. Then find its 2’s complement to find its value which is 0011. So 1101 = -3. Find signed decimal values for and

19 So the answer is 5A in hexadecimal
19

20 20

21 Memory classification
21

22 Software classification
22

23 Compiler, assembler, interpreter
Compilers are used to convert high level languages (like C, C++ ) into machine code. Example - GCC Assembler are used to convert assembly language code into machine code. Examples - X86 assemblers An interpreter is a computer program which executes a statement directly at runtime Examples: Python 23

24 Program life cycle 24

25 Malware – malacious software
25

26 Adware (short for advertising-supported software)
Bots automatically perform specific operations such as video gamings, online contests Bugs are human errors in programming Ransomware - displaying messages to demand money while locking the computer programs Rootkit – malicious remote access to computer Spyware – peeping Tom Trojan horse – password stealer Worm – exploits host computer resources Spam – Mass of unsolicited (unwanted) s 26

27 Algorithm Finite sequence of explicit and unambiguous instructions, which when provided with a set of input values produces an output and then terminates. 27

28 28

29 Flowchart It is a pictorial form of an algo
Boxes represent operations and arrows represent sequence in which the operations are executed 29

30 30

31 Pseudo code (1) Pseudo code is a generic way of describing an algorithm without using any specific programming language-related notations. (2) It is an outline of a program, written in a form, which can easily be converted into real programming statements. 31

32 32

33 5 generations of languages
First - machine language Second - assembly language Third - high-level programming languages, such as C, C++, and Java. Forth – more close to human language, etc SQL FIND ALL RECORDS WHERE NAME IS "SMITH” Fifth - languages used for artificial intelligence and neural networks. 33

34 1-4 generation examples 34

35 Programming paradigms (models)
Optional (1) Unstructured (2) Structured (3) Object oriented 35

36 Unstructured programming
Writing small and simple programs consisting of only one main function in the program. Uses goto statement to jump from any statement to any other statement (spagetti code) 36

37 Structured programming
A program is broken down into small independent tasks that are small enough to be understood easily, without having to understand the whole program at once. When these tasks are completed, they are combined together to solve the problem. Example – C language 37

38 Object oriented programming
A style of computer programming which focuses on objects (actors) and their private funcionality. Objects are variables of user defined data types known as classes which contain functions and variables. Objects interact by using message passing. C++ and Java are examples of OOP. 38

39 IEEE-754 32-bit floating-point - optional
39

40 How floating numbers are stored in 4 bytes?
Consider 5.2 5->101 and 0.2 -> … (record carry for 0.2x2=0.4,0.4x2=0.8, 0.8x2=1.6, 0.6x2=1.2) So 5.2 = … = …E+2 Conventional trick 127+2=129= SignBit 8-bit Expo 23-bits mantisa 40

41 C code to find the Float storage
main(){ int i; float f=5.2f; //5.2 is double by default char *p=(char *)&f; for(i=0;i<4;i++) printf("%d ",*p++); } Output: (which are decimal values of the 4th 3rd 2nd and 1st bytes) 41

42 Sign bit S = 0 ⇒ positive number
Example 1: Suppose that IEEE bit floating-point representation pattern is Sign bit S = 0 ⇒ positive number E = B = 128D (in normalized form) Fraction is 1.11B (with an implicit leading 1) = 1 + 1×2^-1 + 1×2^-2 = 1.75D The number is × 2^( ) = +3.5D 42


Download ppt "Topics covered Computers Fundamentals: Classification of Computers, Application of Computers, Basic organization of computer, Input and Output Devices,"

Similar presentations


Ads by Google