Text Representation ASCII Collating Sequence

Slides:



Advertisements
Similar presentations
Learning Objectives Explain the link between patterns, symbols, and information Determine possible PandA encodings using a physical phenomenon Encode.
Advertisements

Craig Schock, 2003 Binary Numbers Numbering Systems Counting Symbolic Bases Common Bases (10, 2, 8, 16) Representing Information Binary to Decimal Conversions.
EECC250 - Shaaban #1 lec #13 Winter HEX DEC CHR Ctrl 00 0NUL 01 1 SOH ^A 02 2STX ^B 03 3ETX ^C 04 4EOT ^D 05 5ENQ ^E 06 6ACK ^F 07 7BEL.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Representing Information Digitally Bits and the “Why” of Bytes lawrence snyder.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Fluency with Information Technology Third Edition by Lawrence Snyder Chapter.
Digital Text Primer Prepared for: AIEA Roundtable on Digitization of Armenian Documents Saturday 7 October 2006, University of Geneva, Switzerland Roland.
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
Characters & Strings Lesson 1 CS1313 Spring Characters & Strings Lesson 1 Outline 1.Characters & Strings Lesson 1 Outline 2.Numeric Encoding of.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
1 Data Representation Computer Organization Prof. H. Yoon DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations.
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Agenda Data Representation – Characters Encoding Schemes ASCII
The character data type char
Coding System Text Representation ASCII Collating Sequence.
Chapter 7 Data Coding. Agenda Coding Code efficiency and conversion Compression/compaction Code encryption/decryption.
BIOS1 Basic Input Output System BIOS BIOS refers to a set of procedures or functions that enable the programmer have access to the hardware of the computer.
Digital Design: From Gates to Intelligent Machines
Decimal Binary Octal Hex
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
BIOS1 Basic Input Output System BIOS BIOS refers to a set of procedures or functions that enable the programmer have access to the hardware of the computer.
PHY281Variables operators and math functions Slide 1 More On Variables and Operators, And Maths Functions In this section we will learn more about variables.
Dept. of Computer Science Engineering Islamic Azad University of Mashhad 1 DATA REPRESENTATION Dept. of Computer Science Engineering Islamic Azad University.
Informatics I101 February 25, 2003 John C. Paolillo, Instructor.
Postacademic Interuniversity Course in Information Technology – Module C1p1 Chapter 1 Evolution of Communication Networks.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Representing Information Digitally Bits and the “Why” of Bytes lawrence snyder.
CS151 Introduction to Digital Design
Representing Characters in a computer Pressing a key on the computer a code is generated that the computer can convert into a symbol for displaying or.
1 Information Representation in Computer Lecture Nine.
CS 2130 Lecture 23 Data Types.
Systems Architecture, Fourth Edition 1 Data Representation Chapter 3.
1 Problem Solving using Computers “Data....Representation, and Storage.
Representing Characters in a Computer System Representation of Data in Computer Systems.
Programming for GCSE Topic 2.2: Binary Representation T eaching L ondon C omputing William Marsh School of Electronic Engineering and Computer Science.
PRIMITIVE TYPES IN JAVA Primitive Types Operations on Primitive Types.
1.4 Representation of data in computer systems Character.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
DATA REPRESENTATION - TEXT
Binary Representation in Text
Binary Representation in Text
4th Edition, Irv Englander
Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations
Machine level representation of data Character representation
Chapter 3 Data Representation Text Characters
Digitizing Discrete Information
Characters Lesson Outline
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Data Transfer ASCII FILES.
Chapter 2 Data Types and Representations
Breaking the Code Can anyone guess the phrase from this “code”?
Data Encoding Characters.
Javascript, Loops, and Encryption
Ch2: Data Representation
ASCII Character Codes nul soh stx etx eot 1 lf vt ff cr so
October 1 Programming Questions?
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Cosc 2P12 Week 2.
Number Systems Lecture 2.
Text Encoding.
Characters Lesson Outline
Option: Data Representation
Introduction to Computer Engineering
DATA REPRESENTATION Data Types Complements Fixed Point Representations
Rayat Shikshan Sanstha’s S. M. Joshi College, Hadapsar
DATA REPRESENTATION Data Types Complements Fixed Point Representations
ASCII LP1.
Cosc 2P12 Week 2.
ASCII and Unicode.
Chapter 2 Bits, Data Types, and Operations
Presentation transcript:

Text Representation ASCII Collating Sequence Coding System Text Representation ASCII Collating Sequence GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies What is a BIT As w know a bit is the smallest unit in a computer system A bit can either be a 12 or a 02 This means that with one single bit we can only represent only 2 different values 12 = 110 and 02 = 010 GEN/OPM1300 Information & Communication Technologies

Representing Text, Pictures ect … Text, pictures and videos are also stored in a computer system using a sequence of binary digits Using one single bit is not enough due to its small size If we want to store a large quantity of data many more bits are required. GEN/OPM1300 Information & Communication Technologies

Combining a number of Bits Each time a bit is combined with another bit, more different combinations can be stored. If we will be using two bits to store data, there are a total of 22= 4 different combinations Hence if we have 4 bits we would have 24= 16 different combinations GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Working With the following number of bits how many combinations could be created? 5 bits 3 bits 6 bits 8 bits GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Answers 5 bits = 25  32 combinations 3 bits = 23  8 combinations 6 bits = 26  64 combinations 8 bits = 28  256 combinations GEN/OPM1300 Information & Communication Technologies

Number of Combinations List of Combination Number of Bits Calculation Number of Combinations 1 21 2 22 4 3 23 8 24 16 5 25 32 6 26 64 7 27 128 28 256 GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies In the Early Days When computers were first introduced they were simply used for performing calculations After a while scientists realized that computers can also be used to store and edit text in different ways The problem was that a computer could only understand binary (1s & 0s) GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies ASCII Coding System The scientists had to come up with a way for binary to be able to represent characters ASCII (American Standard Code for Information Interchange) was developed With ASCII every single character is assigned a binary code ASCII also allows computers to communicate with each other (files containing text can be copied from one computer to another) GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies How ASCII Coding Works The first ASCII system used a series of 7 Bits This meant that 27=128 different characters could be used These 128 characters are represented in the following table GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Code Char NUL 32 Space 64 @ 96 ` 1 SOH 33 ! 65 A 97 a 2 STX 34 “ 66 B 98 b 3 ETX 35 # 67 C 99 c 4 EOT 36 $ 68 D 100 d 5 ENQ 37 % 69 E 101 e 6 ACK 38 & 70 F 102 f 7 BEL 39 ‘ 71 G 103 g 8 BS 40 ( 72 H 104 h 9 TAB 41 ) 73 I 105 i 10 LF 42 * 74 J 106 j 11 VT 43 + 75 K 107 k 12 FF 44 , 76 L 108 l 13 CR 45 - 77 M 109 m 14 SO 46 . 78 N 110 n 15 SI 47 / 79 O 111 o 16 DLE 48 80 P 112 p 17 DC1 49 81 Q 113 q 18 DC2 50 82 R 114 r 19 DC3 51 83 S 115 s 20 DC4 52 84 T 116 t 21 NAK 53 85 U 117 u 22 SYN 54 86 V 118 v 23 ETB 55 87 W 119 w 24 CAN 56 88 X 120 x 25 EM 57 89 Y 121 y 26 SUB 58 : 90 Z 122 z 27 ESC 59 ; 91 [ 123 { 28 FS 60 < 92 \ 124 | 29 GS 61 = 93 ] 125 } 30 RS 62 > 94 ^ 126 ~ 31 US 63 ? 95 _ 127 DEL GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Now a Day’s The first 32 characters were used for transmission purposes, they are no longer needed After some time it was noted that ASCII consisted only of the English alphabet, so an extra bit was added to accommodate more languages, graphics and mathematical symbols By adding an extra bit 128 more characters can be stored since 28=256. GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Codes Available Today GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Try it! You can check the symbols on your computer by typing in its decimal code Open Notepad (Start > Programs > Accessories > Notepad) Make sure that NUM LOCK is switched on Press and hold ALT From the Numpad enter the 3 digits that you want (example 234 for Ω) Release the ALT, and the symbol should appear. GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Important Note It is important that all computers use ASCII as otherwise different codes would represent different values Example if a computer used the XYZ system (fictitious) and another uses ASCII the work HELLO would be represented differently on the two machines GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Coding in ASCII We must use the ASCII table to be able to code the following; Letter H E L O Decimal Code 72 69 76 79 Binary Code 1001000 1000101 1001100 1001111 GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Example of XYZ system Remember this is fictitious Code Char 1 A 69 ! 76 * 2 B 70 “ 77 ( 3 C 71 £ 78 ) 4 D 72 $ 79 - 5 E 73 % 80 _ 6 F 74 ^ 81 + ... 75 & GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies So HELLO would look different when decoded Binary Code 1001000 1000101 1001100 1001111 Decimal 72 69 76 79 Letter $ ! * - GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies When the computer with the XYZ representation system receives the text file from the computer with the ASCII representation system instead of HELLO, one will see $!**-, which is completely wrong! Since nowadays computers are used across the world a new system is being used which is UNICODE UNICODE is compatible with ASCII but then it uses a different system. A list of UNICODE characters can be accessed on http://en.wikipedia.org/wiki/List_of_Unic ode_characters. GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Work Code the following word using ASCII; Letter B Y E ! Decimal Code Binary Code GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Answer Letter B Y E ! Decimal Code 66 89 69 33 Binary Code 1000010 1011001 1000101 0100001 GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Collating Sequence The character codes assigned to the characters in ASCII are very important since they can be used to sort letters and distinguishing from upper to lower case letters For instance if the letters C, V and B have to be sorted, they can be easily sorted by looking at their ASCII code and use it to sort text in ascending (AZ) or descending order (ZA). GEN/OPM1300 Information & Communication Technologies

GEN/OPM1300 Information & Communication Technologies Example Using the ASCII codes the computer could sort the letters in ascending or descending order by sorting the ASCII code (numbers) Character Code C 67 V 86 B 66 GEN/OPM1300 Information & Communication Technologies