1 / 50

foc

foc. Introduction. Evolution of computers. First: abacus , a help to calculation BC 500 :Babylon. 1642 B laise Pascal improves it. See d time gap!. 1823 C harles Babbage A da Byron , Analytical Engine.

aquene
Download Presentation

foc

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. foc Introduction

  2. Evolution of computers First: abacus, a help to calculation BC 500 :Babylon 1642 Blaise Pascal improves it. See d time gap! 1823 Charles Babbage AdaByron, Analytical Engine It stored 1000 twenty digit decimal numbers and a modifiable program so that , it could do different computing jobs

  3. Evolution of computers It had 50,000 mechanical parts, and still it could not give reliable results. Lacked precision! More the parts, more the trouble! Too many cooks spoil the broth! Too many leaders, spoil the people

  4. Evolution of computers With the advent of electrical motors and machines, Hollerith, in 1889, made a machine to count, calculate and sort; still using punched cards First electronic calculating computer was developed by Konrad Zuse in 1941 and was called Z3. But Turing is credited for the first electronic computer in 1943, called Colossus. But it was not programmable.

  5. Evolution of computers The first general purpose computer was developed in 1946, was called ENIAC: Electronic Numerical Integrator and Calculator. It had 17000 vacuum tubes, over 500 miles of wire and weighed 30 tons! It could do 100,000 operations per second. Necessity is the mother of inventions! ?

  6. Evolution of computers In 1950 UNIVAC I, UNIVAC II, UNIVAC 1103 1948:Transistor 1958: general purpose computers using transistors: efficient, small and faster. 1958: Integrated Circuits. 1960: computers using small &medium scale IC 1971: single chip microprocessor (4004) 1972:8 bit microprocessor (8008) 1973:Improved 8 bit microprocessor (8080) and MC6800

  7. Evolution of computers 1974:The final 8 bit processor was 8085. 1978:8086! 1979: 8088 family of microprocessors 1981: IBM used 8088 in PC personal computer 1983: Improved version of 8086 known as 80286, A 16 bit micro processor!

  8. Evolution of computers 1986:32 bit micro processor 80386 ! 1989: the 80486 1993:Pentium in Desktops give way to lap tops, palm tops and even to cell phones these days!

  9. Languages for the computers 1950: Assembly language for UNIVAC 1957: FORTRAN. Formula translation . Then came ALGOL, COBOL, BASIC, PASCAL, C/C++, ADA and JAVA Then came OS: MS DOS, MS WINDOWS, UNIX, LINUX O S:to supervise & manage comp. Recourses. Using :- Easy for users Utilization:- Efficient .

  10. Generation of Computers

  11. Classification of computers based on size Super computer Mainframe computer Mini computer Workstations Micro computer personal Laptop/notebook Palm top

  12. Classification of computers based on purpose. General purpose Special purpose

  13. Classification of computers based on technology analog digital Hybrid

  14. Organization of a computer The basic units : CPU, memory unit, input unit output unit Input devices CPU: calculate, compare, copy… Memory module: primary and secondary

  15. Organization of a computer Memory operations: read, write Units of memory: byte, KB, MB, GB, TB, Personal computer: H/W and S/W

  16. Organization of a computer Input devices, output devices, modem, PM, PM types RAM, ROM, PROM, … Internal processor memory, secondary mem, CD rom, Memory hierarchy

  17. Software/ operating systems Loading of OS to a PC Booting, Basic I/O system Operational overview of a computer

  18. NUMBER SYSTEMS There are many systems. They used sticks for numbers. V for 5 sticks, and X for 10 sticks. About 1500 years back indians used 0 as a number which was taken to Arabs (sifr) and then to the west (Zephiro),(Zero). Every number system has a base.

  19. NUMBER SYSTEMS Our common decimal system has a base 10. so 257 is to be understood as 7 singles + 5 tens + 2 hundreds! = 257 7 * 100 + 5 * 101 + 2 * 102 = 257 5 * 101 + 7 * 100 2 * 102 +

  20. NUMBER SYSTEMS Clearly the position at which a digit is written, is significant. If the above number is written as 752, the entire meaning changes. 7* base0 + 5 * base1 + 2 * base2 = 257 The weighting factor for 7 in 257 is 100 ie 1 and for 5 is 101 ie 10 and for 2 is 102 ie 100

  21. Different number systems are Decimal Binary Duodecimal Ternary Hexadecimal Quaternary Vigesimal Quinary Octal

  22. Binary number system Here we have only two different digits namely 0 and 1. now let us find the actual value of 1100 1 1 0 0 0 * 2 0 = 0 + Multipliers are written and weights are assumed from pos 0 * 2 1 = 0 + 1 * 2 2 = 4 + 1 * 2 3 = 8 12 weight Multiplier

  23. Binary number system Find out the value of 23618 in decimal What will be the decimal equivalent of 34928 ?!

  24. Hexa decimal system • 0 0000 • 0001 • 0010 • 0011 • 0100 • 0101 • 0110 • 0111 • 1000 • 1001 • 1010 A • 1011 B • 1100 C • 1101 D • 1110 E • 1111 F Digits are from 0 to 15 ! Then how do you represent 10, 11…. • A • B • C • D • E • F

  25. Decimal to Binary conversion convert decimal 19 to binary Divide the number by 2. note the remainder 19 2 2 2 2 2 2 9 4 1 0 1 Continue the same process on the quotient, till it becomes 0 Write the remainders from the last to first order as shown by the arrow 1 0 0 1 Thus 1910 is 100112

  26. Conversion from binary to decimal. Convert 110102 to x10 1 1 0 1 0 . 0 * 2 0 = 0 + 1 * 2 1 = 2 + 0 * 2 2 = 0 + 1 * 2 3 = 8 + 1 * 2 4 = 16 26 Multiplier weight

  27. Decimal to Octal conversion:convert decimal 8410 to x8 Here we continuously divide by 8 getting the quotient and the remainder. Go on till the quotient becomes 0. write the remainders in the reverse order 8 8 84 8 We check how many 8s are there in 84. the rest should be singles! 0 1 10 4 2 1 We see there are 10 8s making it 80. rest 4 singles(80s) are there. then in this 80 we check how many 82 or 64s are there. The rest should be 8s. Thus the octal equivalent of decimal 84 is 124. We see 1 64 and 2 81s are there in 80 Finally in 1 we see 0 83s are there and rest 1 82 is there Thus 8410 is 1248

  28. Hexadecimal to decimal conversion:convert Hexadecimal 2B416 to x10 2 B 4 . 4 * 160 = 4 + 11 * 161 = 176 + 2 * 162 = 512 692 Multiplier weight Thus 2B416 is 69210

  29. Convert 894510 to x16 16 16 16 8945 16 559 34 2 0 15 F 1 1 2 Thus the Hexadecimal equivalent of decimal 8945 is 21F1 Thus 894510 is 21F116

  30. Non decimal to Non decimal conversion: In order to convert a number from any system S1 other than decimal to another system S2 other than decimal, we first convert S1 to decimal and then convert that decimal number to S2. Thus X16 to Z8 can be done by X16 Y10 and then Y10  Z8 But if the base of X is a power of Z then the conversion can be done directly as A5 == 1010 1001 in binary and Convert each digit directly into other system nibble by nibble because hexadecimal base is 15 and binary is 2 and 16 = 24. So 4 bits at a time! F8B == 1111 1000 1100 .

  31. F8B == 1111 1000 1100 1101101101 is 0011 0110 1101 === 36D 73258 111 011 010 101 . 10 011 1002 is 2348 Group the binary digits into groups of 3 from the right and convert each one to octal

  32. Conversion of fractions Convert 0.49 to binary 0.49 * 2 = 0.88  0 0.88 * 2 = 1.76  1 0.76 * 2 = 1.52  1 0.52 * 2 = 1. 04  1 0.04 * 2 = 0. 08  0 0.08 * 2 = 0. 16  0 Thus 0.49 10  0.001110 For more precision we can go further

  33. Conversion from binary fraction to decimal Convert 0. 1 0 1 1 to decimal 0. 1 0 1 1 1 * 2-1 = 0.5 + 0 * 2-2 = 0.0 + 1 * 2-3 = 0.125 + 1 * 2-3 = 0.0625 + 0.6875 Thus 0.10112 = 0.687510

  34. Conversion of octal fraction to decimal Convert 237.048 to x10 2 3 7 . 0 4 4 * 8-2 = 0 .0625 + 0 * 8-1 = 0 + 7 * 80 = 7 + 3 * 81 = 24 + 2 * 82 = 128 159 . 0625

  35. Conversion from binary fraction to octal Convert 010.110 to octal 0 1 0 . 1 1 0 . 6 2 Convert 01010.110101 to octal 0 1 0 1 0 . 1 1 0 1 0 1 . 1 2 6 5

  36. Conversion from binary fraction to Hexadecimal Convert 0110.1101 to Hexadecimal 0 1 1 0 . 1 1 0 1 . 6 13 (D) Convert 1001010.110101 to Hexadecimal 1 0 0 1 0 1 0 . 1 1 0 1 0 1 . 10 (A) 13(D) 1 4

  37. ALGORITHMS/ step forms What is algorithm? It is a plan for a computer program. An effective procedure for solving a problem in finite steps Algorithm to make Tea 1. If the kettle is not filled with water, fill it with water 2.Plug the kettle to power and switch on 3.If the tea pot is not empty, then empty the tea pot 4.Place the tea leaves in the tea pot 5.If the water in the kettle is not boiling, go to step 5 6.Switch off the kettle 7.Pour the water from the kettle to teapot . .

  38. Features of algorithm Sequence (process) relates to the order. We can not have any order for an algorithm Decision (selection) based on a condition some action is selected Repetition (looping or iteration) some action/s are repeated finite number of times Decision can be of two forms • If condition • Then action • If condition • Then action1 • Else • action2 The repetition constructs Repeat …………… Until Repeat action 1 action 2 Until condition satisfied .

  39. While (proposition) begin ………… end While(kettle is not full) Begin pour water into the kettle end While (proposition) Begin action 1 action 2 ……… action n end . . The same by using if then goto • Pour water into the kettle • If the kettle is not full, then goto step 1 • Action 1 • Action 2 • Action 3 • …… • If(proposition) then goto step 1 . .

  40. Variable is one whose value can vary. Let us write an algorithm to boil some water 1. Pour water into a kettle 2. Connect a thermometer to take temperature readings 3. Connect the plug to power and switch it on 4. If the temperature is not equal to 1000C go to step 4 Here temperature is a variable and till it reaches 100, the process continues Variabls are of different types like numeric (integer, float, double..) alphabetic ‘a’, ‘b’, or “University” logical (ie true or false type) Variable name should be meaningful. Variable names shall be meaningful nouns. . . .

  41. Other ways of planing for a program are Psuedo code Flow chart Nassi_Schneiderman . . . . . . . . . .

  42. Other ways of planning for a program are Psuedo code A human understandable, easy to use way of expressing a programe flow It uses, a well defined, restricted vocabulary. Do while kettle not full Add water to kettle End dowhile . .

  43. Flow chart It provides the steps to be followd to arrive at a solution to a problem. So it is a program design tool Flow charts comprises of a set of figures of various shapes that are connected by flow lines. Flow lines have arrows showing the direction of flow of control between the figures. The action to be taken is written in the figures. Flow charts can have connectors. Flow charts help understanding and explaining the problem to the others . . Standards for flow charts They shoiuld start at the top and flow down and to the right Only standard symbols should be used Commonly understandable language should be used (not programming lang) Flow chart for each subroutine should be drawn in separate pages with proper starting and terminal symbols! Arrows should be used to indicate the flow direction

  44. .Flow Chart Only one flow line should emerge from a process symbol Only one flow line should enter a decision symbol, whereas multiple lines can emerge from a decision symbol Only one flow line should emerge from a start and no flow line shall emerge from an end/stop Arrows should be used to indicate the flow direction

  45. .Flow Chart symbols from net Also examples from the net . . .

  46. Program cycle Define the problem Design the solution Code the program Test the program Document the program Implement the program Maintain the program Commonly understandable language should be used (not programming lang) Flow chart for each subroutine should be drawn in separate pages with proper starting and terminal symbols! Arrows should be used to indicate the flow direction

  47. compiler It checks for erros and lists them out If no error, compiler generates the machine code for the program (object code) which can be executed errors Object code in Machine language Object code compiler Syntax refers to the arrangement of words in a statement or the format/appearance or general shape of a statement ( I ate a mango) noun, verb, noun Semantics refers to the meaning/sense behind. (Mango ate i) noun verb noun but no sense

  48. Hexadecimal to decimal conversion convert Hexadecimal 28416 to x10 Convert 8410 to x8 Here we continuously divide by 8 getting the quotient and the remainder. Go on till the quotient becomes 0. write the remainders in the reverse order 8 8 84 8 10 1 0 4 2 1 Thus the octal equivalent of decimal 84 is 124. Thus 8410 is 1248

More Related