Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.

Similar presentations


Presentation on theme: "Computer Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE."— Presentation transcript:

1 Computer Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE

2  Aim ◦ Introduce the concepts of computer systems  Purpose ◦ Set the foundation for topics to come later, including Computer Networks, the Internet and the World Wide Web CSC102 INTRODUCTION TO COMPUTER SCIENCE

3  A “system” comprises a set of components that work together to perform a task  A “computer system” comprises a processor, memory, external storage systems, interface devices and software to provide a tool that humans can use to solve problems CSC102 INTRODUCTION TO COMPUTER SCIENCE

4  At the heart of a computer system is: ◦ The central processing unit (CPU), which is responsible for executing computer software ◦ Main Memory, which holds:  data to be processed by software/programs, and  the computer software /programs CSC102 INTRODUCTION TO COMPUTER SCIENCE

5

6  The arithmetic logic unit (ALU) performs arithmetic and logic operations  Arithmetic operations include addition, subtraction, division, multiplication  Logical operations include AND, OR, and NOT ◦ A AND B is TRUE if A is true and B is true ◦ A OR B is TRUE if A is true or B is true ◦ NOT A is TRUE if A is False CSC102 INTRODUCTION TO COMPUTER SCIENCE

7  The control unit is central to the operation of a computer. It processes computer instructions, which are of three types: ◦ Data Transfer – move data around ◦ Arithmetic/Logic – perform arithmetic or logical operations, for which it calls on the ALU ◦ Conditional – determine which program instruction to execute next CSC102 INTRODUCTION TO COMPUTER SCIENCE

8  The control unit is central to the operation of a computer. It processes computer instructions, which are of three types: ◦ Data Transfer – move data around ◦ Arithmetic/Logic – perform arithmetic or logical operations, for which it calls on the ALU ◦ Conditional – determine which program instruction to execute next CSC102 INTRODUCTION TO COMPUTER SCIENCE

9  Here is a simple program to control the temperature in a room: 1.Get the temperature of the room 2.If the temperature is below 20oC, Go to step 5 3.TURN ON the air conditioning 4.Go To 1 5.TURN OFF the air conditioning 6.Go To 1  Statement 2 is a conditional instruction – the instruction executed after 2 is either 3 or 5 CSC102 INTRODUCTION TO COMPUTER SCIENCE

10  Everything in a computer system, including data and instructions, is a number, represented in the binary number system  Why  Because the underlying electronics – the hardware – is based on electronic switches, which can be in one of two states, On or Off  In the computer’s representation of the binary number system, On represents 1 (one) and Off represents 0 (zero) CSC102 INTRODUCTION TO COMPUTER SCIENCE

11  We are familiar with the decimal number system – a number system in base 10 ◦ Each number is represented by: ◦ How many units it has ◦ How many tens it has ◦ How many hundreds it has ◦ How many thousands, ◦ –etc CSC102 INTRODUCTION TO COMPUTER SCIENCE

12  For example, the number 241 has: ◦ Two hundreds ◦ Four tens ◦ One unit  From right to left we have units, tens, hundred columns: CSC102 INTRODUCTION TO COMPUTER SCIENCE

13  Another way of representing the columns  In the binary number system the columns are: 20, 21, 22, 23, and so forth  CSC102 INTRODUCTION TO COMPUTER SCIENCE

14  In the Binary number system the representation of decimal 241 is 11110001:  Decimal has numerals 0,1,2,3,4,5,6,7,8,9  Binary has numerals 0 and 1 CSC102 INTRODUCTION TO COMPUTER SCIENCE

15  We said: Everything in a computer system, including data and instructions, is a number  How a computer program uses the number determines what the number represents  Compare: ◦ If a stone is used to hammer a nail into wood, it is a hammer ◦ If the stone is used to hold a door open, it is a door stop ◦ If it is used to keep papers from CSC102 INTRODUCTION TO COMPUTER SCIENCE

16  How we use the number: ◦ As an integer – add, subtract, divide, multiply ◦ As a character, e.g. ‘a’ – compare with other characters and form words, e.g. ‘account’ ◦ As an address in memory – use it to retrieve information from memory CSC102 INTRODUCTION TO COMPUTER SCIENCE

17  Representing everything as numbers has some benefits:  Question: How do you compare two characters?  Answer: Subtract their number representations ◦ If the result is 0 (zero) they are the same ◦ If the result is not 0, they are different CSC102 INTRODUCTION TO COMPUTER SCIENCE

18  Question: How would you compare two words? E.g. “this” and “that”  Answer: Count the number of characters in each word ◦ If the count is different, then the words are different ◦ If the count is the same, then compare the two words character by character. If one of the comparisons is not 0, the words are different CSC102 INTRODUCTION TO COMPUTER SCIENCE

19  We have discussed the CPU and Main Memory, which comprise the heart of a Computer System  A computer system comprises other components to make it useful: ◦ Mass Storage – for retaining the contents of memory ◦ External Devices – including printers, DVD drives, keyboards, monitor CSC102 INTRODUCTION TO COMPUTER SCIENCE

20  The contents of Main Memory are lost when the computer is switched off  Mass storage systems retain their content and offer large storage capacities  Examples include Magnetic Disks, CDs, DVDs, Flash drives  Disadvantage – they require significantly more time to store and retrieve data CSC102 INTRODUCTION TO COMPUTER SCIENCE

21  Flash memory is currently a popular system for off-line storage  Flash drives use flash memory technology and USB interfaces – they come in sizes of GigaBytes – 1, 2, 4, 8, 16, 32...  SD (Secure Digital) Cards also use flash technology – used in electronic devices, including digital cameras, smartphones, music players, and more CSC102 INTRODUCTION TO COMPUTER SCIENCE

22  Communication with external devices is handled by controllers  The controller mediates between the computer and the external device – e.g., translating data into the correct format  Some controllers can handle a range of devices. For example, ◦ USB – Universal Serial Bus ◦ FireWire – developed by Apple CSC102 INTRODUCTION TO COMPUTER SCIENCE

23  Communication rates between the computer and its external devices is measured in bits per second (bps)  Kbps – Kilobits per second  Mbps – Megabits per second  Gbps – Gigabits per second  E.g. USB communicates in numbers of Mbps CSC102 INTRODUCTION TO COMPUTER SCIENCE

24  Question: What is a ‘bit’?  Answer: It is one column of a binary number  For example, the binary representation of the decimal number 241 has 8 bits  Question: What is a ‘byte’?  Answer: A byte is 8 bits CSC102 INTRODUCTION TO COMPUTER SCIENCE

25  The computer’s activities, notably its CPU, are coordinated by pulses generated by a clock  Clock speeds are measured in hertz (Hz)  1 Hz equals 1 cycle per second  Examples: ◦ Desktop computer speeds are now in the GHz range ◦ 1 GHz equals 1000 MHz  Early desktop computers operated in KHz CSC102 INTRODUCTION TO COMPUTER SCIENCE

26  At the core of a computer system is the Central Processor Unit (CPU) and Main Memory  Mass Storage and External Devices provide additional system components to make a computer system useful  The binary number system is central to the operation of a computer system CSC102 INTRODUCTION TO COMPUTER SCIENCE


Download ppt "Computer Systems Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE."

Similar presentations


Ads by Google