Presentation is loading. Please wait.

Presentation is loading. Please wait.

Text (and email) Plain text and formatted text. Plain text is usually coded in “ASCII” (American Standard Code for Information Interchange). A 7 bit code.

Similar presentations


Presentation on theme: "Text (and email) Plain text and formatted text. Plain text is usually coded in “ASCII” (American Standard Code for Information Interchange). A 7 bit code."— Presentation transcript:

1 Text (and ) Plain text and formatted text. Plain text is usually coded in “ASCII” (American Standard Code for Information Interchange). A 7 bit code which allows 128 characters. Computers usually deal with 8 bits so ASCII appears to “waste” one bit.

2 Text “ASCII” coded text was originally designed to connect terminals (keyboard and text monitors) to remote computers. Errors could occur in the connection. Bit 8 used for parity checks.

3 ASCII Full list of ASCII codes will appear on my website and will be given as a handout. But common letters and numbers are easy to remember. Upper case letters –Add 64 (decimal) (40 (hex)) to position in alphabet. Eg Code for B is = 66 Or = 42 in hexadecimal.

4 ASCII Lower case letters –Add 96 (decimal) (60 (hex)) to position in alphabet. Eg Code for a is = 97 Or = 61 in hexadecimal. Numbers –Add 48 (decimal) (30 (hex)) to number. Eg Code for 5 is = 53 Or = 35 in hexadecimal. Working in hex may be easier.

5 Parity Since we mentioned it. Error checking mechanism. Odd or even, (but we decide first). In 7 bit code (like ASCII) we use the 8 th (MSB) for parity. We set the bit to one or zero to make the total number of 1’s odd (for odd parity) or even (for even parity).

6 Odd Parity Example 1 –Say our seven bit number is There are 4 ones. –We add an 8 th bit of value 1 to make the total number of ones odd, giving (1) Example 2 –Say our seven bit number is There are 3 ones. –We add an 8 th bit of value 0 to keep the total number of ones odd, giving (0)

7 Even Parity Example 1 –Say our seven bit number is There are 3 ones. –We add an 8 th bit of value 1 to make the total number of ones even, giving (1) Example 2 –Say our seven bit number is There are 4 ones. –We add an 8 th bit of value 0 to keep the total number of ones even, giving (0)

8 Parity Checked by receiving computer to see if there is an error. Can you see a problem with this? Clue - 2 errors. Midi code (for sound synthesiser communication) very similar to ASCII, but no parity.


Download ppt "Text (and email) Plain text and formatted text. Plain text is usually coded in “ASCII” (American Standard Code for Information Interchange). A 7 bit code."

Similar presentations


Ads by Google