DATA REPRESENTATION 4 Y. Colette Lemard February 2009.

Post on 18-Jan-2018

213 views 0 download

description

3 Every character, whether it is a letter, a number or a special character, has a binary representation. This is the form in which you will find it stored on a storage medium.

transcript

DATA REPRESENTATION

4

Y. Colette Lemard

February 2009

2

HOW IS DATA ACTUALLY

REPRESENTED IN THE COMPUTER!?

3

Every character, whether it is a letter, a number or a special character, has a binary representation.

This is the form in which you will find it stored on a storage medium.

4

However, all computers do not use the same system for determining the representation.

Most microcomputers use the ASCII systemIBM machines, minicomputers and mainframes use EBCDICThere is also UNICODE – an international standard set up by the ISO

5

ASCIIASCII stands for American Standard Code for Information Interchange. It is a standard seven-bit code that was proposed by ANSI in 1963, and finalized in 1968 The standard ASCII character set consists of 128 decimal numbers ranging from zero through 127 assigned to letters, numbers, punctuation marks, and the most common special characters.

6

7

The ASCII value is then represented as a binary number in the computer.

E.g. capital A is 65 1000001

E.g. capital B is 66 1000010

8

E.g. common a is 97 1100001

E.g. common b is 98 1100010

E.g. a space is 32 0100000

E.g. the semicolon (;) is 59 0111011

9

The ASCII code takes up 7 bits and one bit is used for parity.

That means that one character can be stored in 8 bits one byte

10

EBCDICEBCDIC was invented in 1963 by IBM for use in their computer systems in the days when proprietary standards were in vogue.

It stands for Extended Binary Coded Decimal Interchange Code and was based on the BCD concept but using 8 bits so allowing for representation of many more characters.

11

12

The 1 byte binary EBCDIC code is split into two nybbles – the first 4 bytes indicates the class of the character while the second is the actual representation of the character

13

E.g. 1111 1001 stands for 9. the first 4 characters 1111 indicate that it is a number and 1001 is the BCD for 9

E.g. uppercase characters begin with 1100

14

UNICODE

Unicode is aimed at providing a unique number for every character, no matter what the platform, no matter what the program, no matter what the language.

15

The Unicode Standard has been adopted by such industry leaders as Apple, HP, Microsoft, Oracle, Sun, Sybase, Unisys and many others. Unicode is required by modern standards such as XML, Java, JavaScript, CORBA 3.0, etc.. It is supported in many operating systems and all modern browsers.

16

The use of the Unicode character set can be seen when one attempts to insert a symbol from inside MS Word. The dialog box allows one to choose a character from the ASCII set or the UNICODE set.

The UNICODE set comes up by default however.

17

18

S U M M A R YWe’ve looked at :

Bits & BytesNumber bases (Base 2, 8, 10, 16)Binary

Fixed representationBCDsigned magnitudeone’s complementtwo’s complement

Floating point numbersNumber and character representation

19

Q U E S T I O N S?

20

~ The E N D ~