Download presentation
Presentation is loading. Please wait.
1
Computer Systems
2
There are 10 groups of people in the world
Those who understand binary Those who don’t
3
What you need to know Conversion from binary to decimal and vice versa
Representation of positive numbers up to 32 bits Representation of negative numbers (using two’s compliment) up to 8 bits Conversion to and from bit, byte, kilobyte, megabyte, gigabyte, terabyte Description of floating point representation
4
Data Representation
5
Computer Data The purpose of this unit is to find out how data is stored in a computer There are 3 types of data: Numbers (integer (+ and -) and real) Text (ASCII and Unicode) Graphics (bit mapped and vector)
6
Why we use decimal numbers
Humans use the number system called base 10 (decimal). The reason for this is that humans have ten toes and ten fingers. This system requires the use of ten different numbers (0 to 9).
7
If we have to represent a number greater than nine then we have to introduce another column (10’s).
The place value system that works with decimal is shown below 10, , units
8
Binary numbers Binary numbers are numbers which represent the base 2. The columns in binary are…
9
Binary Vocabulary Here is an example of how to convert the binary number to a decimal: = = 218
10
Binary Vocabulary - Revision
A bit is short for binary digit. A bit can either be a 1 or a 0. A byte is a group of 8 bits. This can take on 28 = 256 possible values. A nibble is a group of 4 bits. There are 2 nibbles in 1 byte.
11
Positive Integers Positive integer numbers can be converted exactly in to their equivalent binary numbers. The size of number that can be handled depends on the number of bytes allocated to each number.
12
For example, if two bytes (16 bits) are used to store each integer number then this can handle numbers in the range from up to In decimal this is 0 to 216-1 = 0 to 65535
13
If you use 3 bytes to store an integer this can handle numbers in the range from
In decimal this would be = 0 to
14
Storing Positive Integers
The range of numbers which can be stored is dependent on the number of bytes allocated 1 byte = 0 to 28 -1 2 bytes = 0 to 3 bytes = 0 to 4 bytes = 0 to
15
If you use 4 bytes to store an integer this can handle numbers in the range from
In decimal this would be = 0 to
16
Written Task Complete Qs 1 – 4 on pages 2 and 3 of How to Pass Higher Computing
17
More Revision Petabyte Exabyte Zettabyte Yottabyte 1 byte – 8 bits
1 kilobyte = 1024 bytes 1 megabyte = 1024 kilobytes 1 gigabyte = 1024 megabytes 1 terabyte = 1024 gigabytes Petabyte Exabyte Zettabyte Yottabyte
18
Conversion You need to be able to convert to and from bits – bytes - kilobytes, etc If you have 2 quantities in different unit values you must put them into the same unit value to perform calculations
19
Conversion example 1 A CD writer writes at 1200 Kb per second
Hard disk writes at 2 Mbs per second 300 megabytes of file size Calculate the time the transfer will take on each device 300 Mb * 1024 = Kb / 1200 = 256 seconds /2 = 150 seconds (already in same format so no need to convert)
20
Conversion Example 2 CD writer reads at a speed of 1500 Kbps
3 minutes to read a file What is the size of the file? 3 minutes * 60 = 180 seconds 1500 kbps * 180 seconds = Kbs / 1024 = Mb If the answer is greater than 1024 you should always divide again
21
Negative Integers Negative integers can be represented using a method called Two’s Compliment Two’s compliment involves 3 simple steps Convert the positive number to binary Change all the 1’s to 0’s and all the 0’s to 1’s (called inverting) Add 1 to the result
22
Example Two’s complement of 5 (to get negative 5) +5 in binary =
Invert to change 1s to 0s add 1 = -5 in two’s complement
23
-5 in two’s compliment to get +5
Invert to change 1s to 0s add 1 = -5 in two’s complement
24
Sample Exam Question Write the following numbers as 8-bit binary numbers using two’s compliment (i) –18 (ii) –26 +18 in binary = Invert = Add 1 = -18 in 2s comp = +26 in binary = Invert = Add 1 = -26 in 2s comp =
25
Express -10 using 2’s compliment
26
Express -10 using 2’s compliment
27
Express -6 in binary using two’s compliment
28
Express -6 in binary using two’s compliment
29
Express -25 in binary using two’s compliment
30
Express -25 in binary using two’s compliment
31
Express -92 in binary using two’s compliment
32
Practice for you Chose 5 numbers between 1 and 100 and show the binary negative number using two’s compliment – to be done in your jotter Check your answers using the Scholar website
34
Real Numbers We can represent real numbers in decimal by extending the power column further to the left as show below:
35
The same method can be used to represent fractional numbers in binary:
/2 1/4 1/8
36
How does the binary number 1001.111 represent in decimal ?
/2 1/4 1/8 Add up /2 + 1/4 + 1/8 = 9.875 ( )
37
This system is not usually used as there is no way to find out where the binary point is stored.
The solution to this is to keep the binary point in a fixed position and move the bits about.
38
Floating Point Representation
Any decimal number can be represented by using a mantissa, an exponent and a base. exponent 0.23 X 1056 mantissa base
39
The same system can be used in binary as long as the binary point is assumed to be at the start of a floating point number. Example The fractional number would be stored as (mantissa) 100 (exponent).
40
1001.111 1001111 (mantissa) - the number being stored
100 (exponent) – the number of places to move the binary point (remember the exponent is also stored in binary so 100 means 4!!!)
41
The exponent (100) tells the computer to place the binary point four places from the start of the mantissa. As the binary point is assumed to be at the start of any floating point number, only the mantissa and exponent need be stored.
42
To change in to floating point in binary is similar except the point is moved in front of the first 1 and we are in binary. So would be written as * 24 where the 4 is the number of places that the point has moved and the 2 is the base (because we are working in binary)
43
The full answer is *2100 because the 4 is converted into binary as well. The computer would store the mantissa and exponent 100 Because we are always working in binary with a base of 2 we don’t need to store the base
44
ANOTHER EXAMPLE 11100101 =11100101.0 =0.11100101 x 28 (because we have
moved the point 8 places) MANTISSA BASE EXPONENT The exponent would be store as
45
The normal way is to use four bytes for the mantissa and one byte for the exponent
This gives nine figure accuracy when converted to decimal) and a range of 20 to 2255 which is approximately 100 to 1076.
46
Accuracy - Mantissa 1/3 = 0.33333333333333 ………….. 1/3 = 0.333
The first method is more accurate because there are more decimal places In floating point the number of bits in the Mantissa determines the accuracy – the more bits the more accuracy.
47
Range - Exponent Increasing the number of bits allocated to the exponent increases the range of numbers that can be stored. Exponent with 4 bits = 24 = 16 numbers Exponent with 8 bits = numbers
48
Written Task Complete Q 11 on page 5 of How to Pass Higher Computing
49
Representing Text ASCII and Unicode
50
What you should already know
Every character is stored as a unique binary code A character is a letter, number or symbol from the keyboard Character Set is all the characters that the computer can store and process
51
How is Text stored? Two common methods of storing text are ASCII
Unicode
52
ASCII American Standard Code for Information Interchange.
Each character has a unique ASCII code Allows text to be transmitted between computers using a common standard
53
ASCII codes can be used to represent the following:
Digits 0 to 9 Upper and Lower case letters Symbols such as (!,#$?) Control characters
54
Control Characters ASCII codes 32 – 47 are for symbols and control characters Return Break Escape Caps Lock 48 – 57 represent 0 – 9 65 – 122 represent upper and lower case letters
55
More… On all computers the ASCII codes from 0 to 127 are fixed
Those from 128 to 255 can be used for anything the computer manufacturer desires
56
How many characters can be stored?
7 bits are used to store each character The 8th bit is used as a parity check digit (explained later) If 7 Bits are used: = 27 = 128 characters If 8 Bits are used: = 28 = 256 characters
57
Unicode Developed to enable representation of all languages not just English/American/European Uses 16 bits to represent each character 216 = characters
58
Advantages of Unicode over ASCII
More characters can be represented Many languages can be represented Unicode becoming more popular as the standard for text transfer
59
Written Task Complete Qs 12 – 15 on page 6 of How to Pass Higher Computing
60
Disadvantage of Unicode
Requires double the storage space of ASCII to store each character
61
Representing Graphics
62
What you need to know about graphics
Features of bitmapped graphics Relationship between bit depth and number of colours (up to 24 bit true colour) Features of vector graphics Advantages and disadvantages of different methods of graphic representation Relationship between bit depth and file size The need for data compression
63
How are graphics stored?
There are 2 ways to store a graphic: Bit Mapped Graphic Vector Graphic
64
Bitmapped Graphics
65
Bit Mapped Graphics Computer stores the graphic as a 2 dimensional array of pixels On a monochrome image each pixel is represented by 1 bit Once drawn, each pixel can be edited individually Every pixel is stored
66
Disadvantages of Bitmaps
Graphic cannot be resized without pixelation occurring Graphic will always stay the same resolution that it was created in – this is called Resolution Dependent Take up a large amount of storage space
67
Resolution Dependent A graphic is created at 300 dpi
A printer prints at 600 dpi The graphic is sent to the printer The graphic only prints at 300 dpi not 600 dpi
68
Storage requirements of bitmaps
Storage in bits = area X resolution X bit depth
69
Black and White – Example 1
Graphic resolution 600 dpi Graphic size 2” x 5” 2 X 5 X 600 X 600 x 1 = bits / 8 = bytes / 1024 =439.5 Kb
70
Black and White Example 2
A4 page (10” x 8”) Resolution 1200 dpi 10 X 8 X 1200 X 1200 x 1 = bits / 8 = bytes / 1024 = Kb / 1024 = Mb
71
Using Colour We have seen that each pixel of a monochrome image can be represented by 1 bit where 1 represents black and 0 represents white If we wish to display more than just black or white then each pixel requires more than 1 bit
72
Real life isn’t just black and white – even if grey is used there are 256 different shades of grey!!! Lots of colours are required to represent real life Each pixel needs more than 1 bit to represent each colour or shade This is know as the bit depth of a graphic
73
This image uses 16 colours
74
This image uses 256 colours
75
This image uses 16,777,216 colours – this is called true colour
76
Number of colours available
The number of colours or shades depend on the bit depth of each pixel The greater the bit depth the greater the range of colours
77
No. of bits No. of possible
used colours = 2 colours = 4 colours = 8 colours = 16 colours = 32 colours = 64 colours = 128 colours = 256 colours The more colours an image has, the greater the memory requirements.
78
Colour – example 1 Same as example 1 for black and white but with a range of 16 colours (24) Graphic resolution 600 dpi Graphic size 2” x 5” Bit depth 4 Calculate the storage requirements?
79
Colour Example 1 2 x 5 x 600 x 600 x 4 = 14400000 bits / 8
= bytes / 1024 = Kb / 1024 = 1.72 Mb This is substantially different from the 2 colour version at Kb
80
Colour example 2 Same graphic but with a bit depth of 24 bits and a resolution of 1200 dpi 2 x 5 x 1200 x 1200 x 24 = bits / 8 = bytes/1024 / 1024 = 41.2 Mb
81
Colour Example 3 Graphic size is 2” X 2” Resolution of 90 dpi is used
256 colours are used 2 X 2 X 90 X 90 = pixels Bits per pixel = 8 (256 colours) 32400 X 8 = / 8 = bytes/1024 = 32Kb
82
Colour Example 4 Graphic size is 4” X 5” Resolution of 100 dpi is used
16 shades of grey are used 4 X 5 X 100 X 100= pixels Bits per pixel = 4 (16 colours) X 4 = bits / 8 = bytes/1024 = 98 Kb
83
Colour Example 5 Graphic size is 4” X 2” Resolution of 200 dpi is used
256 colours are used 4 X 2 X 200 X 200= pixels 8 Bits per pixel = 256 colours X 8 = bits / 8 = bytes/1024 = 312.5 Kb
84
Colour Example 6 Graphic size is 3” X 6” Resolution of 80 dpi is used
64 colours are used 3 X 6 X 80 X 80= pixels Bits per pixel = 6 (64 colours) X 6 = bits / 8 = bytes/1024 = 84 Kb
85
Points to remember about Bitmaps
If a graphic is made larger, then it appears blocky (pixelated) 2. Bit-mapped graphics which have a high resolution or use many colours have a high storage requirement 3. The storage requirement for a screen stays constant even if you add more detail to it
86
4. A blank screen takes up the same storage requirements as a complex screen.
5. Examples of commands which are unique to bit-mapped applications are those that directly alter a pixel or a group of pixels, for example, set pixel, fill area. 6. Bit-mapped graphics are usually created in paint packages like Paint Shop Pro 7. You can’t edit a whole object, move whole objects or layer objects
87
Compression Because of their large file size many bitmapped graphics are compressed Colours are compressed Extraneous data is deleted
88
Vector Graphics A vector graphic is a graphic stored as a set of commands of how to draw the object (similar to a program) Each object is made up out of different attributes (Properties)
89
Circle has the following attributes
Centre X, Centre Y, radius, line thickness, fill pattern, pen colour, fill colour Centre (X,Y) Radius
90
Rectangle has the following attributes
Start X, Start Y, End X, End Y, line thickness, fill pattern, pen colour, fill colour Start (X,Y) End (X,Y)
91
Layering It is possible to combine 2 or more objects together to make another shape These objects can be moved individually and one can be sent behind the other – this is called layering
92
The following example uses a circle in the background, a rectangle in the middle and text in the foreground No Entry No Entry
93
Commands are not dependent on the number of pixels on the screen or on how many colours can be displayed Objects are resolution independent When a vector graphic is sent to print the attributes/program for each shape are sent This allows the graphic to print at the resolution of the printer
94
Points to know about vector graphics
If the image is resized then the quality of the image should stay constant Allows layers of objects (good for DTP and CAD) Eg allows you to move a circle in front of a square without destroying the square.
95
A blank screen takes up very little storage compared to the bit-mapped version
As more objects are placed on screen, the storage requirements increase The vector graphic take advantage of any high resolution device they are used on (resolution independence)
96
Past paper questions on graphics
1. A graphic of resolution 72 DPI is printed on a 300 DPI printer, the graphic will still only print at a resolution of 72 DPI. Explain why this might happen? 2. Describe 2 ways of finding out if a graphic was created using a bitmap or a vector graphics package.
97
Vector Actions Examples of actions which can be carried out in vector applications are: Order of objects could be changed Individual Objects can be resized Individual Objects can be moved or edited Objects can be resized with no loss of quality
98
Written Task Complete questions 16 – 21 on pages 8 and 9 of How to Pass Higher Computing
99
Written Task In your jotter copy and complete the table below showing the advantages and disadvantages of each type of graphic Bitmap Graphic Vector Graphic Advantages Disadvantages
100
Graphics Practical Exercise
You should now complete the practical exercises on vector graphics
101
What you should have learned in about storing numbers
Conversion from binary to decimal and vice versa Representation of positive numbers up to 32 bits Representation of negative numbers (using two’s compliment) up to 8 bits Conversion to and from bit, byte, kilobyte, megabyte, gigabyte, terabyte Description of floating point representation
102
What you should have learned about representing text
Description of ASCII Description of Unicode Advantages and disadvantages of each method of representing text
103
What you should have learned about storing graphics
Features of bitmapped graphics Relationship between bit depth and number of colours (up to 24 bit true colour) Features of vector graphics Advantages and disadvantages of different methods of graphic representation Relationship between bit depth and file size The need for data compression
104
What you should do now Complete the end of topic confidence evaluation sheet Complete the Activote Assessment Complete the End of Topic Checkup
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.