computer structure & architecture 7c - data representation

8
Computer Structure & Architecture 7c - Data Representation

Upload: wilfrid-kelley

Post on 29-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Structure & Architecture 7c - Data Representation

Computer Structure & Architecture7c - Data Representation

Page 2: Computer Structure & Architecture 7c - Data Representation

Lesson 5 – Representing Text

LI: Describe how text is stored in a computer’s memory using the terms character set, ASCII and control characters

Page 3: Computer Structure & Architecture 7c - Data Representation

ASCII Character Set• A character set is a collection of all the letters (upper and lower case),

symbols, punctuation marks and numbers (not used in calculations) that can be represented and stored in computer memory.

• ASCII (American Standard Code for Information Interchange) is one example of a character set

• It can represent 128 (27) characters• Each character has a unique 8 bit code (left-most bit is always 0 and used for error checking)

• The first 32 characters are non-printable characters which perform special functions such as RETURN, ESC, Backspace. These are known as Control Characters

• UNICODE is another example of a character set• It can represent 65536 characters as it uses 16 bits• It is used to represent non-Latin characters such as Arabic

Page 4: Computer Structure & Architecture 7c - Data Representation

Lesson 6 – Representing Numbers

LI: Describe how integers are stored in a computer’s memoryConvert decimal numbers to binary and vice versa

Page 5: Computer Structure & Architecture 7c - Data Representation

Representing NumbersNumbers are represented in computer’s memory as their binary equivalents. For example the 8 bit representation of the decimal integer 13 would be 00001101

When converting a binary number to decimal we write the binary number under its unit headings:

128 64 32 16 8 4 2 10 0 0 1 1 0 0 1

Then where a 1 appears under a unit heading, add the unit headings together:

16+8+1 = 25

Page 6: Computer Structure & Architecture 7c - Data Representation

Representing NumbersWhen converting a decimal integer to binary we perform a simple division.

e.g. The process of converting the number 47 would be:

128 64 32 16 8 4 2 10 0 1 0 1 1 1 1

47/128 = 047/64 = 047/32 = 1 r1515/16 = 015/8 = 1 r77/4 = 1 r33/2 = 1 r11/1 = 1

Page 7: Computer Structure & Architecture 7c - Data Representation

Lesson 7 – Advantages of Binary

LI: Explain the key advantages of computers using binary

Page 8: Computer Structure & Architecture 7c - Data Representation

Advantages of Binary•Binary is a simple two-state system (1 or 0) which is ideal when

representing a two state system of power on/power off.

•There are only a few rules for addition, making calculations simpler (compared to decimal).

•A degraded signal can still be detected as representing 1 or 0.

e.g.

Degraded Signal… can be still be read as…