Date post: | 13-Dec-2015 |
Category: |
Documents |
Upload: | blanche-kelly |
View: | 224 times |
Download: | 1 times |
Data as the computer sees it
1
Number systems Data storage 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
2358 10101012
A2CD3E1
6
4
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
Binary number (base 2): 1101.101
6
Hexadecimal numbers (base 16)
7
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
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
Convert the following binary numbers to decimal numbers, showing all your calculations.
10
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
Convert the following hexadecimal numbers to decimal, showing all your calculations.
12
This is good old primary
school division with the
remainder!
13
Convert the following decimal numbers to binary numbers.
14
634 ÷ 16 = 39 remainder 10 39 ÷ 16 = 2 remainder 72 ÷ 16 = 0 remainder 2
answer is 27A16 (10 = A)
15
Write the following decimal numbers in hexadecimal notation.
16
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
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
19
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
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
Coding schemes
The ASCII system was the original standard which assigned numeric values to letters, digits, punctuation marks, and other characters
22
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
Know the basics
24
Apply your knowledge
25
Think and research
26
27