Presentation is loading. Please wait.

Presentation is loading. Please wait.

Comp 1001 Introduction to Information Technology & Computer Architecture Wednesday 12-1Dr. Joe Carthy http://www.cs.ucd.ie/staff/jcarthy/home/

Similar presentations


Presentation on theme: "Comp 1001 Introduction to Information Technology & Computer Architecture Wednesday 12-1Dr. Joe Carthy http://www.cs.ucd.ie/staff/jcarthy/home/"— Presentation transcript:

1 Comp 1001 Introduction to Information Technology & Computer Architecture Wednesday 12-1Dr. Joe Carthy

2 Comp 1001: IT & Architecture - Joe Carthy
Course Outline Introduction to Information Technology Hardware and Software I/O and Storage devices CPU RAM Information Representation: ASCII codes Binary and Hexadecimal Numbers Computer Networks Operating Systems Comp 1001: IT & Architecture - Joe Carthy

3 Course Outline Continued
Computer Architecture and Assembly Language CPU structure Introduction to Assembly Language (8086) Instruction Set Basic Assembly Language Programs Fetch-Execute Cycle Pipelining Memory: RAM access and Cache Memory Computer performance evaluation Practicals Comp 1001: IT & Architecture - Joe Carthy

4 Course Outcomes At the end of this course
Students should have a grasp of functional components of a computer system information representation assembly language instructions instruction execution CPU structure and functioning knowledge of performance evaluation Comp 1001: IT & Architecture - Joe Carthy

5 Comp 1001: IT & Architecture - Joe Carthy
Recommended Texts Recommended Texts: Computers (Tools for the Information Age), Brief Edition, H.L. Capron, Prentice Hall Introduction to Assembly Language Programming and Computer Architecture, J. Carthy, ITP Web Notes Comp 1001: IT & Architecture - Joe Carthy

6 Simple Model of a Computer System
Hardware Physical components that make up a computer system System: interconnected set of devices that function as a unit Software Computer programs that allow you use a computer Comp 1001: IT & Architecture - Joe Carthy

7 Simple Model of a Computer System Version 1
Comp 1001: IT & Architecture - Joe Carthy

8 Simple Model of a Computer System Version 2
Comp 1001: IT & Architecture - Joe Carthy

9 Comp 1001: IT & Architecture - Joe Carthy
System Devices Classified as: Storage devices: store information RAM Disk CD/DVD Input/Output (I/O) devices: carry info to/from Computer Monitor (screen) Printer Mouse/Keyboard Speakers Comp 1001: IT & Architecture - Joe Carthy

10 Comp 1001: IT & Architecture - Joe Carthy
Review Questions What is a computer system ? Explain the difference between hardware and software What are the two major device classes ? What is a peripheral device ? What is the function of the processor ? What is the function of memory (RAM) ? What are the major devices ? What is a bus ? Comp 1001: IT & Architecture - Joe Carthy

11 Information Representation
How is “information” represented in a computer system ? What are the different types of information Text Numbers Images Video Photographic Audio Comp 1001: IT & Architecture - Joe Carthy

12 Everything is in Binary ! (1’s and 0’s)
Computers are digital devices - they can only manipulate information in digital (binary) form. Easy to represent 1 and 0 in electronic, magnetic and optical devices Only need two states High/low On/off Up/down etc All information in a computer system is Processed in binary form Stored in binary form Transmitted in binary form Comp 1001: IT & Architecture - Joe Carthy

13 How is information converted to Binary form
I/O and Storage Devices are digital I/O devices convert information to/from binary A keyboard converts the character “A” you type into a binary code to represent “A” E.g. “A” is represented by the binary code Monitor converts to the “A” that you read Comp 1001: IT & Architecture - Joe Carthy

14 Comp 1001: IT & Architecture - Joe Carthy
Bits and Bytes One binary digit i.e. 1 or 0 is called a bit A group of 8 bits is one byte Byte is the unit of storage measurement Number of Bytes Unit 1024 bytes (210 bytes) 1 Kilobyte (Kb) 1024 Kb (220 bytes) 1 Megabyte (Mb) 1024 Mb (230 bytes) 1 Gigabyte (Gb) 1024 Gb (240 bytes) 1 Terabyte (Tb) 1024 Tb (250 bytes) 1 Petabyte (Pb) Comp 1001: IT & Architecture - Joe Carthy

15 Representing Text- ASCII Code
Textual information is made up of individual characters e.g. Letters: Lowercase: a,b,c,..z Uppercase: A,B,C..Z Digits: 0,1,2,..9 Punctuation characters: ., :, ; ,, “, ’ Other symbols: -, +, &, %, #, /,\,£, etc.). Comp 1001: IT & Architecture - Joe Carthy

16 Representing Text- ASCII Code
Each character is represented by a unique binary code. ASCII is one international standard that specifies the binary code for each character. American Standard Code for Information Interchange It is a 7-bit code - every character is represented by 7 bits There are other standards such as EBCDIC but these are not widely used. ASCII is being superceded by Unicode of which ASCII is a subset. Unicode is a 16-bit code. Comp 1001: IT & Architecture - Joe Carthy

17 Comp 1001: IT & Architecture - Joe Carthy
Sample ASCII Codes Char ASCII Decimal NUL 00 BEL 07 LF 10 CR 13 48 SP 20 1 49 ! 21 2 50 22 9 57 A 65 a 97 B 66 b 98 C 67 c 99 Y 89 y 121 Z 90 z 122 Comp 1001: IT & Architecture - Joe Carthy

18 Comments on ASCII Codes
Codes for A to Z and a to z form collating sequences A is 65, B is 66, C is 67 and so on A is 97, b is 98, c is 99 and so on Lowercase code is 32 greater than Uppercase equivalent Note that digit ‘0’ is not the same as number 0 ASCII is used for characters Not used to represent numbers (See later) Codes 0 to 30 are typically for Control Characters Bel - causes speaker to beep ! Carriage Return (CR); LineFeed (LF) Others used to control communication between devices SYN, ACK, NAK, DLE etc Comp 1001: IT & Architecture - Joe Carthy

19 Comp 1001: IT & Architecture - Joe Carthy
Review All information stored/transmitted in binary Devices convert to/from binary to other forms that humans understand Bits and Bytes Kb, Mb, Gb, Tb and Pb are storage metrics ASCII code is a 7-bit code to represent text characters Text “numbers” not the same as “maths” numbers Do not add phone numbers or get average of PPS numbers ! Comp 1001: IT & Architecture - Joe Carthy

20 Comp 1001: IT & Architecture - Joe Carthy
Review Questions How is information transmitted inside a computer Why do we use binary in computers What is an ASCII code used for How big is an ASCII code What is the ASCII code for: A, ‘0’, ‘a’ What is a collating sequence What is a control character - give an example What is Unicode and why is it used What is a bit ? A byte ? How many bytes in: Kb, Mb, Gb, Tb, Pb Comp 1001: IT & Architecture - Joe Carthy

21 Representing Numbers: Integers
Humans use Decimal Number System Computers use Binary Number System Important to understand Decimal system before looking at binary system Decimal Numbers - Base 10 10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Positional number system: the position of a digit in a number determines its value Take the number 1649 The 1 is worth 1000 The 9 is worth 9 units Formally, the digits in a decimal number are weighted by increasing powers of 10 i.e. they use the base 10. We can write 1649 in the following form: 1* * * *100 Comp 1001: IT & Architecture - Joe Carthy

22 Representing Numbers: Integers
weighting: Digits 1649 = 1* * * *100 Least Significant Digit: rightmost one - 9 above Lowest power of 10 weighting Digits on the right hand side are called the low-order digits (lower powers of 10). Most Significant Digit: leftmost one - 1 above Highest power of 10 weighting The digits on the left hand side are called the high-order digits (higher powers of 10) Comp 1001: IT & Architecture - Joe Carthy

23 Representing Numbers: Decimal Numbers
Largest n-digit number ? Made up of n consecutive 9’s (= 10n -1 ) Largest 4-digit number if 9999 9999 is Distinguishing Decimal from other number systems such as Binary, Hexadecimal (base 16) and Octal (base 8) How do we know whether the number 111 is decimal or binary One convention is to use subscripts Decimal: Binary:1112 Hex: Octal: 1118 Difficult to write use keyboard Another convention is to append a letter (D, B, H, O) Decimal: 111D Binary:111B Hex: 111H Octal: 111O Comp 1001: IT & Architecture - Joe Carthy

24 Representing Numbers: Binary Numbers
Binary numbers are Base 2 numbers Only 2 digits: 0 and 1 Formally, the digits in a binary number are weighted by increasing powers of 2 They operate as decimal numbers do in all other respects Consider the binary number Weight bits = 0*27 + 1*26 + 0*25 + 1*24 + 1*23 + 1*22 + 0*21 + 0*20 = = 9210 Comp 1001: IT & Architecture - Joe Carthy

25 Representing Numbers: Binary Numbers
Leftmost bit is the most significant bit (MSB). The leftmost bits in a binary number are referred to as the high-order bits. Rightmost bit is the least significant bit (LSB). The rightmost bits in a binary number are referred to as the low-order bits. Largest n-bit binary number ? Made up of n consecutive 1’s (= 2n -1) e.g. largest 4-bit number: 1111 = = 15 Comp 1001: IT & Architecture - Joe Carthy

26 Representing Numbers: Binary Numbers
Exercises Convert the following binary numbers to decimal: (i) (ii) (iii) (iv) (v) (vi) Joe Carthy Formatting Convention In these notes we insert a space after every 4 bits to make the numbers easier to read Comp 1001: IT & Architecture - Joe Carthy

27 Representing Numbers: Converting Decimal to Binary
To convert from one number base to another: you repeatedly divide the number to be converted by the new base the remainder of the division at each stage becomes a digit in the new base until the result of the division is 0. Example: To convert decimal 35 to binary we do the following: Remainder 35 / 2 1 17 / 2 1 8 / 2 0 4 / 2 0 2 / 2 0 1 / 2 1 The result is read upwards giving 3510 = Comp 1001: IT & Architecture - Joe Carthy

28 Representing Numbers: Converting Decimal to Binary
Exercise: Convert the following decimal numbers to binary (1) 64 (2) 65 (3) 32 (4) 16 (5) 48 Shortcuts To convert any decimal number which is a power of 2, to binary, simply write 1 followed by the number of zeros given by the power of 2. For example, 32 is 25, so we write it as 1 followed by 5 zeros, i.e ; 128 is 27 so we write it as 1 followed by 7 zeros, i.e Remember that the largest binary number that can be stored in a given number of bits is made up of n 1’s. An easy way to convert this to decimal, is to note that this is 2n - 1. For example, if we are using 4-bit numbers, the largest value we can represent is 1111 which is 24-1, i.e. 15 Comp 1001: IT & Architecture - Joe Carthy

29 Representing Numbers: Converting Decimal to Binary
Binary Numbers that you should remember because they occur so frequently Binary Decimal 111 7 1111 15 127 255 Comp 1001: IT & Architecture - Joe Carthy

30 Comp 1001: IT & Architecture - Joe Carthy
Review Decimal Number System - Base 10 Significant Digits Binary Number System - Base 2 Notation (B,D,H,O) Binary to Decimal Decimal to Binary Shortcuts and Common Binary Numbers Review Questions What is a positional number system ? What is the MSB and the LSB. Give an example of each one. Show how the weights of the bits in an 8-bit binary number 16-bit binary numbe What is the weight of the MSB in (a) 8-bit number (b) 16-bit number (c) 32-bit number Convert 48D, 65D, 31D, 15D to binary Convert B, B and B to decimal Comp 1001: IT & Architecture - Joe Carthy


Download ppt "Comp 1001 Introduction to Information Technology & Computer Architecture Wednesday 12-1Dr. Joe Carthy http://www.cs.ucd.ie/staff/jcarthy/home/"

Similar presentations


Ads by Google