Coding System Text Representation ASCII Collating Sequence.

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

Technology ICT Option: Data Representation. Data Representation In our everyday lives, we communicate with each other using analogue data. This data takes.
Review of HTML Ch. 1.
Review Ch.1,Ch.4,Ch.7. Review of tags covered various header tags Img tag Style, attributes and values alt.
How Computers Represent Numbers Friday, Week 5. Binary Code A series of 1’s and 0’s Place value is in powers of 2.
Using Binary Coding Information Remember  Bit = 0 or 1, Binary Digit  Byte = the number of bits used to represent letters, numbers and special characters.
Representation of Data How is data (numbers, characters) represented so that it can be used in a Computer ?
Data Representation in Computers
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
Lesson 2 0x Coding ASCII Code.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
9/15/09 - L3 CodesCopyright Joanne DeGroat, ECE, OSU1 Codes.
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
Dale & Lewis Chapter 3 Data Representation
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Chapter 2 Data Representation. Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images,
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Agenda Data Representation – Characters Encoding Schemes ASCII
Bits & Bytes: How Computers Represent Data
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Computer Structure & Architecture 7c - Data Representation.
Binary Code.
Data Representation and Storage Lecture 5. Representations A number value can be represented in many ways: 5 Five V IIIII Cinq Hold up my hand.
Computing Theory – F453 Number Systems. Data in a computer needs to be represented in a format the computer understands. This does not necessarily mean.
CS151 Introduction to Digital Design
Chapter 7—Objects and Memory The Art and Science of An Introduction to Computer Science ERIC S. ROBERTS Java Objects and Memory C H A P T E R 7 Yea, from.
Complements and Codes by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano  Programmable Controllers-Theory and Implementation,
Section 3.1: Number Representation Practice HW (not to hand in) From Barr Text p. 185 # 1-5.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
Codes by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
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.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
Introduction to Unix (CA263) File Editing By Tariq Ibn Aziz.
DATA REPRESENTATION CHAPTER DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information.
CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.
Representation of Characters
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
1 Problem Solving using Computers “Data....Representation, and Storage.
ASCII AND EBCDIC CODES By : madam aisha.
Representing Characters in a Computer System Representation of Data in Computer Systems.
Information Coding Schemes Group Member : Yvonne Tiffany Jurifah bt Junaidi Clara Jane George.
Understanding Computers
Data Representation. In our everyday lives, we communicate with each other using analogue data. This data takes the form of: Sound Images Letters Numbers.
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.
1 Non-Numeric Data Representation V1.0 (22/10/2005)
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
DATA REPRESENTATION - TEXT
Binary Representation in Text
Binary Representation in Text
Understanding binary Understanding Computers.
Unit 2.6 Data Representation Lesson 2 ‒ Characters
Chapter 3 Data Representation Text Characters
CSCI 198: Lecture 4: Data Representation
Data Transfer ASCII FILES.
CSCI 161: Lecture 4: Data Representation
Breaking the Code Can anyone guess the phrase from this “code”?
Representing Information as bit patterns
Data Encoding Characters.
Representing Characters
Ch2: Data Representation
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Option: Data Representation
Text Representation ASCII Collating Sequence
Option: Data Representation
C Programming Language
ASCII LP1.
ASCII and Unicode.
Presentation transcript:

Coding System Text Representation ASCII Collating Sequence

What is a BIT As w know a bit is the smallest unit in a computer system A bit can either be a 1 2 or a 0 2 This means that with one single bit we can only represent only 2 different values 1 2 = 1 10 and 0 2 = 0 10

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.

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 2 2 = 4 different combinations Hence if we have 4 bits we would have 2 4 = 16 different combinations

Working With the following number of bits how many combinations could be created? 1. 5 bits 2. 3 bits 3. 6 bits 4. 8 bits

Answers 1. 5 bits = 2 5  32 combinations 2. 3 bits = 2 3  8 combinations 3. 6 bits = 2 6  64 combinations 4. 8 bits = 2 8  256 combinations

List of Combination Number of BitsCalculationNumber of Combinations

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)

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)

How ASCII Coding Works The first ASCII system used a series of 7 Bits This meant that 2 7 =128 different characters could be used These 128 characters are represented in the following table

CodeCharCodeCharCodeCharCodeChar 1SOH33!65A97a 2STX34“66B98b 3ETX35#67C99c 4EOT36$68D100d 5ENQ37%69E101e 6ACK38&70F102f 7BEL39‘71G103g 8BS40(72H104h 9TAB41)73I105i 10LF42*74J106j 11VT43+75K107k 12FF44,76L108l 13CR45-77M109m 14SO46.78N110n 15SI47/79O111o 16DLE48080P112p 17DC149181Q113q 18DC250282R114r 19DC351383S115s 20DC452484T116t 21NAK53585U117u 22SYN54686V118v 23ETB55787W119w 24CAN56888X120x 25EM57989Y121y 26SUB58:90Z122z 27ESC59;91[123{ 28FS60<92\124| 29GS61=93]125} 30RS62>94^126~ 31US63?95_127DEL

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 2 8 =256.

Codes Available Today

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

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

Coding in ASCII We must use the ASCII table to be able to code the following; LetterHELLO Decimal Code Binary Code

Example of XYZ system Remember this is fictitious CodeCharCodeCharCodeChar 1A69!76* 2B70“77( 3C71£78) 4D72$79- 5E73%80_ 6F74^ &...

So HELLO would look different when decoded Binary Code Decimal Letter$!**-

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 ractershttp://en.wikipedia.org/wiki/List_of_Unicode_cha racters.

Work Code the following word using ASCII; LetterBYE!! Decimal Code Binary Code

Answer LetterBYE!! Decimal Code Binary Code

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).

Example CharacterCode C67 V86 B66 Using the ASCII codes the computer could sort the letters in ascending or descending order by sorting the ASCII code (numbers)