1 / 23

Coding System

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.

kacy
Download Presentation

Coding System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Coding System Text Representation ASCII Collating Sequence

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

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

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

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

  6. Answers • 5 bits = 25  32 combinations • 3 bits = 23  8combinations • 6 bits = 26  64combinations • 8 bits = 28  256combinations

  7. List of Combination

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

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

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

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

  12. Codes Available Today

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

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

  15. Coding in ASCII • We must use the ASCII table to be able to code the following;

  16. Example of XYZ system • Remember this is fictitious

  17. So HELLO would look different when decoded

  18. 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_Unicode_characters.

  19. Work • Code the following word using ASCII;

  20. Answer

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

  22. Example • Using the ASCII codes the computer could sort the letters in ascending or descending order by sorting the ASCII code (numbers)

More Related