Top Banner
Data as the computer sees it 1
27

Data as the computer sees it 1. Number systems Number systems Data storage Data storage Glossary Glossary 2.

Dec 13, 2015

Download

Documents

Blanche Kelly
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Data as the computer sees it

1

Page 2: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Number systems Data storage Glossary

2

Page 3: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Because of their electronics, computers work with only two states – on or off, that is a binary or base 2 number system

3

Page 4: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

2358 10101012

A2CD3E1

6

4

Page 5: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Decimal number (base 10): 4192.304

Number 4 1 9 2 . 3 0 4

Placeholder column

3 2 1 0 -1 -2 -3

Place value/Written as base

103 102 101 100 10-1 10-2 10-3

Place value

1000 100 10 11/10=0,1

1/100=0,0

1

1/1000

=0,001

Expanded notation

4192.304=4 X 103+1 X 102+9 X 101+2X100+3X10-1+0X10-

2+4X10-3

=4000+100+90+2+0.3+0+0.004=4192.304

5

Page 6: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Binary number (base 2): 1101.101

6

Page 7: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Hexadecimal numbers (base 16)

7

Page 8: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Engineers discovered that it was easy, from a ‘physical’, engineering point of view, to have just two states – on or off.

This could easily be represented by the presence or absence of current flow.

Hence at the lowest level, data is represented in binary, to make it easier to design and build hardware.

8

Page 9: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Convert binary numbers to decimal numbers

10012= (1 x 23) + (0 x 22) + (0 x 21) + (1 x 20)= (1 x 8) + (0 x 4) + (0 x 2) + (1 x 1) = 8 + 1= 9

Calculator.mp4

9

Page 10: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Convert the following binary numbers to decimal numbers, showing all your calculations.

10

Page 11: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Convert hexadecimal to decimal number

2F316 = (2 x 162) + (F x 161) + (3 x 160)= (2 x 256) + (15 x 16) + (3 x 1)= 512 + 240 + 3= 755

11

Page 12: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Convert the following hexadecimal numbers to decimal, showing all your calculations.

12

Page 13: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

This is good old primary

school division with the

remainder!

13

Page 14: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Convert the following decimal numbers to binary numbers.

14

Page 15: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

634 ÷ 16 = 39 remainder 10 39 ÷ 16 = 2 remainder 72 ÷ 16 = 0 remainder 2

answer is 27A16 (10 = A)

15

Page 16: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Write the following decimal numbers in hexadecimal notation.

16

Page 17: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Each of these data types is allocated a fixed number of what is termed bytes.

Each byte (a number in binary format e.g. 101100112) in turn, consists of 8 binary digits or bits.

Here is an example of data stored in 4 bytes of 8 bits each, i.e. 32 bits.

17

Page 18: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Each data type is allocated a fixed amount of space (bytes) to store its associated data

There is therefore a limit on the data that can be stored –more bytes - larger the range and fewer bytes - smaller the range.

18

Page 19: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

19

Page 20: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

A text or string variable that could store a maximum of 5 characters and was assigned the value ‘Addendum’ to the variable.

Some of the text can be ‘lost’.

We refer to the situation where an integer number is ‘misrepresented’ due to an insufficient number of bits being available, as overflow.

A d d e n

20

Page 21: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Each program/programming language uses different numbers of bytes to store numbers

Decimal or real numbers are normally stored in two parts, namely a ‘number’ part and an ‘exponent’ part e.g. 3.1415462973812 x 1012

Obviously, a loss of accuracy in the exponent part would be critical !

A loss of accuracy in the number part would lead to a loss of accuracy in the number of decimals

21

Page 22: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Coding schemes

The ASCII system was the original standard which assigned numeric values to letters, digits, punctuation marks, and other characters

22

Page 23: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Pictures and sound clips

Picture is a collection of thousands of dots, each of which can be modelled by representing its position and colour etc.,then we can digitise any picture or video

Music too can be modelled by representing the data as numerical values describing volume, pitch and frequency

23

Page 24: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Know the basics

24

Page 25: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Apply your knowledge

25

Page 26: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

Think and research

26

Page 27: Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.

27