Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 8 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.

Similar presentations


Presentation on theme: "Chapter 8 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1."— Presentation transcript:

1 Chapter 8 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : woodall@mc.edu) 1

2 Computer Circuits Computer circuits can be in one of two states low or high Also known as: 0 and 1 off and on false and true no and yes absence and presence 2

3 Discrete Values These two states of a circuit are said to be discrete or distinct 3

4 Two States Low voltage in RAM, VRAM, or the CPU corresponds to – Demagnetized spot – Hard drive – Bump – CD or DVD High voltage in RAM, VRAM, or the CPU corresponds to – Magnetized spot – Hard drive – Land – CD or DVD Everything must be encoded into a representation using these two states (written as 0's and 1's). 4

5 Bits Each circuit is more commonly called a bit where bit is short for binary digit Why? The only digits in the binary number system are 0 and 1 which fit in perfectly with the two state nature of a computer. 5

6 Number Systems Decimal number system – We know this! – base 10 – 10 symbols 0 - 9 – e.g. 1375, also written (1 * 10 3 ) + (3 * 10 2 ) + (7 * 10 1 ) + (5 * 10 0 ) Binary number system – What is this? – base 2 – 2 symbols 0 – 1 – e.g. 1001, also written (1 * 2 3 ) + ( 0 * 2 2 ) + (0 * 2 1 ) + ( 1 * 2 0 ) 6

7 Number Systems Decimal number system – We know this! – base 10 – 10 symbols 0 - 9 – e.g. 1375, also written (1 * 10 3 ) + (3 * 10 2 ) + (7 * 10 1 ) + (5 * 10 0 ) Binary number system – What is this? – base 2 – 2 symbols 0 – 1 – e.g. 1001, also written (1 * 2 3 ) + ( 0 * 2 2 ) + (0 * 2 1 ) + ( 1 * 2 0 ) 7

8 Encoding Text How many bits, minimum, would it take to encode…? 26 lowercase letters and 10 digits 36 total characters 8

9 Powers of 2 This many bitsWill encode this many items 12 1 = 2 22 2 = 4 32 3 = 8 42 4 = 16 52 5 = 32 62 6 = 64 72 7 = 128 82 8 = 256 n2n2n 9

10 Encoding Text How many bits would it take to encode…? 26 lower case letters 26 upper case letters 10 digits 10 arithmetic characters 20 punctuation characters 3 non-printable characters 95 characters 10

11 How Many Bits to Encode 95 Characters? 11 This many bitsWill encode this many items 12 1 = 2 22 2 = 4 32 3 = 8 42 4 = 16 52 5 = 32 62 6 = 64 72 7 = 128 82 8 = 256 n2n2n

12 Encoding Text The original ASCII code was a 7-bit code. A widely used encoding scheme today is the Extended ASCII code or ISO-8859-1 The Extended ASCII code is an 8-bit code. So, the code for one character will fit exactly into one byte. 12

13 ASCII code p. 235 What is the ASCII code for each character? H & 3 What ASCII character is represented by each code? 0110 1010 0011 1111 1111 0001 13

14 ASCII Code The ASCII code is for encoding text only. ASCII 62 is 0011 0110 0011 0010 The number 62 is 0000 0000 0011 1110 The computer cannot do arithmetic with ASCII digits. 14

15 Encoding Text Becoming more wide spread is a new multibyte (one to four bytes) code called the Unicode It can handle all symbols in all languages To see other languages go to http://www.unicode.org/standard/WhatIsUnicode.html 15 कम्प्यूटर, मूल रूप से, नंबरों से सम्बंध रखते हैं। ये प्रत्येक अक्षर और वर्ण के लिए एक नंबर निर्धारित करके अक्षर और वर्ण संग्रहित करते हैं। यूनिकोड का आविष्कार होने से पहले, ऐसे नंबर देने के लिए सैंकडों विभिन्न संकेत लिपि प्रणालियां थीं। किसी एक संकेत लिपि में पर्याप्त अक्षर नहीं हो सकते हैं : उदाहरण के लिए, यूरोपिय संघ को अकेले ही, अपनी सभी भाषाऒं को कवर करने के लिए अनेक विभिन्न संकेत लिपियों की आवश्यकता होती है। अंग्रेजी जैसी भाषा के लिए भी, सभी अक्षरों, विरामचिन्हों और सामान्य प्रयोग के तकनीकी प्रतीकों हेतु एक ही संकेत लिपि पर्याप्त नहीं थी।

16 Encoding Other Things In chapter 11 we will look at encoding numbers, images and video. 16

17 Do you remember color codes? Would you rather type this color code? 3 E C 5 A 7 Or this? 0011 1110 1100 0101 1010 0111 17

18 Hexadecimal Since the earliest days of computing, two hexadecimal digits have been used as a shorthand notation for 8 bits (one byte) If two hexadecimal digits symbolize one byte, then one hexadecimal digit must correspond in some way to 4 bits 18

19 Hexadecimal Base 16 16 symbols for building numbers: (0 – 9, A – F) Examples of hexadecimal numbers: 387 4AFFCC 19

20 Hexadecimal – Binary Equivalents 00000 10001 20010 30011 40100 50101 60110 70111 81000 91001 A1010 B1011 C1100 D1101 E1110 F1111 What would be the hexadecimal shorthand for this 2 byte binary code? 0011 1100 1111 0110 answer: 3CF6 What would the one byte binary code that corresponds to this hexadecimal shorthand? B5 answer: 1011 0101 20

21 Hexadecimal – Binary Equivalents 000000000 100010001 200100010 300110011 401000100 501010101 601100110 701110111 810001000 910011001 A10101010 B10111011 C11001100 D11011101 E11101110 F11111111 First column of bits: 8 zeros, 8 ones Second column of bits: 4 zeros, 4 ones Third column of bits: 2 zeros, 2 ones Fourth column of bits: 1 zero, 1 one 21

22 Tags: A Higher Level of Encoding HTML tags are also a form of encoding – Formatting – Special non-text items Tags can also be used to encode – Structure – See the Oxford English Dictionary example in the chapter 22


Download ppt "Chapter 8 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1."

Similar presentations


Ads by Google