Download presentation
Presentation is loading. Please wait.
1
Coding Schemes and Number Systems
Coding Schemes and Number Systems
2
Quote "There are only 10 types of people in the world - those who understand binary, and those who don't." -unknown Worksheet with questions similar to those on the quiz Feel free to work together When doing quiz: Do not simply use a conversion app on the web. Do the conversions on your own first! Then if you want to check your answer, you can check it.
3
Coding Schemes At the lowest level, everything in a computer is represented by 1s and 0s, called bits Numbers Characters Complex data Bit – binary digit A coding scheme is used by a computer to represent characters Images Audio Networking A bit is the smallest element of computer storage The way a bit of information is actually stored depends on the storage medium We will learn more about that in Chapter 7: Storage
4
Coding Schemes ASCII – most widely used coding scheme
EBCDIC – used on some mainframes and high-end servers Unicode – used by several operating systems and programming languages Contains ASCII as a subset ASCII = American Standard Code for Information Interchange
5
Coding Schemes ASCII, EBCDIC Store each character in one byte (8 bits)
256 characters represented Characters for English and western European languages represented ASCII Symbol EBCDIC 7 8 9 A B C D E Complete ASCII table: My favorite:
6
Coding Schemes Unicode Store each character in two(+) bytes (16 bits)
65,536+ characters represented First 256 codes are same as ASCII codes Includes codes for ideograms – symbols used in Asian and other languages – allows more languages/characters than only ASCII Anyone know what languages these are from?
7
Coding Schemes: Conversion Exercise
Try these exercises using Convert to ASCII binary codes: Tree Convert to ASCII decimal codes: Go Team! Decipher ASCII codes from binary: Decipher ASCII codes from decimal: Show ASCII Code chart on course web site: decimal and binary codes Tree = Go Team! = = = StAr
8
Coding Schemes: Conversion Exercise
Check your answers: Convert to ASCII binary codes: Tree Convert to ASCII decimal codes: Go Team! * * What does 32 stand for? Decipher ASCII codes from binary: S t a r Decipher ASCII codes from decimal: C I S @ P C C Discovering Computers 2011: Living in a Digital World Chapter 2
9
Number Systems Decimal Base 10 Binary Base 2 Hexadecimal Base 16
Three number systems are commonly used with computers Decimal Base 10 Binary Base 2 Hexadecimal Base 16 1, 2, 3, … 10, 11, 12 1, 10, 11, … 1010, 1011, 1100 1, 2, 3, … A, B, C
10
1 2 3 Number Systems Decimal Number System “deci” prefix = 10
10 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Base 10 number system Show cycling through digits as one counts up: 0, 1, 2, … 9, 10 (move over one place value and start again) 123 in the decimal number system represents the quantity one hundred and twenty three The number we use are just symbols – distinction between the symbol used and the quantity represented Other examples (on board): 4018 = 4* * * *100 312,000 = … Now that we understand the decimal number system, we can see that other number systems act the same way, just using a different base value. 102 101 100 = 1* * *100 =
11
Discovering Computers 2011: Living in a Digital World Chapter 2
Number Systems Each number system has a set of place values. Any number (except zero) raised to the zero power = 1 Any number raised to the 1st power is itself Any number raised to the 2nd power is that number times itself You should know the place values for the decimal system we use every day. See Binary Place_Values and Hexadecimal Place Values Number Systems See Number Conversion Discovering Computers 2011: Living in a Digital World Chapter 2
12
1 0 1 Number Systems Binary Number System “bi” prefix = 2
2 digits: 0, 1 Base 2 number system Everywhere we had a 10 on the previous slide, we can replace with a 2 Write table on board: 22 = 4, 23 = 8, … Do other examples on board: 1011 = 1*23 + 0*22 + 1*21 + 1*20 = = = 640 22 21 20 101 = 1*22 + 0*21 + 1*20 = = 5
13
1 2 3 Number Systems Hexadecimal Number System aka Hex
“hexadeci” prefix = 16 16 digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F In the Hexadecimal (Base 16) number system we use the letters A-F to represent the additional 6 digits. We have to add symbols to get 16 digits The symbols 123 in hex represent the quantity 291 Write table on board: 161 = 16, 162 = 256, 163 = 4096 Do other examples on board: AB = 10* *160 = = 171 300F = 3* *160 = 3* = = 12303 162 161 160 123 = 1* * *160 = = 291
14
Number Systems Converting between number systems
Binary or hex to decimal: Use place values Decimal to binary : Write number as a sum of powers of 2 200 to binary 200 = – 128 = 72 200 = – 64 = 8 200 = 200 = Anything to decimal: use place values just like we have shown -> Show place value pages on our web site (Assign 2 assistance) 200 to binary: check chart: 128 is largest less than 200, … Other examples: 512 = 29 = 513 =
15
Number Systems Converting between number systems Decimal to hex: Convert decimal to binary, then to hex Binary to hex and hex to binary: 4 binary digits = 1 hex digit (see Binary to Hex Conversion) Binary – Hex Chart on web site Why does 4 binary digits = 1 hex digit? 16 is a power of 2: 16 = 24 B F
16
Number Systems Why hex? Network mask
More compact representation of binary numbers Network mask Host: Mask:
17
Exercises Convert the following binary numbers to hexadecimal: Worksheet with questions similar to those on the quiz Feel free to work together When doing quiz: Do not simply use a conversion app on the web. Do the conversions on your own first! Then if you want to check your answer, you can check it.
18
Discovering Computers 2011: Living in a Digital World Chapter 2
Check your answers. 4F 7A D B 6C B7 Discovering Computers 2011: Living in a Digital World Chapter 2
19
Exercises Worksheet with questions similar to those on the quiz
Complete the following table using ASCII code (You may use an online calculator or PC calculator for the numbers). Write binary numbers using 8 bits. Decimal Binary Hex ASCII char 81 48 @ 61 70 m Worksheet with questions similar to those on the quiz Feel free to work together When doing quiz: Do not simply use a conversion app on the web. Do the conversions on your own first! Then if you want to check your answer, you can check it.
20
Exercises Check your answers:
Decimal Binary Hex ASCII char 81 51 Q 72 48 H 64 40 @ 103 67 g 61 3D = 112 70 p 109 6D m 54 36 6 Worksheet with questions similar to those on the quiz Feel free to work together When doing quiz: Do not simply use a conversion app on the web. Do the conversions on your own first! Then if you want to check your answer, you can check it.
21
Quote "There are only 10 types of people in the world - those who understand binary, and those who don't." -unknown Worksheet with questions similar to those on the quiz Feel free to work together When doing quiz: Do not simply use a conversion app on the web. Do the conversions on your own first! Then if you want to check your answer, you can check it.
22
Coding Schemes and Number Systems
Coding Schemes and Number Systems
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.