You are on page 1of 73

MIT 113: ICT SYSTEMS

BY RONALD GOLOOBA

What is ICT?
ICT Information Communications Technology It is defined as the use of electronic computers, communication devices and software application to convert, store, protect, process, transmit and retrieve information from anywhere and anytime. No formal definition because of rapid change in ICT innovations. Consider all the uses of digital technology that already exist to help individuals, businesses and organisations use information ICT is concerned with the storage, retrieval, manipulation, transmission or receipt of digital data. Importantly, it is also concerned with the way these different uses can work with each other.
2

INFORMATION
Information refers to the knowledge obtained from reading, investigation, study or research. We need information to make decision and to predict the future. The tools to transmit information are the telephone, television and radio. Information is knowledge and helps us to fulfil our daily tasks. Mention some the tasks that we fulfil with info.
3

COMMUNICATION
Communication is an act of transmitting messages. It is a process whereby information is exchanged between individuals using symbols, signs or verbal interaction. How did people communicate before? (symbols, signs, performing drama and poetry, ) In modern days people use Internet, email or video conferencing Communication is important in order to gain knowledge so that we express our thoughts.
4

TECHNOLOGY
Telephone and fax machines are the devices used in extending communication. Spreading Information to broadcast information such as news or weather reports effectively. Radio, television, satellites and the World Wide Web (WWW) are powerful tools that can be used from spreading to broadcasting information .
5

History of IT and Systems


Four basic periods Characterized by a principal technology used to solve the input, processing, output and communication problems of the time: Premechanical Mechanical Electromechanical and Electronic
6

Pre-mechanical
Writing and Alphabets--communication. Paper and Pens--input technologies. Books and Libraries: Permanent Storage Devices. The First Numbering Systems. The First Calculators: The Abacus. One of the very first information processors.

The Mechanical Age: 1450 - 1840


The first general purpose "computers" Slide Rules, the Pascaline and Leibniz's Machine. Its an early anolog computers.

The Electromechanical Age: 1840 1940.


The discovery of ways to harness electricity was the key advance made during this period. Knowledge and information could now be converted into electrical impulses. The Beginnings of Telecommunication. Tools like telephone and radio, telegraph etc. Were invented.

The Electronic Age: 1940 - Present.


The First High-Speed, General-Purpose Computer Using Vacuum Tubes: Read and make notes on the computer generations.

10

The Evolution of Computers


Calculating Machines capable of performing the elementary operations of arithmetic (Addition, subtraction, multiplication, and division) appeared in the 16th century. These were clever mechanical devices constructed from gears, leavers, Blaise Pascal (1642) Mathematician. Invented an early and influential calculator that could add and subtract decimal numbers. It was the first commercial calculator, a hand powered adding machine(50copies)

It had maintenance and labor problems and was not all that accurate

11

The Evolution of Computers


Gottfried Leibniz (1673) Mathematician and inventor extended Pascals design to one that could perform multiplication and division. Leibniz was the first to advocate for the use of the binary number system. Various attempts were made to build general purpose programmable computers from the same mechanical devices used in calculators. This was not solved until mid-20th century.

12

Charles Babbage (1822) Mathematician. He designed the first computers to perform mul-tistep operations automatically, i.e. without human intervening in every step. This was the first programmable machine called the difference Engine. It was intended to compute and print mathematical tables automatically Then he came up with the idea of Analytic engine after failing with first engine. This device, large as a house and powered by 6 steam engines, would be more general purpose in nature because it would be programmable, using punched card technology of Jacquard . It had modern structure of I/O, Storage, and ALU
13

The Evolution of Computers

The Evolution of Computers


(Electronic Computers)
A mechanical computer has drawbacks;
Its computing speed is limited by the inertia of its moving parts Transmission of digital information by mechanical means is un reliable.

In an electronic computer the moving parts are electrons, which can be transmitted and processed at almost the speed of light (300000 kms-1). In early 1900 vacuum tubes or electronic valve were developed to permit the processing and storage of digital signals at a much higher speed. Read about the generation of computers

14

The Central Processing Unit (CPU)


It is the brain of the computer. CPU or processor or Microprocessor is an electronic circuit that can execute a sequence of stored instructions called programs. The primary function of the CPU is to execute a set of instructions stored in the computers memory. The CPU fetches instructions from memory, reads and writes data from and to memory, and transfers data from and to input/output devices CPU controls all internal and external devices, performs arithmetic and logic operations. A CPU has three major components: (1) register set, (2) arithmetic logic unit (ALU), and (3) control unit (CU).
15

CPU Design

16

Control Unit
The Control Unit -- controls the fetching of instructions from the main memory and the subsequent execution of these instructions. Among other tasks carried out are the control of input and output devices and the passing of data to the Arithmetic/Logical Unit for computation.

17

ALU
The Arithmetic/Logical Unit (ALU) -- carries out arithmetic operations on integer (whole number) and real (with a decimal point) operands. It can also perform simple logical tests for equality and greater than and less than between operands.

18

Components of a CPU
Registers are temporary storage area inside a CPU
It is a high-speed memory which holds only data for immediate processing and results of this processing Two types: General purpose and Specific purpose.

19

HISTORY OF CPU
In 1971, a small unknown company, Intel, for the first time combined multiple transistors to form a central processing unit - a chip called Intel 4004. However, it was 8 years before the first PC was constructed. PC's are designed around different CPU generations
20

CPU manufacturers
Two best known makers of CPUs that is AMD and Intel. AMD's current line of processors includes Athlon, Phenom, Sempron and Turion processors Intel's current line of processors includes: the Celeron, Pentium, Core 2, Centrino and Centrino 2 processors.

21

CPU manufacturers
Today, Intel is the best-known manufacturer of computer CPUs. Most CPUs conform to the von Neumann architecture, which says that the CPU must fetch, decode, execute, and writeback the data in a fairly rapid succession.

22

What is a CPU?
The CPU is centrally located on the system board. It continually receives instructions to be executed, each instruction is a data processing order. The work itself consists mostly of calculations and data transport:

Data from CPU to other systems passes through a system Bus whish is a data pathway.

23

Type of Data
1. 2. The CPU is fed long streams of data via the system bus. It receives at least two types of data: Instructions on how to handle the other data. Data, which must be handled according to the instructions. What we call instructions is program code. That includes those messages, which we continuously send to the PC from the mouse and keyboard. Like print, save, open, etc. Data are typically user data. Think about the letter, which are writing. The contents, letters, images, etc., are user data, but then you say "print," you are sending program code (instructions):
24

8086 Compatible Instructions


The biggest job for the CPU consists of decoding the instructions and localizing data. The calculations themselves are not heavy work. The decoding consists of understanding the instructions, which the user program sends to the CPU. All PC CPU's, are "8086 compatible. 8086 is the first generation of processors where all new CPUs must be compatible with its instruction format This backward compatibility has been the industry standard ever. Thus, the new CPU's must use much effort to translate the 8086 instruction format to internal instruction codes
25

Summery of a CPU Execution Cycle


1. The next instruction to be executed, whose address is obtained from the PC, is fetched from the memory and stored in the Instruction register. 2. The instruction is decoded. 3. Operands are fetched from the memory and stored in CPU registers, if needed. 4. The instruction is executed. 5. Results are transferred from CPU registers to the memory, if needed. The execution cycle is repeated as long as there are more instructions to execute
26

Algorithm
Algorithm Is a set of unambiguous instructions for solving a problem or sub-problem in a finite amount of time using a finite amount of data. Or An algorithm is a set of rules that precisely defines a sequence of operations. An algorithm is a way of solving a type of problem, and an algorithm is applicable to many particular instances of the problem. A good algorithm is a tool that can be used over and over again.
27

Developing An Algorithm
Algorithm to Convert base-10 number to other bases While ( the quotient is not zero ) Divide the decimal number by the new base Make the remainder the next digit to the left in the answer Replace the original decimal number with the quotient
28

Example : What is 98 in base 8?


98/8 gives 12 remainder 2 12/8 gives 1 remainder 4 1/ 8 gives 0 remainder 1
answer 142

29

Developing An Algorithm
Euclids algorithm for finding the GCD (greatest common Denominator) of any two numbers A and B. Repeat: If B is zero, the GCD is A. Otherwise: find the remainder R when dividing A by B replace the value of A with the value of B replace the value of B with the value of R
30

For example, to find the GCD of 372 and 84


GCD(372, 84) Find GCD(84, 36) because 372/84 > remainder 36 Find GCD(36, 12) because 84/36 > remainder 12 Find GCD(12, 0) because 36/12 > remainder 0; Solved! GCD = 12

31

Definition of an Algorithm.
More formally, an algorithm is a sequence of computations that operates on some set of inputs and produces a result in a finite period of time In the example of finding the GCD of two numbers, the inputs are the two numbers, and the result is the GCD.

32

Representing Algorithms
Algorithms can be expressed in: Natural languages, Pseudocode, Flowcharts, Programming languages or Control tables (processed by interpreters). Natural language expressions of algorithms tend to be verbose and ambiguous, and are rarely used for complex or technical algorithms. Pseudocode, flowcharts and control tables are structured ways to express algorithms that avoid many of the ambiguities common in natural language statements. Programming languages are primarily intended for expressing algorithms in a form that can be executed by a computer, but are often used as a way to define or document algorithms.
33

REPRESENTING ALGORITHMS WITH PSEUDOCODE


Pseudocode is close enough to a real programming language that it can represent the tasks the computer must perform in executing the algorithm. Pseudocode is also independent of any particular language, and uncluttered by details of syntax, which characteristics make it attractive for conveying to humans the essential operations of an algorithm.
34

EXAMPLE OF A Pseudocode
GCD ( a, b )
While b ! = 0 {
Function name and arguments ! = means not equal indentation shows what to do while b ! = 0

r <-- a modulo b set r = a modulo b ( = remainder a/b) a <-- b set a = original b b <-- r set b = r (i.e., the remainder) } border of the while repetition return a when b = 0, return value of a as the GCD
35

CHARACTERIZING ALGORITHMS
To illustrate how different algorithms can have different performance characteristics, we will discuss a variety of algorithms that computer scientists have developed to solve common problems in computing.

36

Sequential search
Suppose one is provided with a list of people in the class, and one is asked to look up the name Debbie Drawe. A sequential search is a brute force algorithm that one can use. With a sequential search, the algorithm simply compares each name in the list to the name for which we are searching. The search ends when the algorithm finds a matching name, or when the algorithm has inspected all names in the list. Next is pseudocode for the sequential search. The double forward slash // indicates a comment. Note, too, the way we use the variable index to refer to a particular element in list_of_names. For instance, list_of_names[3] is the third name in the list.
37

Sequential_Search(list_of_names, name) length <-- length of list_of_names match_found <-- false index <-- 1 // While we have not found a match AND // we have not looked at every person in the list, // (The symbol <= means "less than or equal to.") // continue ... // Once we find a match or get to the end of the list, // we are finished while match_found = false AND index <= length { // The index keeps track of which name in the list // we are comparing with the test name. // If we find a match, set match_found to true if list_of_names[index] = name then match_found <-- true index <-- index + 1 } // match_found will be true if we found a match, and // false if we looked at every name and found no match
38

Pseudocode Functionality

Variables Names of places to store values They include quotient, decimalNumber, newBase Assignment Storing the value of an expression into a variable e.g. Set quotient to 64 quotient <-- 64 quotient <-- 6 * 10 + 4
39

Pseudocode Functionality
Output Printing a value on an output device we use terms like; Write, Print Input Getting values from the outside word and storing them into variables. Get, Read

40

Pseudocode Functionality
Repetition Repeating a series of statements for example
Set count to 1 While ( count < 10)
Write "Enter an integer number" Read aNumber Write "You entered " + aNumber Set count to count + 1

41

Pseudocode Functionality
Selection Making a choice to execute or skip a statement (or group of statements) Read number If (number < 0)
Write number + " is less than zero."

or Write "Enter a positive number." Read number If (number < 0)


Write number + " is less than zero." Write "You didn't follow instructions."
42

Pseudocode Functionality

Selection Choose to execute one statement (or group of statements) or another statement (or group of statements) If ( age < 12 ) Write "Pay children's rate" Write "You get a free box of popcorn" else If ( age < 65 ) Write "Pay regular rate" else Write "Pay senior citizens rate"
43

Top-Down Design of Algorithms

Top-Down Design Problem-solving technique in which the problem is divided into subproblems; the process is applied to each subproblem Modules Self-contained collection of steps, that solve a problem or subproblem Abstract Step An algorithmic step containing unspecified details Concrete Step An algorithm step in which all details are specified
44

Top-Down Design

Process continues for as many levels as it takes to make every step concrete Name of (sub)problem at one level becomes a module at next lower level
45

A General Example
Planning a large party

Subdividing the party planning


46

A Computer Example
Problem Create a list that includes each persons name, telephone number, and e-mail address
This list should then be printed in alphabetical order The names to be included in the list are on scraps of paper and business cards

47

Example solved

Main Enter names and numbers into list Put list into alphabetical order Print list Enter names and numbers into list
While ( more names) Enter name Enter telephone number Enter email address Insert information into list
48

Level 0

Level 1

A Computer Example
Enter names and numbers into list (revised) Level 1 Set moreNames to true While (moreNames) Prompt for and enter name Prompt for and enter telephone number Prompt for and enter email address Insert information into list Write "Enter a 1 to continue or a 0 to stop." Read response If (response = 0) Set moreNames to false
49

Prompt for and enter name Level 2 Write "Enter last name; press return." Read lastName Write "Enter first name; press return." Read firstName Prompt for and enter telephone number Level 2 Write "Enter area code and 7-digit number; press return." Read telephoneNumber Prompt for and enter email address Level 2 Write "Enter email address; press return." Read emailAddress
50

NUMBER SYSTEM

Why Learn The Number Systems? When humans are speaking to one another, they speak in a particular language made up of words and letters. Although we type words and letters in the computer, the computer does not understand the words and letters, rather, those words and letters are translated into numbers that computers talk and understand. As a computer programmer or an IT professional, you need to understand the three most common number systems that are frequently used in computers. Decimal Hexadecimal Binary
51

Why Number System?


If you have an understanding of the number systems, you will understand the following topics in computer science: You will understand how to calculate network addresses You will understand how to read memory address locations in core dumps You will understand the color definitions in web and application programming You will understand many other concepts
52

THE DECIMAL SYSTEM


This is the most commonly used numbering system. It is based on base 10 hence the prefix deci. The number 10 is called the basis or radix of the system. The basis uses numbers from 0 to 9 called digits. This gives us a general rule, stated as; Given any

positive basis or radix N, there are N different individual symbols that can be used to write numbers in the system. The values of these symbols range from 0 to N-1
53

Different Symbols for the Different Bases


In binary N = 2 therefore there only two symbols i.e. 0 and 1. In computer jargon these symbols are called 0 bit and 1 bit. Bit is an abbreviation for binary digit. In the Octal system N = 8 the values of the symbols range from 0 to 8-1 i.e. 0, 1, 2, 3, 4, 5, 6, 7. We call these symbols their decimal names.
54

Different Symbols for the Different Bases


In hexadecimal N = 8 the values of the symbols range from 0 to 16-1 i.e. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. We call these symbols their decimal names AND the letters their common alphabet names. Letters are used after 9 instead of symbols to keep a single character.

55

The Decimal Number


The decimal number system is base-10 system and it is the most common number system. It requires 10 different digits, from 0 to 9. For an example, 154-is expressed as powers of 10. The digit 4 (first digit) gives 10 to the 0 power, digit 5 gives 10 to the 1 power, and so on. Number 154 can be deploying as follows. 1 1 x 102 = 1 x 100 = 100 5 5 x 101 = 5 x 10 = 50 4 4 x 100 = 4 x 1 = 4
Sum = 154 (Decimal)

56

Conversion of binary to denary/Decimal


Convert 1101 to base ten code 1 1 x 23 = 1 x 8 = 8 1 1 x 22 = 1 x 4 = 4 0 0 x 21 = 0 x 2 = 0 1 1 x 20 = 1 x 1 = 1
Sum = 8+4+0+1 = 13 (decimal)

57

Example
1101.1 is equivalent to: 1 23 + 1 22 + 0 21 + 1 20 + 1 21 8 + 4+0+1+1/2 = 13.5 Thus 1101.12 is equivalent to 13.510
Exercises

Convert 0.10112 to a decimal fraction. Convert 101.01012 to a denary number.


58

Conversion of decimal to binary


An integer denary number can be converted to a corresponding binary number by repeatedly dividing by 2 and noting the remainder at each stage, as shown below for 391

59

Converting A decimal Fraction to Binary


The fractional part of a denary number can be converted to a binary number by repeatedly multiplying by 2, for example; converting 0.625

For fractions, the most significant bit of the result is the top bit obtained from the integer part of multiplication by 2. The least significant bit of the result is the bottom bit obtained from the integer part of multiplication by 2. Thus 0.62510 =0.1012
60

Problems
1. Convert 0.4062510 to a binary number. 2. Convert 58.312510 to a binary number. Hint convert the whole number to binary and then the decimal part. i.e. 58.312510 =111010.01012

61

Algorithm for Converting from any nonnegative number to any Basis


Step1

set the value of i = 0, call Ni the given decimal number Step2 Divide Ni by the new basis, obtain the quotient qi and the remainder ri Step3 Check the value of the quotient qi if qi is zero continue with step 4 otherwise continue with step 5 Step4 Increase the value of i by 1. Set Ni equal qi-1 and go back to step 2 Step5 The equivalent number to the decimal number is obtained by concatenating the remainder ri obtained in opposite order in which they were obtained. i.e. the equivalent number is ri ri-1ri-2..q0 Example: Use the algorithm to convert 2510 to Octal and binary

62

Hexadecimal Number
A hexadecimal numbering system has a radix of 16 and uses the following 16 distinct digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,A, B, C, D, E and F A corresponds to 10 in the denary system, B to 11, C to 12, and so on.. To convert 1A16 =1161 +A160 =1161 +101=16+10=26 i.e. 1A16 =2610 Similarly, 2E16 = 2161 +E160 = 2161 +14160 =32+14=4610
Convert the following hexadecimal numbers into their decimal equivalents: (a) C916 (b) BD16
63

To convert from decimal to hexadecimal:


This is achieved by repeatedly dividing by 16 and noting the remainder at each stage, as shown below for 2610

64

Conversion From hexadecimal to Binary


If a number is hexadecimal we first convert it to decimal and then to binary. E.g. What is the binary equivalent of the number 10101111000010111101000111 We form four bit group beginning with the right most bit i.e. 10 1011 1100 0010 1111 0100 0111 Then we replace each group with it decimal equivalent 10 1011 1100 0010 1111 0100 0111 2 B=11 C= 12 2 F=15 4 7 Therefore ,four digits in a binary number can be represented with a single hexadecimal digit. i.e 2BC2F47
65

Binary Coded Decimal Numbers (BCD)


In this system, numbers are represented in a decimal form, however each decimal digit is encoded using a four bit binary number. For example: The decimal number 136 would be represented in BCD as follows: 136 = 0001 0011 0110 1 3 6 To convert from decimal to BCD, simply write down the four bit binary pattern for each decimal digit. To convert from BCD to decimal, divide the number into groups of 4 bits and write down the corresponding decimal digit for each 4 bit group.
66

Fixed Precision and Overflow.


Numbers in computers are typically represented using a fixed number of bits. These sizes are typically 8 bits, 16 bits, 32 bits, 64 bits and 80 bits. These sizes are generally a multiple of 8, as most computer memories are organized on an 8 bit byte basis. Numbers in which a specific number of bits are used to represent the value are called fixed precision numbers. This determines the range of possible values that can be represented
67

Overflow
An 8 bit number can represent 256 (216 ) distinct numeric values and the range is typically considered to be 0-255 Any number larger than 255 cant be represented using 8 bits. A 16 bit number represents 65536 and the range is 065535. An overflow occurs when the result of a calculation cant be represented with the number of bits available. For example when adding the two 8 bit quantities: 150 + 170, the result is 320 which is outside the range therefore the result has overflowed. The low order bit remains and the high order bit will be lost. Smaller value will be lost.
68

Signed and Unsigned Numbers.


When a fixed precision binary number is used to hold only positive values, it is said to be unsigned. The range of positive values that can be represented is 0 - 2n -1 where n is the number of bits used. Negative numbers are held by signed numbers and are commonly represented in binary by using twos compliment .
69

Signed and Unsigned Numbers.


Two compliment is in two different ways. First, as a representation, twos complement is a way of interpreting and assigning meaning to a bit pattern contained in a fixed precision binary quantity. Second, It is also used to refer to an operation that can be performed on the bits of a binary quantity. As an operation, the twos complement of a number is formed by inverting all of the bits and adding 1. If a binary number being interpreted using the twos complement representation, the high order bit of the number indicates the sign. If the sign bit is 0, the number is positive, and if the sign bit is 1, the number is negative
70

Signed and Unsigned Numbers cont.


For positive numbers, the rest of the bits hold the true magnitude of the number. For negative numbers, the lower order bits hold the complement (or bitwise inverse) of the magnitude of the number. Twos complement representation can only be applied to fixed precision quantities.

71

Two Compliment
Example.
Decimal number 1 2 3 4 5 6 7 Binary Equivalent 0001 0010 0011 0100 0101 0110 0111 Negative Number -1 -2 -3 -4 -5 -6 -7 Binary Equivalent of a negative number 1110 +1 = 1111 1101+1 = 1110 1100 +1 = 1101 1011+1 = 1100 1010 +1 = 1011 1001 + 1 = 1010 1000 + 1 = 1001

8 9

1000 1001

-8 -9

0111 + 1 = 1000 0110 +1 = 0111


72

Two compliment Continues


Twos complement representation is used because it reduces the complexity of the hardware in the arithmetic-logic unit of a computers CPU. Using a twos complement representation, all of the arithmetic operations can be performed by the same hardware whether the numbers are considered to be unsigned or signed. The bit operations performed are identical, the difference comes from the interpretation of the bits.
73

You might also like